Module: Gitnesse::Cli::FeatureHelpers
- Included in:
- Task
- Defined in:
- lib/gitnesse/cli/helpers/feature_helpers.rb
Instance Method Summary collapse
-
#create_or_update_local_features ⇒ Object
Public: Creates or updates local cucumber features.
Instance Method Details
#create_or_update_local_features ⇒ Object
Public: Creates or updates local cucumber features
Returns nothing.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/gitnesse/cli/helpers/feature_helpers.rb', line 7 def create_or_update_local_features puts " Creating and updating local features." @feature_pages.each do |page| if File.exists?(page.path) puts " - Updating #{page.path}" else puts " - Creating #{page.path}" FileUtils.mkdir_p page.relative_path end feature = Gitnesse::Feature.new(page.path) features = Gitnesse::FeatureExtractor.extract!(page.read) feature.write(features.join("\n\n")) end end |