nali 0.1.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,7 @@ Nali.extend Connection:
9
9
  @dispatcher = new WebSocket @Application.wsServer
10
10
  @dispatcher.onopen = ( event ) => @onOpen event
11
11
  @dispatcher.onclose = ( event ) => @onClose event
12
+ @dispatcher.onerror = ( event ) => @onError event
12
13
  @dispatcher.onmessage = ( event ) => @onMessage JSON.parse event.data
13
14
  @keepAlive()
14
15
  @
@@ -27,6 +28,9 @@ Nali.extend Connection:
27
28
  onClose: ( event ) ->
28
29
  @connected = false
29
30
  @trigger 'close'
31
+
32
+ onError: ( event ) ->
33
+ console.warn 'Connection error %O', event
30
34
 
31
35
  send: ( msg ) ->
32
36
  @open() unless @connected
@@ -2,6 +2,12 @@ module EventMachine
2
2
  module WebSocket
3
3
  class Connection
4
4
 
5
+ def reset
6
+ @filters = {}
7
+ @storage = {}
8
+ @watches = {}
9
+ end
10
+
5
11
  def filters( model_name )
6
12
  @filters ||= {}
7
13
  @filters[ model_name ] ||= []
data/lib/nali/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Nali
2
2
 
3
- VERSION = '0.1.9'
3
+ VERSION = '0.2.0'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nali
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: