Class: SimpleApm::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- SimpleApm::Generators::InstallGenerator
- Defined in:
- lib/generators/simple_apm/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_default_config ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/generators/simple_apm/install_generator.rb', line 8 def add_default_config path = "#{Rails.root}/config/simple_apm.yml" if File.exist?(path) puts 'Skipping config/simple_apm.yml creation, as file already exists!' else puts 'Adding simple_apm default config file (config/simple_apm.yml)...' template 'config/simple_apm.yml', path end end |
#add_routes ⇒ Object
18 19 20 |
# File 'lib/generators/simple_apm/install_generator.rb', line 18 def add_routes route 'mount SimpleApm::Engine => "/apm"' end |