class Recipes::Bullet
Public Instance Methods
bullet_config()
click to toggle source
# File lib/potassium/recipes/bullet.rb, line 18 def bullet_config application bullet_after_initialize, env: "development" insert_into_file "app/jobs/application_job.rb", bullet_application_job_config, before: "end" end
create()
click to toggle source
# File lib/potassium/recipes/bullet.rb, line 2 def create gather_gem 'bullet' recipe = self after(:gem_install) do recipe.bullet_config end end
install()
click to toggle source
# File lib/potassium/recipes/bullet.rb, line 14 def install create end
installed?()
click to toggle source
# File lib/potassium/recipes/bullet.rb, line 10 def installed? gem_exists?(/bullet/) end
Private Instance Methods
bullet_after_initialize()
click to toggle source
# File lib/potassium/recipes/bullet.rb, line 25 def bullet_after_initialize <<~RUBY config.after_initialize do Bullet.enable = true Bullet.alert = true Bullet.bullet_logger = true Bullet.console = true Bullet.rails_logger = true Bullet.add_footer = true end RUBY end
bullet_application_job_config()
click to toggle source
# File lib/potassium/recipes/bullet.rb, line 38 def bullet_application_job_config " include Bullet::ActiveJob if Rails.env.development?\n" end