websocket-driver 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.2.2 / 2013-08-04
2
+
3
+ * Fix bug in EventEmitter#listener_count for unregistered events
4
+
1
5
  ### 0.2.1 / 2013-07-05
2
6
 
3
7
  * Queue sent messages if the client has not begun trying to connect
@@ -33,8 +33,12 @@ module WebSocket
33
33
  end
34
34
 
35
35
  def listener_count(event)
36
- list = @listeners[event.to_s]
37
- list && list.size
36
+ return 0 unless @listeners.has_key?(event.to_s)
37
+ @listeners[event.to_s].size
38
+ end
39
+
40
+ def listeners(event)
41
+ @listeners[event.to_s]
38
42
  end
39
43
  end
40
44
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: websocket-driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-05 00:00:00.000000000 Z
12
+ date: 2013-08-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine