File: Rakefile

package info (click to toggle)
ruby-beautify 0.97.4-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 340 kB
  • sloc: ruby: 628; makefile: 8
file content (20 lines) | stat: -rw-r--r-- 447 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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