Sha256: 54c7ed3b4f9c71f470b7155589d1f731107fe30d7d98f31eae351e08d97c696f

Contents?: true

Size: 594 Bytes

Versions: 6

Compression:

Stored size: 594 Bytes

Contents

class App

  def self.running
    @running ? true : false
  end

  def self.port
    ENV['PORT'] || 5000
  end

  def self.ws_port
    ENV['WS_PORT'] || 9000
  end

  def self.url
    "http://localhost:#{port}"
  end

  def self.websocketio_url
    "ws://localhost:#{ws_port}"
  end

  def self.cometio_url
    "http://localhost:#{port}/cometio/io"
  end

  def self.app_dir
    File.expand_path 'app', File.dirname(__FILE__)
  end

  def self.start
    return if running
    @running = true
    cmd = "cd #{app_dir} && WS_PORT=#{ws_port} rackup config.ru -p #{port}"
    system cmd
  end

end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
sinatra-rocketio-0.3.3 test/app.rb
sinatra-rocketio-0.3.2 test/app.rb
sinatra-rocketio-0.3.1 test/app.rb
sinatra-rocketio-0.3.0 test/app.rb
em-rocketio-client-0.1.2 test/app.rb
sinatra-rocketio-0.2.6 test/app.rb