flowerbox/bin/flowerbox
2012-03-08 08:54:27 -05:00

29 lines
579 B
Ruby
Executable File

#!/usr/bin/env ruby
require 'flowerbox'
require 'thor'
class Flowerbox::CLI < Thor
desc "test DIR", "Run the specs found in spec dir, loading spec_helper.rb for configuration details"
method_options :pwd => :string
method_options :runners => :string
method_options :verbose => false
def test(dir)
Dir.chdir(pwd) do
exit Flowerbox.run(dir, options)
end
end
no_tasks do
def pwd
options[:pwd] || Dir.pwd
end
def asset_paths
Flowerbox.asset_paths.collect { |path| File.join(pwd, path) }
end
end
end
Flowerbox::CLI.start