viaduct-webpush 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79f4047fad65b0886d126655ce6ed34a0570028f
4
- data.tar.gz: e375862818d3424875da28e003686396902de8c3
3
+ metadata.gz: 68a2a41d5df78be44fa3670824cb3d7b03261b03
4
+ data.tar.gz: 8ae99d9af3dd5d8acef7fb1ef98033a315a3a634
5
5
  SHA512:
6
- metadata.gz: 6e0ed7ae59ed0895f75c92f1ec7c97a8c0d1ab404acc215ad042358ed7f3bc48a2a652af3148b814b2a7fb272928621a8fab3ae0e18612301975aaea2b961f1c
7
- data.tar.gz: be83004eff45e0b50a89b6b696093c8c982051371ba8425872edef4ded2924fcb2d1c5571e817fecb8be11add2a8d5d0abc4a463970019d5f4eb5da82e912bb0
6
+ metadata.gz: c7d07579a2aed3b305beeda7b485245863c5cd9aa6cdd7cb93d2dd658ff5bc2996be1e1dbadaf59835acc83d2c2e1a3f5b2622585e2fba13e3ffb363bfa7157c
7
+ data.tar.gz: 221fcd9d30f4d7a17a6255bb0206d1935223c0705471a911c8aad75282d58d369fa4e94fde30482a8f43508b7e3cd4ebf29dbfe92da95d68f88788b8549674ec
@@ -6,11 +6,8 @@ module Viaduct
6
6
 
7
7
  attr_accessor :subscribed, :name, :bindings
8
8
 
9
- def initialize(name, connection)
9
+ def initialize(name)
10
10
  @name = name
11
- @connection = connection
12
- @bindings = Hash.new([])
13
- @subscribed = false
14
11
  end
15
12
 
16
13
  #
@@ -36,31 +33,6 @@ module Viaduct
36
33
  end
37
34
  end
38
35
 
39
- #
40
- # Bind some code to an incoming message on this channel
41
- #
42
- def bind(event, &block)
43
- @bindings[event] += [block]
44
- end
45
-
46
- #
47
- # Run the bindings for an event
48
- #
49
- def dispatch(event, data)
50
- @bindings[event].each do |binding|
51
- binding.call(data)
52
- end
53
- end
54
-
55
- #
56
- # Send request subscription for this channel from VWP
57
- #
58
- def register
59
- return if @subscibed || global?
60
- signature = self.class.generate_signature(@connection.session_id, @name)
61
- @connection.register_subscription(@name, signature)
62
- end
63
-
64
36
  #
65
37
  # Trigger a single even on a given channel
66
38
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viaduct-webpush
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-12 00:00:00.000000000 Z
11
+ date: 2015-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -115,3 +115,4 @@ signing_key:
115
115
  specification_version: 4
116
116
  summary: A client library for the Viaduct WebPush API.
117
117
  test_files: []
118
+ has_rdoc: