Class: Isolate::Scenarios::Cli
- Inherits:
-
Thor
- Object
- Thor
- Isolate::Scenarios::Cli
- Includes:
- Thor::Actions
- Defined in:
- lib/isolate/scenarios/cli.rb
Instance Method Summary collapse
Instance Method Details
#list ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/isolate/scenarios/cli.rb', line 8 def list sandbox = Isolate::Sandbox.new sandbox.entries_with_scenarios.each do |entry| puts "#{entry.name}:" entry.scenarios.each do |scenario| is_default_scenario = scenario == entry.default_scenario puts "* #{scenario} #{'(default)' if is_default_scenario}" end end end |
#rake ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/isolate/scenarios/cli.rb', line 22 def rake(*) ARGV.delete('rake') sandbox = Isolate::Sandbox.new sandbox.entries_with_scenarios.each do |entry| entry.scenarios.each do |scenario| system "rake #{entry.scenario_env_variable}=#{entry.name}-#{scenario} #{ARGV.join(' ')}" end end end |