c2dm_on_rails 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -1,6 +1,13 @@
1
+ NOTICE:
2
+
3
+ This gem works only with Rails 2 and Ruby 1.8. I currently have time only for
4
+ bug fixes, so if somebody would make this work with Ruby 1.9/Rails 3, please
5
+ fork it and throw me a pull request, so I'll make a new branch and release a
6
+ new version to rubygems.
7
+
1
8
  h1. C2dm on Rails (Android push notifications on Rails)
2
9
 
3
- APN on Rails is a Ruby on Rails gem that allows you to easily add Apple Push Notification (iPhone)
10
+ C2dm on Rails is a Ruby on Rails gem that allows you to easily add Apple Push Notification (iPhone)
4
11
  support to your Rails application.
5
12
 
6
13
  C2dm on Rails is a Ruby on Rails gem that allows you to easily add Android push notification
@@ -9,13 +16,7 @@ C2dm on Rails is a Ruby on Rails gem that allows you to easily add Android push
9
16
  h2. Acknowledgements:
10
17
 
11
18
  This gem is under construction and is forked from our project. The developer
12
- has some allocated hours for developing the gem further. The gem is tested
13
- quite lightly and not in production environment yet.
14
-
15
- This gem is a re-write of a plugin that was written by Fabien Penso and Sam Soffes.
16
- Their plugin was a great start, but it just didn't quite reach the level I hoped it would.
17
- I've re-written, as a gem, added a ton of tests, and I would like to think that I made it
18
- a little nicer and easier to use.
19
+ has some allocated hours for developing the gem further.
19
20
 
20
21
  This gem is a re-write of a apn_on_rails gem that was written by Mark Bates and
21
22
  before he made it a gem, it was started by Fabien Penso and Sam Soffes. The gem
@@ -102,7 +103,7 @@ That's it, now you're ready to start creating notifications.
102
103
 
103
104
  h3. Upgrade Notes:
104
105
 
105
- If you are upgrading to a new version of APN on Rails you should always run:
106
+ If you are upgrading to a new version of C2dm on Rails you should always run:
106
107
 
107
108
  <pre><code>
108
109
  $ ruby script/generate c2dm_migrations
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.6') do |p|
5
+ Echoe.new('c2dm_on_rails', '0.1.7') 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,24 +2,23 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{c2dm_on_rails}
5
- s.version = "0.1.6"
5
+ s.version = "0.1.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Julius de Bruijn"]
9
- s.date = %q{2010-12-20}
8
+ s.authors = [%q{Julius de Bruijn}]
9
+ s.date = %q{2011-08-01}
10
10
  s.description = %q{Android push notifications on Rails.}
11
11
  s.email = %q{julius.debruijn@digia.com}
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"]
13
- s.files = ["CHANGELOG", "LICENSE", "Manifest", "README.textile", "Rakefile", "c2dm_on_rails.gemspec", "generators/c2dm_migrations_generator.rb", "generators/templates/c2dm_migrations/001_create_c2dm_devices.rb", "generators/templates/c2dm_migrations/002_create_c2dm_notifications.rb", "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"]
12
+ s.extra_rdoc_files = [%q{CHANGELOG}, %q{LICENSE}, %q{README.textile}, %q{lib/c2dm_on_rails.rb}, %q{lib/c2dm_on_rails/app/models/c2dm/base.rb}, %q{lib/c2dm_on_rails/app/models/c2dm/device.rb}, %q{lib/c2dm_on_rails/app/models/c2dm/notification.rb}, %q{lib/c2dm_on_rails/c2dm_on_rails.rb}, %q{lib/c2dm_on_rails/libs/connection.rb}, %q{lib/c2dm_on_rails/tasks/c2dm.rake}, %q{lib/c2dm_on_rails_tasks.rb}]
13
+ s.files = [%q{CHANGELOG}, %q{LICENSE}, %q{Manifest}, %q{README.textile}, %q{Rakefile}, %q{c2dm_on_rails.gemspec}, %q{generators/c2dm_migrations_generator.rb}, %q{generators/templates/c2dm_migrations/001_create_c2dm_devices.rb}, %q{generators/templates/c2dm_migrations/002_create_c2dm_notifications.rb}, %q{lib/c2dm_on_rails.rb}, %q{lib/c2dm_on_rails/app/models/c2dm/base.rb}, %q{lib/c2dm_on_rails/app/models/c2dm/device.rb}, %q{lib/c2dm_on_rails/app/models/c2dm/notification.rb}, %q{lib/c2dm_on_rails/c2dm_on_rails.rb}, %q{lib/c2dm_on_rails/libs/connection.rb}, %q{lib/c2dm_on_rails/tasks/c2dm.rake}, %q{lib/c2dm_on_rails_tasks.rb}]
14
14
  s.homepage = %q{http://github.com/pimeys/c2dm_on_rails}
15
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "C2dm_on_rails", "--main", "README.textile"]
16
- s.require_paths = ["lib"]
15
+ s.rdoc_options = [%q{--line-numbers}, %q{--inline-source}, %q{--title}, %q{C2dm_on_rails}, %q{--main}, %q{README.textile}]
16
+ s.require_paths = [%q{lib}]
17
17
  s.rubyforge_project = %q{c2dm_on_rails}
18
- s.rubygems_version = %q{1.3.7}
18
+ s.rubygems_version = %q{1.8.6}
19
19
  s.summary = %q{Android push notifications on Rails.}
20
20
 
21
21
  if s.respond_to? :specification_version then
22
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23
22
  s.specification_version = 3
24
23
 
25
24
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
@@ -36,7 +36,7 @@ class C2dm::Notification < C2dm::Base
36
36
  #
37
37
  # This can be run from the following Rake task:
38
38
  # $ rake c2dm:notifications:deliver
39
- def send_notifications(notifications = C2dm::Notification.all(:conditions => {:sent_at => nil}))
39
+ def send_notifications(notifications = C2dm::Notification.all(:conditions => {:sent_at => nil}, :joins => :device))
40
40
  unless notifications.nil? || notifications.empty?
41
41
  C2dm::Connection.open do |token|
42
42
  notifications.each do |noty|
@@ -14,7 +14,7 @@ end
14
14
 
15
15
  begin
16
16
  APP_CONFIG = YAML.load_file("#{RAILS_ROOT}/config/c2dm.yml")[rails_env]
17
- rescue ex
17
+ rescue => ex
18
18
  raise C2dm::Errors.ConfigFileNotFound.new(ex.message)
19
19
  end
20
20
 
@@ -23,7 +23,7 @@ begin
23
23
  configatron.c2dm.username = APP_CONFIG['username']
24
24
  configatron.c2dm.password = APP_CONFIG['password']
25
25
  configatron.c2dm.app_name = APP_CONFIG['app_name']
26
- rescue ex
26
+ rescue => ex
27
27
  raise C2dm::Errors.ConfigFileMissingAttributes.new(ex.message)
28
28
  end
29
29
 
@@ -134,6 +134,6 @@ end
134
134
  path = File.join(File.dirname(__FILE__), 'app', dir)
135
135
  $LOAD_PATH << path
136
136
  # puts "Adding #{path}"
137
- ActiveSupport::Dependencies.load_paths << path
138
- ActiveSupport::Dependencies.load_once_paths.delete(path)
137
+ ActiveSupport::Dependencies.autoload_paths << path
138
+ ActiveSupport::Dependencies.autoload_once_paths.delete(path)
139
139
  end
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: 23
5
- prerelease: false
4
+ hash: 21
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 6
10
- version: 0.1.6
9
+ - 7
10
+ version: 0.1.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Julius de Bruijn
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-20 00:00:00 +02:00
19
- default_executable:
18
+ date: 2011-08-01 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: gdata
@@ -86,7 +85,6 @@ files:
86
85
  - lib/c2dm_on_rails/libs/connection.rb
87
86
  - lib/c2dm_on_rails/tasks/c2dm.rake
88
87
  - lib/c2dm_on_rails_tasks.rb
89
- has_rdoc: true
90
88
  homepage: http://github.com/pimeys/c2dm_on_rails
91
89
  licenses: []
92
90
 
@@ -122,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
120
  requirements: []
123
121
 
124
122
  rubyforge_project: c2dm_on_rails
125
- rubygems_version: 1.3.7
123
+ rubygems_version: 1.8.6
126
124
  signing_key:
127
125
  specification_version: 3
128
126
  summary: Android push notifications on Rails.