Class: Hyperlaunch::Generators::RailsLintSetupGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Hyperlaunch::Generators::RailsLintSetupGenerator
- Defined in:
- lib/generators/hyperlaunch/rails_lint_setup/rails_lint_setup_generator.rb
Overview
Generates a rubocop config and pre push hook
Instance Method Summary collapse
Instance Method Details
#copy_rubocop_config ⇒ Object
11 12 13 |
# File 'lib/generators/hyperlaunch/rails_lint_setup/rails_lint_setup_generator.rb', line 11 def copy_rubocop_config copy_file 'rubocop.yml', '.rubocop.yml', force: true end |
#install_git_hook ⇒ Object
15 16 17 18 |
# File 'lib/generators/hyperlaunch/rails_lint_setup/rails_lint_setup_generator.rb', line 15 def install_git_hook template 'pre-push.erb', '.git/hooks/pre-push', force: true FileUtils.chmod('+x', '.git/hooks/pre-push') end |