Class: Boring::Overcommit::BaseGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Boring::Overcommit::BaseGenerator
show all
- Defined in:
- lib/generators/boring/overcommit/base_generator.rb
Instance Method Summary
collapse
Instance Method Details
#add_git_hooks_with_overcommit ⇒ Object
26
27
28
29
30
31
32
33
34
|
# File 'lib/generators/boring/overcommit/base_generator.rb', line 26
def add_git_hooks_with_overcommit
return if options[:skip_configuration]
say "\nInstalling git hooks to your project", :green
Bundler.with_unbundled_env do
run "bundle exec overcommit --install"
end
end
|
#add_overcommit_gem ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/generators/boring/overcommit/base_generator.rb', line 14
def add_overcommit_gem
say "Adding overcommit gem", :green
if overcommit_gem_exists?
say "Overcommit gem is already installed!", :yellow
else
Bundler.with_unbundled_env do
run "bundle add overcommit --group development,test"
end
end
end
|