Skip to content

guenter/pushit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pushit

Pushit sends push notifications to mobile devices.

Why another gem?

There are some gems that let you do push notifications but I wasn’t fully satisfied with them.

The main design goals of this gem are:

  • Easy to use DSL

  • Not an AR plugin

  • Extensible architecture to support other mobile devices.

How to use

Pushit.config.apple_certificate = File.read('your_apn_cert.pem')
Pushit.config.environment = :production	# The default is :development, which will use the sandbox servers.

Pushit.deliver do |n|
  n.device_type :iPhone
  n.device_token '<42234223 42234223 42234223 42234223 42234223 42234223 42234223 42234223>'
  n.alert '3 new messages!'
  n.badge 3
  n.sound 'foo.aiff'
  n.custom_data {'foo' => 'bar'}
end

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2010 Tobi Knaup. See LICENSE for details.

About

Pushit sends push notifications to mobile devices.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages