Rakefile in ruby-beautify-0.97.3 vs Rakefile in ruby-beautify-0.97.4
- old
+ new
@@ -1,2 +1,20 @@
#!/usr/bin/env rake
require "bundler/gem_tasks"
+
+desc "Generate a new usage scenario."
+task :generate_usage_scenario, [:scenario] do |task, args|
+ unless args[:scenario]
+ puts "must define a scenario"
+ exit
+ end
+ files = ["#{args[:scenario]}.rb","#{args[:scenario]}_pretty.rb"]
+ files.each do |f|
+ f = "spec/usage_scenarios/#{f}"
+ if File.exist? f
+ puts " skipping #{f}"
+ else
+ puts " generating #{f}"
+ FileUtils.touch f
+ end
+ end
+end