diff options
-rw-r--r-- | Rakefile | 11 | ||||
-rw-r--r-- | bundler.gemspec | 1 |
2 files changed, 4 insertions, 8 deletions
@@ -43,7 +43,6 @@ namespace :spec do deps = Hash[bundler_spec.development_dependencies.map do |d| [d.name, d.requirement.to_s] end] - deps["rubocop"] ||= "= 0.50.0" if RUBY_VERSION >= "2.0.0" # can't go in the gemspec because of the ruby version requirement # JRuby can't build ronn or rdiscount, so we skip that if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby" @@ -95,13 +94,9 @@ begin RSpec::Core::RakeTask.new task :spec => "man:build" - if RUBY_VERSION >= "2.0.0" - # can't go in the gemspec because of the ruby version requirement - gem "rubocop", "= 0.50.0" - require "rubocop/rake_task" - rubocop = RuboCop::RakeTask.new - rubocop.options = ["--parallel"] - end + require "rubocop/rake_task" + rubocop = RuboCop::RakeTask.new + rubocop.options = ["--parallel"] namespace :spec do task :clean do diff --git a/bundler.gemspec b/bundler.gemspec index 8dda139c0a..5d494bcb0a 100644 --- a/bundler.gemspec +++ b/bundler.gemspec @@ -46,6 +46,7 @@ Gem::Specification.new do |s| s.add_development_dependency "rdiscount", "~> 2.2" s.add_development_dependency "ronn", "~> 0.7.3" s.add_development_dependency "rspec", "~> 3.6" + s.add_development_dependency "rubocop", "= 0.50.0" base_dir = File.dirname(__FILE__).gsub(%r{([^A-Za-z0-9_\-.,:\/@\n])}, "\\\\\\1") s.files = IO.popen("git -C #{base_dir} ls-files -z", &:read).split("\x0").select {|f| f.match(%r{^(lib|exe)/}) } |