Skip to content

Commit

Permalink
Recent versions of rubocop doesn't support ruby 1
Browse files Browse the repository at this point in the history
and I don't think we need to run rubocop for all ruby versions
  • Loading branch information
amatsuda committed Dec 26, 2016
1 parent 1691108 commit d68dd1a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ group :test do
gem "cucumber"
gem "phantomjs", "~> 1.9"
gem "poltergeist"
gem "rubocop"
gem "rubocop" unless RUBY_VERSION.start_with?("1.")
gem "test-unit"
end
gem "json", RUBY_VERSION.start_with?("1.") ? "~> 1.8" : "~> 2.0"
Expand Down
13 changes: 9 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ rescue LoadError
end

# Cucumber integration test suite is for impls that work with simplecov only - a.k.a. 1.9+
if RUBY_VERSION >= "1.9"
if RUBY_VERSION.start_with? "1.8"
task :default => [:spec]
else
require "cucumber/rake/task"
Cucumber::Rake::Task.new
task :default => [:spec, :cucumber, :rubocop]
else
task :default => [:spec]

if RUBY_VERSION.start_with? "1.9"
task :default => [:spec, :cucumber]
else
task :default => [:spec, :cucumber, :rubocop]
end
end

0 comments on commit d68dd1a

Please sign in to comment.