Sha256: 222d62819c580806764b64789d28644f12f4eda520e3963289ec3c852e3698df
Contents?: true
Size: 1.12 KB
Versions: 2
Compression:
Stored size: 1.12 KB
Contents
require "fwt_push_notification_server/engine" require 'notifier/base' require 'notifier/apns' require 'notifier/gcm' module FwtPushNotificationServer mattr_accessor :api_controller_class mattr_accessor :authentication_filter @@authentication_filter = :authenticate_user! mattr_accessor :user_class mattr_accessor :user_key @@user_key = :user_id mattr_accessor :apns_gateway @@apns_gateway = 'sandbox.push.apple.com' mattr_accessor :apns_certificate mattr_accessor :apns_passphrase mattr_accessor :gcm_api_key def self.configure yield self end ### # Push Notifications ### mattr_accessor :notifiers @@notifiers = { :apns => Notifier::APNS.new, :gcm => Notifier::GCM.new } def self.apns_config { :gateway => apns_gateway, :certificate => apns_certificate, :passphrase => apns_passphrase } end def self.begin_transaction(message) notifiers.each_value do |notifier| notifier.begin_transaction(message) end end def self.commit_transaction notifiers.each_value do |notifier| notifier.commit_transaction end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fwt_push_notification_server-0.0.7 | lib/fwt_push_notification_server.rb |
fwt_push_notification_server-0.0.7.b4 | lib/fwt_push_notification_server.rb |