Class: CucumberFeatureManager
Overview
TODO refactor, use repo full_path and feature not full path
Instance Attribute Summary collapse
Instance Method Summary
collapse
#estimation, #estimation_done, #estimation_done_percentage, #scenarios_done, #scenarios_done_percentage
Methods included from Grit
log, version
Instance Attribute Details
#config_parameters ⇒ Object
Returns the value of attribute config_parameters
29
30
31
|
# File 'lib/cucumber_feature_manager.rb', line 29
def config_parameters
@config_parameters
end
|
#info ⇒ Object
Returns the value of attribute info.
34
35
36
|
# File 'lib/cucumber_feature_manager.rb', line 34
def info
@info
end
|
#path ⇒ Object
Returns the value of attribute path
29
30
31
|
# File 'lib/cucumber_feature_manager.rb', line 29
def path
@path
end
|
#repo_path ⇒ Object
Returns the value of attribute repo_path
29
30
31
|
# File 'lib/cucumber_feature_manager.rb', line 29
def repo_path
@repo_path
end
|
Instance Method Details
#aggregate ⇒ Object
52
53
54
55
56
|
# File 'lib/cucumber_feature_manager.rb', line 52
def aggregate
unless patterns_for_aggregator.empty?
@raport ||= CucumberFM::Aggregator.new(self, patterns_for_aggregator).collection
end
end
|
#commit_change_on(feature) ⇒ Object
62
63
64
65
66
67
|
# File 'lib/cucumber_feature_manager.rb', line 62
def commit_change_on(feature)
add_to_index(feature)
repo.commit_index("spec-update: #{feature.filename}")
end
|
#config ⇒ Object
44
45
46
|
# File 'lib/cucumber_feature_manager.rb', line 44
def config
@config ||= CucumberFM::Config.new((config_parameters || {}))
end
|
#features ⇒ Object
36
37
38
|
# File 'lib/cucumber_feature_manager.rb', line 36
def features
@features ||= scan_features
end
|
#filter ⇒ Object
48
49
50
|
# File 'lib/cucumber_feature_manager.rb', line 48
def filter
@filter ||= CucumberFM::TagFilter.new(config.tags)
end
|
#prefix ⇒ Object
58
59
60
|
# File 'lib/cucumber_feature_manager.rb', line 58
def prefix
config.dir.empty? ? path : File.join(path, config.dir)
end
|
#remove_file_from_repo(relative_path) ⇒ Object
69
70
71
|
# File 'lib/cucumber_feature_manager.rb', line 69
def remove_file_from_repo(relative_path)
`cd #{repo_path} && git rm #{relative_path}`
end
|
#scenarios ⇒ Object
40
41
42
|
# File 'lib/cucumber_feature_manager.rb', line 40
def scenarios
(features.collect { |feature| feature.scenarios }).flatten
end
|
#send_to_remote ⇒ Object
73
74
75
|
# File 'lib/cucumber_feature_manager.rb', line 73
def send_to_remote
push_to_remote
end
|