faye-websocket 0.10.2 → 0.10.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of faye-websocket might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88b64bb31b27e5c1784847e0863ed2d5bb31f3ac
4
- data.tar.gz: 9a1c4ab3691adff2d6675007147baa9f8bc10e56
3
+ metadata.gz: 071c3a535b7e31882686fe37a6ad5b1989f3bc2b
4
+ data.tar.gz: 51eb61ff82dce0cfa852e63fa49b9e478ecde669
5
5
  SHA512:
6
- metadata.gz: b9bba26e44b9096854a34b50bbae2306f46b89d47626a0a76fbae17e6ca7759cce366f8477f23db11b7d0f9c0945295385e2b75abd57a2ec07fbbfb8152ff296
7
- data.tar.gz: 54bb0acac9d51522c0977dcc5321f8581ba68f86714f1157bafd2a5f73de4cfffb7866518981daa9558c288fd0eff47df642ce44b5285bc2842c105eae446957
6
+ metadata.gz: b130c0c8692ad3eb2995f1e4176325d6aec8eba59c5477ab73d39d41a1d08c4f149477475b09556973e87f8487370432476b799f84aa053af2eb2dafdb4acbb5
7
+ data.tar.gz: b5dff2177705436fbe8bca454d3dff81e9d63604ee7527d5f78458fbe5348ee5d0b322c174ec969cedab2ff55c71361a9dcef58e91848399906b3d54ca41ba13
@@ -1,3 +1,7 @@
1
+ ### 0.10.3 / 2016-02-24
2
+
3
+ * Use `PATH_INFO` and `QUERY_STRING` rather than the non-standard `REQUEST_URI` from the Rack env
4
+
1
5
  ### 0.10.2 / 2015-11-26
2
6
 
3
7
  * Fix the `headers` and `status` methods on `Client`, which were broken in the
data/README.md CHANGED
@@ -490,7 +490,7 @@ end
490
490
 
491
491
  (The MIT License)
492
492
 
493
- Copyright (c) 2010-2015 James Coglan
493
+ Copyright (c) 2010-2016 James Coglan
494
494
 
495
495
  Permission is hereby granted, free of charge, to any person obtaining a copy of
496
496
  this software and associated documentation files (the 'Software'), to deal in
@@ -15,8 +15,7 @@ module Faye
15
15
  end
16
16
 
17
17
  def self.determine_url(env)
18
- scheme = WebSocket.secure_request?(env) ? 'https:' : 'http:'
19
- "#{ scheme }//#{ env['HTTP_HOST'] }#{ env['REQUEST_URI'] }"
18
+ WebSocket.determine_url(env, ['https', 'http'])
20
19
  end
21
20
 
22
21
  def initialize(env, options = {})
@@ -27,9 +27,13 @@ module Faye
27
27
  'thin' => :Thin
28
28
  }
29
29
 
30
- def self.determine_url(env)
31
- scheme = secure_request?(env) ? 'wss:' : 'ws:'
32
- "#{ scheme }//#{ env['HTTP_HOST'] }#{ env['REQUEST_URI'] }"
30
+ def self.determine_url(env, schemes = ['wss', 'ws'])
31
+ scheme = schemes[secure_request?(env) ? 0 : 1]
32
+ host = env['HTTP_HOST']
33
+ path = env['PATH_INFO']
34
+ query = env['QUERY_STRING'].to_s
35
+
36
+ scheme + '://' + host + path + (query.empty? ? '' : '?' + query)
33
37
  end
34
38
 
35
39
  def self.ensure_reactor_running
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faye-websocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Coglan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-26 00:00:00.000000000 Z
11
+ date: 2016-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -215,7 +215,7 @@ files:
215
215
  - lib/faye/websocket/api/event.rb
216
216
  - lib/faye/websocket/api/event_target.rb
217
217
  - lib/faye/websocket/client.rb
218
- homepage: http://github.com/faye/faye-websocket-ruby
218
+ homepage: https://github.com/faye/faye-websocket-ruby
219
219
  licenses:
220
220
  - MIT
221
221
  metadata: {}
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  version: '0'
240
240
  requirements: []
241
241
  rubyforge_project:
242
- rubygems_version: 2.4.5.1
242
+ rubygems_version: 2.5.1
243
243
  signing_key:
244
244
  specification_version: 4
245
245
  summary: Standards-compliant WebSocket server and client