Class: Cukestart::Cli
- Inherits:
-
Thor
- Object
- Thor
- Cukestart::Cli
- Defined in:
- lib/cukestart/cli.rb
Instance Method Summary collapse
Instance Method Details
#feature(feature_name) ⇒ Object
18 19 20 |
# File 'lib/cukestart/cli.rb', line 18 def feature(feature_name) Cukestart::Generator::Feature.start([feature_name]) end |
#list ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/cukestart/cli.rb', line 31 def list features = `ls -d -1 **/* \| grep '\.feature'` features = features.split("\n") features.each do |feature| puts "--- #{feature} ---" feature_name = `cat #{feature} | grep 'Feature:'` puts feature_name if [:feature] scenarios = `cat #{feature} | grep 'Scenario:'` scenarios = scenarios.split("\n") scenarios.each do |scenario| puts scenario if [:scenario] end end end |
#project(project_name) ⇒ Object
12 13 14 |
# File 'lib/cukestart/cli.rb', line 12 def project(project_name) Cukestart::Generator::Structure.start([project_name, [:front], [:page_object]]) end |
#version ⇒ Object
24 25 26 |
# File 'lib/cukestart/cli.rb', line 24 def version puts "Cukestart #{File.read(File.('../version', __FILE__))}" end |