class Pixhibitee::Command
Public Instance Methods
start()
click to toggle source
# File lib/pixhibitee/command.rb, line 20 def start web_server_thread = Thread.new do if options[:public] start_public_server else start_private_server end end Launchy.open("http://localhost:#{port}") unless options[:silent] web_server_thread.join end
version()
click to toggle source
# File lib/pixhibitee/command.rb, line 12 def version puts Pixhibitee::VERSION end
Private Instance Methods
port()
click to toggle source
# File lib/pixhibitee/command.rb, line 33 def port options[:port] || "4567" end
start_private_server()
click to toggle source
# File lib/pixhibitee/command.rb, line 37 def start_private_server Pixhibitee::App.run! end
start_public_server()
click to toggle source
# File lib/pixhibitee/command.rb, line 41 def start_public_server Rack::Server.start({ :config => File.join(File.dirname(__FILE__), "../../config.ru"), :Host => "0.0.0.0", :Port => port, }) end