c2dm_on_rails 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -0
- data/Rakefile +1 -1
- data/c2dm_on_rails.gemspec +2 -2
- data/lib/c2dm_on_rails/libs/connection.rb +2 -1
- data/lib/c2dm_on_rails/tasks/c2dm.rake +1 -1
- metadata +4 -4
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('c2dm_on_rails', '0.1.
|
5
|
+
Echoe.new('c2dm_on_rails', '0.1.6') do |p|
|
6
6
|
p.description = "Android push notifications on Rails."
|
7
7
|
p.url = "http://github.com/pimeys/c2dm_on_rails"
|
8
8
|
p.author = "Julius de Bruijn"
|
data/c2dm_on_rails.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{c2dm_on_rails}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.6"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Julius de Bruijn"]
|
9
|
-
s.date = %q{2010-12-
|
9
|
+
s.date = %q{2010-12-20}
|
10
10
|
s.description = %q{Android push notifications on Rails.}
|
11
11
|
s.email = %q{julius.debruijn@digia.com}
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.textile", "lib/c2dm_on_rails.rb", "lib/c2dm_on_rails/app/models/c2dm/base.rb", "lib/c2dm_on_rails/app/models/c2dm/device.rb", "lib/c2dm_on_rails/app/models/c2dm/notification.rb", "lib/c2dm_on_rails/c2dm_on_rails.rb", "lib/c2dm_on_rails/libs/connection.rb", "lib/c2dm_on_rails/tasks/c2dm.rake", "lib/c2dm_on_rails_tasks.rb"]
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'gdata'
|
2
2
|
require 'net/https'
|
3
|
+
require 'uri'
|
3
4
|
|
4
5
|
module C2dm
|
5
6
|
module Connection
|
@@ -9,7 +10,7 @@ module C2dm
|
|
9
10
|
headers = { "Content-Type" => "application/x-www-form-urlencoded",
|
10
11
|
"Authorization" => "GoogleLogin auth=#{token}" }
|
11
12
|
|
12
|
-
message_data = noty.data.map{|k, v| "&data.#{k}=#{v}"}.reduce{|k, v| k + v}
|
13
|
+
message_data = noty.data.map{|k, v| "&data.#{k}=#{URI.escape(v)}"}.reduce{|k, v| k + v}
|
13
14
|
data = "registration_id=#{noty.device.registration_id}&collapse_key=#{noty.collapse_key}#{message_data}"
|
14
15
|
|
15
16
|
data = data + "&delay_while_idle" if noty.delay_while_idle
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: c2dm_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Julius de Bruijn
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-20 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|