Rakefile in rubocop-rspec-1.26.0 vs Rakefile in rubocop-rspec-1.27.0
- old
+ new
@@ -49,11 +49,12 @@
task confirm_documentation: :generate_cops_documentation do
_, _, _, process =
Open3.popen3('git diff --exit-code manual/')
unless process.value.success?
- raise 'manual is out of sync, please add manual/ to the commit'
+ raise 'Please run `rake generate_cops_documentation` ' \
+ 'and add manual/ to the commit.'
end
end
task default: %i[build_config coverage
internal_investigation
@@ -68,10 +69,13 @@
cop_name = args.fetch(:cop) do
warn 'usage: bundle exec rake new_cop[Department/Name]'
exit!
end
- generator = RuboCop::Cop::Generator.new(cop_name)
+ github_user = `git config github.user`.chop
+ github_user = 'your_id' if github_user.empty?
+
+ generator = RuboCop::Cop::Generator.new(cop_name, github_user)
generator.write_source
generator.write_spec
generator.inject_require(root_file_path: 'lib/rubocop/cop/rspec_cops.rb')
generator.inject_config(config_file_path: 'config/default.yml')