Skip to content

Commit

Permalink
Fix build failure with Ruby 1.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
yujinakayama committed May 4, 2017
1 parent b9f9b47 commit be104c5
Show file tree
Hide file tree
Showing 3 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 @@ -18,7 +18,7 @@ group :development, :test do
# https://github.com/rspec/rspec-core/pull/2197
gem 'rake', '~> 11.0'
gem 'simplecov', '~> 0.7'
gem 'rubocop', '~> 0.47.1'
gem 'rubocop', '~> 0.47.1' unless RUBY_VERSION.start_with?('1.')
end

group :development do
Expand Down
11 changes: 8 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
require 'bundler/setup'
require 'bundler/gem_tasks'
require 'rubocop/rake_task'
require 'rspec/core/version'

RuboCop::RakeTask.new(:style)
unless RUBY_VERSION.start_with?('1.')
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:style)
end

Dir['tasks/**/*.rake'].each do |path|
load(path)
end

task default: %w(spec style readme)
default_tasks = ['spec']
default_tasks << 'style' unless RUBY_VERSION.start_with?('1.')
default_tasks << 'readme'
task default: default_tasks
2 changes: 1 addition & 1 deletion tasks/ci.rake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
tasks = %w(spec)

if RSpec::Core::Version::STRING.start_with?('2.14') && RUBY_ENGINE != 'jruby'
tasks << 'style' if RUBY_VERSION >= '2.0.0'
tasks << 'style' unless RUBY_VERSION.start_with?('1.')
tasks.concat(%w(readme:check test:all))
end

Expand Down

0 comments on commit be104c5

Please sign in to comment.