c2dm_batch 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/c2dm_batch.gemspec +1 -1
- data/lib/c2dm_batch.rb +1 -0
- data/lib/c2dm_batch/core.rb +4 -1
- metadata +4 -4
data/c2dm_batch.gemspec
CHANGED
data/lib/c2dm_batch.rb
CHANGED
data/lib/c2dm_batch/core.rb
CHANGED
@@ -7,9 +7,10 @@ module C2dmBatch
|
|
7
7
|
@source = nil
|
8
8
|
|
9
9
|
@hydra = Typhoeus::Hydra.new
|
10
|
+
@logger = Logger.new(STDOUT)
|
10
11
|
|
11
12
|
class << self
|
12
|
-
attr_accessor :auth_url, :send_url, :email, :password, :source
|
13
|
+
attr_accessor :auth_url, :send_url, :email, :password, :source, :logger
|
13
14
|
end
|
14
15
|
|
15
16
|
def self.authenticate!
|
@@ -64,7 +65,9 @@ module C2dmBatch
|
|
64
65
|
if response.success?
|
65
66
|
if response.body =~ /Error=(\w+)/
|
66
67
|
errors << { :registration_id => notification[:registration_id], :error => $1 }
|
68
|
+
@logger.info("Error sending: #{pp notification}")
|
67
69
|
else
|
70
|
+
@logger.info("Sent notification: #{pp notification}")
|
68
71
|
requests.delete(request)
|
69
72
|
end
|
70
73
|
elsif response.code == 503
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: c2dm_batch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alex Rockwell
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-10-
|
18
|
+
date: 2011-10-13 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|