Class: Boring::Bullet::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/boring/bullet/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_bullet_gemObject



12
13
14
15
16
17
# File 'lib/generators/boring/bullet/install/install_generator.rb', line 12

def add_bullet_gem
  say "Adding bullet gem", :green
  Bundler.with_unbundled_env do
    run "bundle add bullet --group development"
  end
end

#add_bullet_gem_configurationObject



19
20
21
22
23
24
# File 'lib/generators/boring/bullet/install/install_generator.rb', line 19

def add_bullet_gem_configuration
  return if options[:skip_configuration]

  say "Copying bullet.rb configuration to the initializer", :green
  template("bullet.rb", "config/initializers/bullet.rb")
end