forked from teampoltergeist/poltergeist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
34 lines (28 loc) · 933 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
require 'bundler/setup'
require 'rspec/core/rake_task'
require 'capybara/poltergeist/version'
require 'coffee-script'
require 'rspec-rerun'
task :autocompile do
system "guard"
end
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|
puts "Compiling #{f}"
out << CoffeeScript.compile(File.read(f), :bare => true)
end
end
end
RSpec::Core::RakeTask.new('test')
task :default => [:compile, :test]
task :ci => 'rspec-rerun:spec'
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