lib/rubocop/extension/generator/generator.rb in rubocop-extension-generator-0.3.0 vs lib/rubocop/extension/generator/generator.rb in rubocop-extension-generator-0.4.0
- old
+ new
@@ -24,12 +24,12 @@
RUBY
put "lib/#{dirname}/inject.rb", <<~RUBY
# frozen_string_literal: true
- # The original code is from https://github.com/rubocop-hq/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
- # See https://github.com/rubocop-hq/rubocop-rspec/blob/master/MIT-LICENSE.md
+ # The original code is from https://github.com/rubocop/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
+ # See https://github.com/rubocop/rubocop-rspec/blob/master/MIT-LICENSE.md
module RuboCop
module #{classname}
# Because RuboCop doesn't yet support plugins, we have to monkey patch in a
# bit of our configuration.
module Inject
@@ -120,13 +120,10 @@
cop_name = args.fetch(:cop) do
warn 'usage: bundle exec rake new_cop[Department/Name]'
exit!
end
- 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 = RuboCop::Cop::Generator.new(cop_name)
generator.write_source
generator.write_spec
generator.inject_require(root_file_path: '#{cops_file_name}')
generator.inject_config(config_file_path: 'config/default.yml')