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 CHANGED
@@ -1 +1,2 @@
1
+ 0.1.6 Encoding for data values. Scandinavian characters now working.
1
2
  0.1.5 Initial release
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') do |p|
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"
@@ -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"
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-09}
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
@@ -8,4 +8,4 @@ namespace :c2dm do
8
8
  end
9
9
 
10
10
  end # notifications
11
- end # apn
11
+ end # c2dm
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: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 5
10
- version: 0.1.5
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-09 00:00:00 +02:00
18
+ date: 2010-12-20 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency