faye-websocket 0.10.3 → 0.10.4

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: 071c3a535b7e31882686fe37a6ad5b1989f3bc2b
4
- data.tar.gz: 51eb61ff82dce0cfa852e63fa49b9e478ecde669
3
+ metadata.gz: 6fbd1159ad8b64ba0bc400f3a055c1e232605af0
4
+ data.tar.gz: b509699da5766504c7ae9d09df4f45689ca92073
5
5
  SHA512:
6
- metadata.gz: b130c0c8692ad3eb2995f1e4176325d6aec8eba59c5477ab73d39d41a1d08c4f149477475b09556973e87f8487370432476b799f84aa053af2eb2dafdb4acbb5
7
- data.tar.gz: b5dff2177705436fbe8bca454d3dff81e9d63604ee7527d5f78458fbe5348ee5d0b322c174ec969cedab2ff55c71361a9dcef58e91848399906b3d54ca41ba13
6
+ metadata.gz: e185f203d2283ced2859f58242549b506541afc5f67a97c694f7c0682cb6cd206afcad8ba62ddb5498fb333361ce57f216a3cfbe8c100cc94b7e312af176f36b
7
+ data.tar.gz: 536799ce4dbefa30ecdde546b33b715df3166f69d8fc48dc1ff33b8cbe7bb7703e05fafe6b31a08a707c2c1155c7fef0abdb3c74ea166e77fa9fd78949c9b318
@@ -1,3 +1,7 @@
1
+ ### 0.10.4 / 2016-05-20
2
+
3
+ * Amend warnings issued when running with -W2
4
+
1
5
  ### 0.10.3 / 2016-02-24
2
6
 
3
7
  * Use `PATH_INFO` and `QUERY_STRING` rather than the non-standard `REQUEST_URI` from the Rack env
@@ -29,6 +29,7 @@ class Thin::Connection
29
29
  alias :thin_receive_data :receive_data
30
30
 
31
31
  def process
32
+ @serving ||= nil
32
33
  if @serving != :websocket and @request.websocket?
33
34
  @serving = :websocket
34
35
  end
@@ -41,6 +42,7 @@ class Thin::Connection
41
42
  end
42
43
 
43
44
  def receive_data(data)
45
+ @serving ||= nil
44
46
  return thin_receive_data(data) unless @serving == :websocket
45
47
  socket_stream.receive(data) if socket_stream
46
48
  end
@@ -20,6 +20,8 @@ module Faye
20
20
  @connection = socket.env['em.connection']
21
21
  @stream_send = socket.env['stream.send']
22
22
 
23
+ @rack_hijack_io = @rack_hijack_io_reader = nil
24
+
23
25
  hijack_rack_socket
24
26
 
25
27
  @connection.socket_stream = self if @connection.respond_to?(:socket_stream)
@@ -72,6 +72,7 @@ module Faye
72
72
  @url = WebSocket.determine_url(@env)
73
73
 
74
74
  super(options) { ::WebSocket::Driver.rack(self, :max_length => options[:max_length], :protocols => protocols) }
75
+ @driver_started = false
75
76
 
76
77
  @stream = Stream.new(self)
77
78
 
@@ -36,6 +36,9 @@ module Faye
36
36
  @ping_id = 0
37
37
  @buffered_amount = 0
38
38
 
39
+ @close_params = @ping_timer = @proxy = @stream = nil
40
+ @onopen = @onmessage = @onclose = @onerror = nil
41
+
39
42
  @driver.on(:open) { |e| open }
40
43
  @driver.on(:message) { |e| receive_message(e.data) }
41
44
  @driver.on(:close) { |e| begin_close(e.reason, e.code) }
@@ -37,8 +37,7 @@ module Faye::WebSocket::API
37
37
  count = listener_count(event.type)
38
38
 
39
39
  unless listener or count > 0
40
- @buffers ||= Hash.new { |k,v| k[v] = [] }
41
- @buffers[event.type].push(event)
40
+ event_buffers[event.type].push(event)
42
41
  end
43
42
 
44
43
  listener.call(event) if listener
@@ -48,10 +47,14 @@ module Faye::WebSocket::API
48
47
  private
49
48
 
50
49
  def flush(event_type, listener)
51
- if buffer = @buffers && @buffers.delete(event_type.to_s)
50
+ if buffer = event_buffers.delete(event_type.to_s)
52
51
  buffer.each { |event| listener.call(event) }
53
52
  end
54
53
  end
55
54
 
55
+ def event_buffers
56
+ @event_buffers ||= Hash.new { |k,v| k[v] = [] }
57
+ end
58
+
56
59
  end
57
60
  end
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.3
4
+ version: 0.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Coglan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-24 00:00:00.000000000 Z
11
+ date: 2016-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -73,9 +73,6 @@ dependencies:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: 2.0.0
76
- - - "<"
77
- - !ruby/object:Gem::Version
78
- version: 2.15.0
79
76
  type: :development
80
77
  prerelease: false
81
78
  version_requirements: !ruby/object:Gem::Requirement
@@ -83,9 +80,6 @@ dependencies:
83
80
  - - ">="
84
81
  - !ruby/object:Gem::Version
85
82
  version: 2.0.0
86
- - - "<"
87
- - !ruby/object:Gem::Version
88
- version: 2.15.0
89
83
  - !ruby/object:Gem::Dependency
90
84
  name: rack
91
85
  requirement: !ruby/object:Gem::Requirement