lib/scenarios/tasks.rb in openrain-scenarios-0.2.1 vs lib/scenarios/tasks.rb in openrain-scenarios-0.2.2
- old
+ new
@@ -22,11 +22,25 @@
desc 'scenarios:load NAME=foo OR NAME=a,b,c'
task :load => ( (defined?RAILS_ENV) ? :environment : nil ) do
puts "called scenarios:load" if Scenario.verbose
if ENV['NAME']
names = ENV['NAME'].split(',')
- puts "Scenario.load #{ names.inspect }" if Scenario.verbose
- Scenario.load *names
+ names.each do |scenario_name|
+ puts "Scenario.load #{scenario_name}"
+ Scenario.load scenario_name
+ end
+ else
+ puts "you need to pass NAME=scenario_name to load a scenario"
+ end
+ end
+
+ desc 'scenarios:show NAME=foo OR NAME=a,b,c'
+ task :show do
+ if ENV['NAME']
+ names = ENV['NAME'].split(',')
+ names.each do |scenario_name|
+ puts "this would puts out some kindof information / description for #{ scenario_name }"
+ end
else
puts "you need to pass NAME=scenario_name to load a scenario"
end
end