Class: Trek::Generators::Install::RubocopGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Trek::Generators::Install::RubocopGenerator
- Includes:
- Helpers
- Defined in:
- lib/generators/trek/install/rubocop_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_gem ⇒ Object
14 15 16 17 |
# File 'lib/generators/trek/install/rubocop_generator.rb', line 14 def add_gem gem "rubocop-rspec", group: [:development, :test], require: false unless in_gemfile?("rubocop-rspec") run "bundle install --quiet", abort_on_failure: true end |
#copy_rubocop_config ⇒ Object
19 20 21 |
# File 'lib/generators/trek/install/rubocop_generator.rb', line 19 def copy_rubocop_config copy_file_at_root ".rubocop.yml" end |