1
0
Fork 0
mirror of https://github.com/teampoltergeist/poltergeist.git synced 2022-11-09 12:05:00 -05:00
teampoltergeist--poltergeist/Rakefile

35 lines
1,010 B
Text
Raw Normal View History

require 'rspec/core/rake_task'
2012-01-06 10:51:36 +00:00
base = File.dirname(__FILE__)
require base + "/lib/capybara/poltergeist/version"
2012-06-04 14:46:39 +02:00
require 'coffee-script'
2012-01-06 10:51:36 +00:00
2011-10-27 23:34:14 +01:00
task :autocompile do
system "coffee --compile --bare --watch " \
"--output lib/capybara/poltergeist/client/compiled " \
"lib/capybara/poltergeist/client/*.coffee"
end
2011-10-27 23:41:05 +01:00
2012-06-04 14:46:39 +02:00
task :compile do
Dir.glob("lib/capybara/poltergeist/client/*.coffee").each do |f|
compiled = "lib/capybara/poltergeist/client/compiled/#{f.split("/").last.split(".").first}.js"
File.open(compiled, "w") do |out|
out << CoffeeScript.compile(File.read(f), :bare => true)
end
end
end
RSpec::Core::RakeTask.new('test') do
2011-10-27 23:41:05 +01:00
end
task :default => :test
2012-01-06 10:51:36 +00:00
task :release do
puts "Releasing #{Capybara::Poltergeist::VERSION}, y/n?"
exit(1) unless STDIN.gets.chomp == "y"
sh "gem build poltergeist.gemspec && " \
"gem push poltergeist-#{Capybara::Poltergeist::VERSION}.gem && " \
"git tag v#{Capybara::Poltergeist::VERSION} && " \
"git push --tags"
end