Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring for Rakefile to display cucumber task by "rake -T". #1088

Merged
merged 2 commits into from
Mar 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ Dir['gem_tasks/**/*.rake'].each { |rake| load rake }
require 'rubocop/rake_task'
RuboCop::RakeTask.new

task :default => [:spec, :rubocop, :cucumber]
require 'cucumber/rake/task'
Cucumber::Rake::Task.new do |t|
t.profile = 'ruby' if Cucumber::RUBY
end

default_tasks = [:spec, :rubocop, :cucumber]

if ENV['TRAVIS']
ENV['SIMPLECOV'] = 'ci'
Expand All @@ -18,8 +23,10 @@ if ENV['TRAVIS']
require 'coveralls/rake/task'
Coveralls::RakeTask.new

task :default => [:spec, :rubocop, :cucumber, 'coveralls:push']
default_tasks << 'coveralls:push'
end

task :default => default_tasks

require 'rake/clean'
CLEAN.include %w(**/*.{log,pyc,rbc,tgz} doc)
4 changes: 1 addition & 3 deletions cucumber.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ default: <%= std_opts %> --tags 'not @jruby'
jruby: <%= std_opts %> --tags 'not @wire'
jruby_win: <%= std_opts %> --tags 'not @wire' CUCUMBER_FORWARD_SLASH_PATHS=true
windows_mri: <%= std_opts %> --tags 'not @jruby and not @wire and not @needs-many-fonts' CUCUMBER_FORWARD_SLASH_PATHS=true
ruby_1_9: <%= std_opts %> --tags 'not @jruby'
ruby_2_0: <%= std_opts %> --tags 'not @jruby'
ruby_2_1: <%= std_opts %> --tags 'not @jruby'
ruby: <%= std_opts %> --tags 'not @jruby'
wip: --wip <%= wip_opts %> features <%= cucumber_pro_opts %>
none: --format pretty --format Cucumber::Pro --out /dev/null
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags 'not @wip-new-core' <%= cucumber_pro_opts %>
26 changes: 0 additions & 26 deletions gem_tasks/cucumber.rake

This file was deleted.

4 changes: 1 addition & 3 deletions lib/cucumber/platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ module Cucumber
LIBDIR = File.expand_path(File.dirname(__FILE__) + '/../../lib')
RAILS = defined?(Rails)
RUBY_BINARY = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
RUBY_2_2 = RUBY_VERSION =~ /^2\.2/
RUBY_2_1 = RUBY_VERSION =~ /^2\.1/
RUBY_2_3 = RUBY_VERSION =~ /^2\.3/
RUBY = defined? RUBY_VERSION

class << self
attr_accessor :use_full_backtrace
Expand Down