Sha256: 6eca1ab3b0fad4bf534660ed95d3ed427d1523b56aecb4f4e7bf504f586d2deb

Contents?: true

Size: 320 Bytes

Versions: 29

Compression:

Stored size: 320 Bytes

Contents

module Sinatra
  module WebSocketIO
    module Helpers

      def websocketio_js
        "#{env['rack.url_scheme']}://#{env['HTTP_HOST']}#{env['SCRIPT_NAME']}/websocketio/websocketio.js"
      end

      def websocketio_url
        "ws://#{env['SERVER_NAME']}:#{WebSocketIO.options[:port]}"
      end

    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
sinatra-websocketio-0.2.0 lib/sinatra-websocketio/helpers.rb
sinatra-websocketio-0.1.7 lib/sinatra-websocketio/helpers.rb
sinatra-websocketio-0.1.6 lib/sinatra-websocketio/helpers.rb
sinatra-websocketio-0.1.5 lib/sinatra-websocketio/helpers.rb
sinatra-websocketio-0.1.4 lib/sinatra-websocketio/helpers.rb
sinatra-websocketio-0.1.3 lib/sinatra-websocketio/helpers.rb
sinatra-websocketio-0.1.2 lib/sinatra-websocketio/helpers.rb
sinatra-websocketio-0.1.1 lib/sinatra-websocketio/helpers.rb
sinatra-websocketio-0.1.0 lib/sinatra-websocketio/helpers.rb