Class: RestShifter::Commands::Start
- Inherits:
-
Object
- Object
- RestShifter::Commands::Start
- Defined in:
- lib/rest_shifter/commands/start.rb
Class Method Summary collapse
- .run(port = ARGV) ⇒ Object
- .run_secure(args = ARGV) ⇒ Object
- .run_secure_no_cert(port = ARGV) ⇒ Object
Class Method Details
.run(port = ARGV) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/rest_shifter/commands/start.rb', line 3 def run(port=ARGV) prepare_server Shifter.set :bind, '0.0.0.0' Shifter.set :port, port.to_i Shifter.run! end |
.run_secure(args = ARGV) ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rest_shifter/commands/start.rb', line 19 def run_secure(args=ARGV) port = args.shift crt = args.shift key = args.shift prepare_server Shifter.use Rack::SSL Shifter.set :bind, '0.0.0.0' Shifter.run_ssl! port, crt, key end |
.run_secure_no_cert(port = ARGV) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/rest_shifter/commands/start.rb', line 11 def run_secure_no_cert(port=ARGV) prepare_server Shifter.use Rack::SSL Shifter.set :bind, '0.0.0.0' Shifter.run_ssl! port.to_i, File.join(File.dirname(__FILE__), "fake_certs/localhost.cert"), File.join(File.dirname(__FILE__), "fake_certs/localhost.key") end |