pushr-gcm 1.0.0.pre.3 → 1.0.0.pre.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pushr-gcm/version.rb +1 -1
- data/lib/pushr/daemon/gcm.rb +14 -5
- data/spec/lib/pushr/daemon/gcm_spec.rb +0 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55ef9497405d8415d4a814f670165a5542e8e89d
|
4
|
+
data.tar.gz: efe1a18d46c7d2205aa2ed5effb8a9af004539cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 155cb8dba85a0b4ef221274950c36a2eafebd5353ec7dd32e01deb228c3b3f5801bcba6f6e23e0356bb951596b788e2967cfa8b081963dee9660c662142f61c1
|
7
|
+
data.tar.gz: 8ae2dfcb65d580f13f75559dda231c94dc59ef9129fd383f6af07c363972f2bef0f1137a4bdefd4952e947ebf81ceec23f083061fcf3c8b142a7aece99142742
|
data/lib/pushr-gcm/version.rb
CHANGED
data/lib/pushr/daemon/gcm.rb
CHANGED
@@ -1,17 +1,26 @@
|
|
1
1
|
module Pushr
|
2
2
|
module Daemon
|
3
3
|
class Gcm
|
4
|
-
attr_accessor :configuration
|
4
|
+
attr_accessor :configuration, :handlers
|
5
|
+
|
5
6
|
def initialize(options)
|
6
|
-
|
7
|
+
@configuration = options
|
8
|
+
@handlers = []
|
7
9
|
end
|
8
10
|
|
9
|
-
def
|
10
|
-
|
11
|
+
def start
|
12
|
+
configuration.connections.times do |i|
|
13
|
+
connection = GcmSupport::ConnectionGcm.new(configuration, i + 1)
|
14
|
+
connection.connect
|
15
|
+
|
16
|
+
handler = MessageHandler.new("pushr:#{configuration.app}:#{configuration.name}", connection, configuration.app, i + 1)
|
17
|
+
handler.start
|
18
|
+
@handlers << handler
|
19
|
+
end
|
11
20
|
end
|
12
21
|
|
13
22
|
def stop
|
14
|
-
|
23
|
+
@handlers.map(&:stop)
|
15
24
|
end
|
16
25
|
end
|
17
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pushr-gcm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.
|
4
|
+
version: 1.0.0.pre.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Pesman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|