lib/rubocop/extension/generator/generator.rb in rubocop-extension-generator-0.4.0 vs lib/rubocop/extension/generator/generator.rb in rubocop-extension-generator-0.5.0
- old
+ new
@@ -135,10 +135,14 @@
patch 'Gemfile', /\z/, <<~RUBY
gem 'rspec'
RUBY
- patch 'README.md', /^gem '#{name}'$/, "gem '#{name}', require: false"
+ if Gem::Version.new(Bundler::VERSION) >= Gem::Version.new('2.3.9')
+ patch 'README.md', /\$ bundle add #{name}$/, "\$ bundle add #{name} --require=false"
+ else
+ patch 'README.md', /^gem '#{name}'$/, "gem '#{name}', require: false"
+ end
puts
puts <<~MESSAGE
It's done! You can start developing a new extension of RuboCop in #{root_path}.
For the next step, you can use the cop generator.