Module: Pntfr
- Defined in:
- lib/pntfr/version.rb,
lib/pntfr.rb,
lib/pntfr/feedback.rb,
lib/pntfr/notifier.rb,
lib/pntfr/test_ext.rb,
lib/pntfr/platforms.rb,
lib/pntfr/session/ios.rb,
lib/pntfr/base_service.rb,
lib/pntfr/notification.rb,
lib/pntfr/session/base.rb,
lib/pntfr/session/android.rb,
lib/pntfr/apns_configurator.rb,
lib/pntfr/session/gcm_response.rb,
lib/pntfr/session/base_response.rb,
lib/pntfr/session/success_response.rb
Overview
Encapsulates the content of a notification in a neutral maneer. For each platform it can return the notification in the corresponding format using #to_platform like methods (i.e. #to_ios)
Defined Under Namespace
Modules: ApnsConfigurator, Platforms, Session Classes: BadDevice, BaseService, Configuration, Feedback, Notification, Notifier
Constant Summary collapse
- VERSION =
PATCH v0.6.1
- FIX
-
Correct Pntfr::Feedbak initialization when credentials are not from arguments.
-
Depend upon apns2 0.0.2 which removes a useless call to puts.
MINOR v0.6.0
- FEATURE
-
Retrieve feedback on bad devices for apns.
-
Depend on minitest for development.
PATCH v0.5.3
- FIX
-
Depend on apns2 gem to be connection failure tolerant during big batches.
PATCH v0.5.2
-
Fix. [FIX] Increase badge independently for each device.
PATCH v0.5.1
-
Use increment! instead of increment when incrementing badge on a device object
that quacks like ActiveRecord.
MINOR v0.5.0
-
Badge control now can use ActiveRecord’s increment method.
PATCH v0.4.1
-
Republish gem after gem yanking it.
MINOR v0.4.0
- FEATURE
-
When overriding ios credentials, merge over general configuration.
MINOR v0.3.0
-
Performance improvement: Allow sending one message to many devices in one
single call (on both platforms).
-
Allow overriding general configuration credentials when instantiating each
Notifier (on both platforms).
-
Internal refactoring.
'0.6.1'
- @@deliveries =
{}
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
- .add_delivery(push_id, n) ⇒ Object
- .configure {|config| ... } ⇒ Object
- .deliveries ⇒ Object
- .test_env? ⇒ Boolean
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
12 13 14 |
# File 'lib/pntfr.rb', line 12 def config @config end |
Class Method Details
.add_delivery(push_id, n) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/pntfr/test_ext.rb', line 10 def self.add_delivery push_id, n if @@deliveries.has_key?(push_id) @@deliveries[push_id] << n else @@deliveries[push_id]= [n] end end |
.configure {|config| ... } ⇒ Object
14 15 16 17 |
# File 'lib/pntfr.rb', line 14 def self.configure self.config ||= Configuration.new yield(config) end |
.deliveries ⇒ Object
7 8 9 |
# File 'lib/pntfr/test_ext.rb', line 7 def self.deliveries @@deliveries end |
.test_env? ⇒ Boolean
7 8 9 |
# File 'lib/pntfr.rb', line 7 def self.test_env? ENV['ENV'] == 'test' or (defined?(Rails) and Rails.env.test?) end |