c2dm 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.markdown +5 -1
  2. data/VERSION +1 -1
  3. data/c2dm.gemspec +1 -1
  4. data/lib/c2dm.rb +4 -0
  5. metadata +2 -2
@@ -44,4 +44,8 @@ Sending many notifications:
44
44
 
45
45
  ##Copyrights
46
46
 
47
- * Copyright (c) 2010-2011 Amro Mousa. See LICENSE.txt for details.
47
+ * Copyright (c) 2010-2011 Amro Mousa. See LICENSE.txt for details.
48
+
49
+ ##Other stuff
50
+
51
+ You might want to checkout GroupMe's fork of this gem as well.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{c2dm}
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
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,6 +12,10 @@ class C2DM
12
12
  DEFAULT_SOURCE = 'MyCompany-MyAppName-1.0'
13
13
 
14
14
  def initialize(username, password, source = DEFAULT_SOURCE)
15
+ auth(username, password, source)
16
+ end
17
+
18
+ def auth(username, password, source)
15
19
  post_body = "accountType=HOSTED_OR_GOOGLE&Email=#{username}&Passwd=#{password}&service=ac2dm&source=#{source}"
16
20
  params = {
17
21
  :body => post_body,
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: c2dm
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.3
5
+ version: 0.1.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Amro Mousa
@@ -103,7 +103,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
103
  requirements:
104
104
  - - ">="
105
105
  - !ruby/object:Gem::Version
106
- hash: 4436036205569639874
106
+ hash: -2523248155411028688
107
107
  segments:
108
108
  - 0
109
109
  version: "0"