Class: Pasu::Application
- Inherits:
-
Cuba
- Object
- Cuba
- Pasu::Application
- Defined in:
- lib/pasu/application.rb
Class Method Summary collapse
Class Method Details
.default_settings ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/pasu/application.rb', line 17 def default_settings { directory: Pathname.pwd, recursive: true, dotfiles: true, upload: false, basic_auth: {}, host: '0.0.0.0', port: 8080, handler: 'Puma' } end |
.run ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/pasu/application.rb', line 30 def run rack_handler = Rack::Handler.get(settings[:handler]) rack_handler.run( self, Host: settings[:host], Port: settings[:port], Verbose: true ) end |
.setup(options = {}) ⇒ Object
11 12 13 14 15 |
# File 'lib/pasu/application.rb', line 11 def setup( = {}) settings.merge!(default_settings) settings.merge!() setup_basic_auth end |