1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
teamcapybara--capybara/Rakefile

68 lines
1.6 KiB
Text
Raw Normal View History

# frozen_string_literal: true
require 'rubygems'
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
require 'yard'
desc "Run all examples with Firefox non-marionette"
2014-03-31 18:10:27 -04:00
2018-04-24 18:47:53 -04:00
rspec_opts = %w[--color]
RSpec::Core::RakeTask.new(:spec_marionette) do |t|
2018-04-24 18:47:53 -04:00
t.rspec_opts = rspec_opts
t.pattern = './spec{,/*/**}/*{_spec.rb,_spec_marionette.rb}'
end
2018-04-24 18:47:53 -04:00
%w[chrome ie edge chrome_remote].each do |driver|
RSpec::Core::RakeTask.new(:"spec_#{driver}") do |t|
2018-04-24 18:47:53 -04:00
t.rspec_opts = rspec_opts
t.pattern = "./spec/*{_spec_#{driver}.rb}"
end
2015-05-21 14:00:36 -04:00
end
RSpec::Core::RakeTask.new(:spec_rack) do |t|
2018-04-24 18:47:53 -04:00
t.rspec_opts = rspec_opts
t.pattern = './spec{,/*/**}/*{_spec.rb}'
end
2018-01-09 17:05:50 -05:00
task spec: [:spec_marionette]
2017-03-07 16:19:03 -05:00
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb']
2018-01-09 17:05:50 -05:00
t.options = %w[--markup=markdown]
end
Cucumber::Rake::Task.new(:cucumber) do |task|
task.cucumber_opts = ['--format=progress', 'features']
end
2017-11-13 16:04:47 -05:00
task :travis do
if ENV['CAPYBARA_FF']
Rake::Task[:spec_marionette].invoke
elsif ENV['CAPYBARA_IE']
Rake::Task[:spec_ie].invoke
elsif ENV['CAPYBARA_EDGE']
Rake::Task[:spec_edge].invoke
2018-04-24 18:47:53 -04:00
elsif ENV['CAPYBARA_CHROME_REMOTE']
Rake::Task[:spec_chrome_remote].invoke
2015-05-21 14:00:36 -04:00
else
Rake::Task[:spec_chrome].invoke
2015-05-21 14:00:36 -04:00
end
2018-01-08 15:23:54 -05:00
Rake::Task[:cucumber].invoke
2015-05-21 14:00:36 -04:00
end
2016-10-19 13:35:11 -04:00
task :release do
2018-01-03 17:31:56 -05:00
version = Capybara::VERSION
2016-10-19 13:35:11 -04:00
puts "Releasing #{version}, y/n?"
exit(1) unless STDIN.gets.chomp == 'y'
sh "git commit -am 'tagged #{version}' && " \
"git tag #{version} && " \
'gem build capybara.gemspec && ' \
"gem push capybara-#{version}.gem && " \
'git push && ' \
'git push --tags'
end
2018-01-09 17:05:50 -05:00
task default: %i[spec cucumber]