Skip to content

Commit

Permalink
Fix rubocop for ruby >= 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Florent Poinsaut committed Aug 5, 2016
1 parent bd4b0b0 commit 26f1b99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ if RUBY_VERSION < '2.0'
gem 'json', '~> 1.0', :require => false
# json_pure 2.0.2 requires ruby 2.0. Lock to 2.0.1
gem 'json_pure', '= 2.0.1', :require => false
else
# rubocop requires ruby >= 2.0
gem 'rubocop'
end

if puppetversion = ENV['PUPPET_GEM_VERSION']
Expand All @@ -48,8 +51,6 @@ if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
gem 'rspec', '~> 2.0'
gem 'rake', '~> 10.0'
else
# rubocop requires ruby >= 1.9
gem 'rubocop'
gem 'rake', :require => false
end

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'metadata-json-lint/rake_task'

if RUBY_VERSION >= '1.9'
if RUBY_VERSION >= '2.0'
require 'rubocop/rake_task'
RuboCop::RakeTask.new
end
Expand Down

0 comments on commit 26f1b99

Please sign in to comment.