Class: AirbrakeGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/rails/generators/airbrake/airbrake_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



21
22
23
# File 'lib/rails/generators/airbrake/airbrake_generator.rb', line 21

def self.source_root
  @_airbrake_source_root ||= File.expand_path("../../../../../generators/airbrake/templates", __FILE__)
end

Instance Method Details

#installObject



25
26
27
28
29
30
31
32
# File 'lib/rails/generators/airbrake/airbrake_generator.rb', line 25

def install
  ensure_api_key_was_configured
  ensure_plugin_is_not_present
  append_capistrano_hook if capistrano_present?
  generate_initializer unless api_key_configured?
  determine_api_key if heroku?
  test_airbrake
end