lib/bundler/cli/gem.rb in bundler-2.2.4 vs lib/bundler/cli/gem.rb in bundler-2.2.5
- old
+ new
@@ -57,10 +57,11 @@
:test => options[:test],
:ext => options[:ext],
:exe => options[:exe],
:bundler_version => bundler_dependency_version,
:github_username => github_username.empty? ? "[USERNAME]" : github_username,
+ :required_ruby_version => Gem.ruby_version < Gem::Version.new("2.4.a") ? "2.3.0" : "2.4.0",
}
ensure_safe_gem_name(name, constant_array)
templates = {
"#{Bundler.preferred_gemfile_name}.tt" => Bundler.preferred_gemfile_name,
@@ -145,9 +146,10 @@
"RuboCop is a static code analyzer that has out-of-the-box rules for many " \
"of the guidelines in the community style guide. " \
"For more information, see the RuboCop docs (https://docs.rubocop.org/en/stable/) " \
"and the Ruby Style Guides (https://github.com/rubocop-hq/ruby-style-guide).")
config[:rubocop] = true
+ config[:rubocop_version] = Gem.ruby_version < Gem::Version.new("2.4.a") ? "0.81.0" : "1.7"
Bundler.ui.info "RuboCop enabled in config"
templates.merge!("rubocop.yml.tt" => ".rubocop.yml")
end
templates.merge!("exe/newgem.tt" => "exe/#{name}") if config[:exe]