c2dm 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,11 +2,11 @@ GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
4
  git (1.2.5)
5
- jeweler (1.5.1)
5
+ jeweler (1.5.2)
6
6
  bundler (~> 1.0.0)
7
7
  git (>= 1.2.5)
8
8
  rake
9
- rake (0.8.7)
9
+ rake (0.9.2)
10
10
  rcov (0.9.9)
11
11
  shoulda (2.11.3)
12
12
 
@@ -15,37 +15,41 @@ An Android device running 2.2 or newer, its registration token, and a google acc
15
15
  There are two ways to use c2dm.
16
16
 
17
17
  Sending many notifications:
18
- notifications = [
19
- {
20
- :registration_id => "...",
21
- :data => {
22
- :some_message => "Some payload"
23
- :another_message => 10
24
- },
25
- :collapse_key => "foobar" #optional
26
- }
27
- ]
28
-
29
- C2DM.send_notifications("someone@gmail.com", "and_their_password", notifications, "MyCompany-MyApp-1.0.0")
18
+ ```notifications = [
19
+ {
20
+ :registration_id => "...",
21
+ :data => {
22
+ :some_message => "Some payload"
23
+ :another_message => 10
24
+ },
25
+ :collapse_key => "foobar" #optional
26
+ }
27
+ ]
28
+
29
+ C2DM.send_notifications("someone@gmail.com", "and_their_password", notifications, "MyCompany-MyApp-1.0.0")```
30
30
 
31
31
  ...or one at a time:
32
- c2dm = C2DM.new("someone@gmail.com", "and_their_password", "MyCompany-MyApp-1.0")
33
-
34
- notification = {
35
- :registration_id => "...",
36
- :data => {
37
- :some_message => "Some payload"
38
- :another_message => 10
39
- },
40
- :collapse_key => "foobar" #optional
41
- }
32
+ ```c2dm = C2DM.new("someone@gmail.com", "and_their_password", "MyCompany-MyApp-1.0")
33
+
34
+ notification = {
35
+ :registration_id => "...",
36
+ :data => {
37
+ :some_message => "Some payload",
38
+ :another_message => 10
39
+ },
40
+ :collapse_key => "foobar" #optional
41
+ }
42
42
 
43
- c2dm.send_notification(notification)
43
+ c2dm.send_notification(notification)```
44
44
 
45
45
  ##Copyrights
46
46
 
47
47
  * Copyright (c) 2010-2011 Amro Mousa, Shawn Veader. See LICENSE.txt for details.
48
48
 
49
+ ##Thanks
50
+
51
+ * [Paul Chun](https://github.com/sixofhearts)
52
+
49
53
  ##Other stuff
50
54
 
51
55
  You might want to checkout GroupMe's fork of this gem as well.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{c2dm}
8
- s.version = "0.1.5"
8
+ s.version = "0.1.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Amro Mousa"]
12
- s.date = %q{2011-04-01}
12
+ s.date = %q{2011-06-23}
13
13
  s.description = %q{c2dm sends push notifications to Android devices via google c2dm.}
14
14
  s.email = %q{amromousa@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
32
32
  s.homepage = %q{http://github.com/amro/c2dm}
33
33
  s.licenses = ["MIT"]
34
34
  s.require_paths = ["lib"]
35
- s.rubygems_version = %q{1.5.2}
35
+ s.rubygems_version = %q{1.6.2}
36
36
  s.summary = %q{c2dm sends push notifications to Android devices via google c2dm.}
37
37
  s.test_files = [
38
38
  "test/helper.rb",
@@ -44,7 +44,7 @@ class C2DM
44
44
  response = self.class.post(AUTH_URL, params)
45
45
 
46
46
  # check for authentication failures
47
- raise response if response['Error=']
47
+ raise response.parsed_response if response['Error=']
48
48
 
49
49
  @auth_token = response.body.split("\n")[2].gsub('Auth=', '')
50
50
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: c2dm
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.5
5
+ version: 0.1.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Amro Mousa
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-01 00:00:00 -04:00
13
+ date: 2011-06-23 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -103,7 +103,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
103
  requirements:
104
104
  - - ">="
105
105
  - !ruby/object:Gem::Version
106
- hash: 382073877203318182
106
+ hash: -2874560584859296799
107
107
  segments:
108
108
  - 0
109
109
  version: "0"
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  requirements: []
117
117
 
118
118
  rubyforge_project:
119
- rubygems_version: 1.5.2
119
+ rubygems_version: 1.6.2
120
120
  signing_key:
121
121
  specification_version: 3
122
122
  summary: c2dm sends push notifications to Android devices via google c2dm.