Sha256: eb2b17f6f368f3410e7946892ee776fa47706ac95e1a7c444c50ddc6ba4732c5

Contents?: true

Size: 594 Bytes

Versions: 22

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'] || 5001
  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

22 entries across 22 versions & 2 rubygems

Version Path
em-rocketio-linda-client-1.1.1 test/app.rb
em-rocketio-linda-client-1.1.0 test/app.rb
sinatra-rocketio-linda-1.1.0 test/app.rb
sinatra-rocketio-linda-1.0.1 test/app.rb
em-rocketio-linda-client-1.0.0 test/app.rb
sinatra-rocketio-linda-1.0.0 test/app.rb
em-rocketio-linda-client-0.0.3 test/app.rb
sinatra-rocketio-linda-0.2.0 test/app.rb
sinatra-rocketio-linda-0.1.4 test/app.rb
sinatra-rocketio-linda-0.1.3 test/app.rb
sinatra-rocketio-linda-0.1.2 test/app.rb
sinatra-rocketio-linda-0.1.1 test/app.rb
sinatra-rocketio-linda-0.1.0 test/app.rb
em-rocketio-linda-client-0.0.2 test/app.rb
sinatra-rocketio-linda-0.0.9 test/app.rb
em-rocketio-linda-client-0.0.1 test/app.rb
sinatra-rocketio-linda-0.0.8 test/app.rb
sinatra-rocketio-linda-0.0.7 test/app.rb
sinatra-rocketio-linda-0.0.6 test/app.rb
sinatra-rocketio-linda-0.0.5 test/app.rb