Skip to content
Ruby API wrapper for Cloud Five push notification services
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Dead simple push notifications. This rubygem is just a very simple wrapper around the Cloud Five push notification API. With it (and an account on, you can painlessly schedule push notifications to android and ios devices from your server.


Add this line to your application's Gemfile:

gem 'cloud_five_push'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cloud_five_push


Global configuration:

CloudFivePush.api_key = "my_api_key"

Sending a notification immediately to all your users:

CloudFivePush.broadcast! "Hello from Cloud Five!"

Send a notification to just some of your users:

CloudFivePush.notify! "Hello from Cloud Five!", 'the-user-identifier'

CloudFivePush.notify! "Hello from Cloud Five!", ['one', 'another', 'the-third']

notification =
notification.alert = "Hello from Cloud Five"
notification.user_identifiers = [123, 345, ""] # Use whatever you registered with on the mobile app

Schedule a notification to be sent in the future:

CloudFivePush.broadcast! "Hello, everybody", + 3600 # 1 hour from now

CloudFivePush.notify! "Hello from Cloud Five!", 'the-user-identifier', + 3600

notification =
notification.alert = "Hello from Cloud Five"
notification.user_identifiers = [123, 345, ""]
notification.scheduled_at = + 3600

Send a notification with custom json payload

notification =
notification.alert = "Check out this foo"
notification.user_identifiers = 123 = {foo: "bar", bizz: "buzz"}

iOS Specific features

By default, all iOS notifications will be sent through the production APNs. To use the development service instead:

# set this globally, good for use in a local development server
CloudFivePush.aps_environment = :development

# or set it one-off
notification =
notification.alert = "testing, testing, 1 2 3"
notification.aps_environment = :development

You can also set the content-available flag if you have other plugins that rely on it:

notification =
notification.content_available = 1


  1. Fork it ( )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
You can’t perform that action at this time.