Class: PulseToolbox::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- PulseToolbox::InstallGenerator
- Defined in:
- lib/generators/pulse_toolbox/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_route ⇒ Object
16 17 18 |
# File 'lib/generators/pulse_toolbox/install_generator.rb', line 16 def add_route route "mount PulseToolbox::Server::Monitoring, :at => '/monitoring'" end |
#create_initalizer ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/pulse_toolbox/install_generator.rb', line 5 def create_initalizer initializer("pulse_toolbox.rb") do data = "" data << "PulseToolbox.redis = Redis.new\n" data << "PulseToolbox::Server::Monitoring.use Rack::Auth::Basic do |username, password|\n" data << " username == 'admin' && password == 'secret'\n" data << "end\n" data end end |