Class: Bankai::Generators::LintGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/bankai/generators/lint_generator.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from Base

default_source_root

Instance Method Details

#configure_overcommitObject



9
10
11
# File 'lib/bankai/generators/lint_generator.rb', line 9

def configure_overcommit
  template 'overcommit.yml.erb', '.overcommit.yml'
end

#configure_rubocopObject



13
14
15
# File 'lib/bankai/generators/lint_generator.rb', line 13

def configure_rubocop
  template 'rubocop.yml.erb', '.rubocop.yml'
end

#install_overcommitObject



17
18
19
# File 'lib/bankai/generators/lint_generator.rb', line 17

def install_overcommit
  Bundler.with_clean_env { run 'bundle exec overcommit --install' }
end

#rubocop_autocorrectObject



21
22
23
# File 'lib/bankai/generators/lint_generator.rb', line 21

def rubocop_autocorrect
  Bundler.with_clean_env { run 'bundle exec rubocop --auto-correct' }
end