Module: Rapns
- Defined in:
- lib/rapns.rb,
lib/rapns/app.rb,
lib/rapns/push.rb,
lib/rapns/embed.rb,
lib/rapns/daemon.rb,
lib/rapns/logger.rb,
lib/rapns/gcm/app.rb,
lib/rapns/version.rb,
lib/rapns/apns/app.rb,
lib/rapns/upgraded.rb,
lib/rapns/reflection.rb,
lib/rapns/deprecation.rb,
lib/rapns/deprecatable.rb,
lib/rapns/notification.rb,
lib/rapns/apns/feedback.rb,
lib/rapns/apns_feedback.rb,
lib/rapns/configuration.rb,
lib/rapns/daemon/feeder.rb,
lib/rapns/daemon/delivery.rb,
lib/rapns/gcm/notification.rb,
lib/rapns/apns/notification.rb,
lib/rapns/daemon/app_runner.rb,
lib/rapns/multi_json_helper.rb,
lib/rapns/daemon/reflectable.rb,
lib/rapns/daemon/gcm/delivery.rb,
lib/rapns/daemon/apns/delivery.rb,
lib/rapns/daemon/delivery_error.rb,
lib/rapns/daemon/delivery_queue.rb,
lib/rapns/daemon/gcm/app_runner.rb,
lib/rapns/daemon/apns/app_runner.rb,
lib/rapns/daemon/apns/connection.rb,
lib/rapns/daemon/delivery_handler.rb,
lib/rapns/daemon/delivery_queue_18.rb,
lib/rapns/daemon/delivery_queue_19.rb,
lib/rapns/daemon/interruptible_sleep.rb,
lib/rapns/daemon/store/active_record.rb,
lib/rapns/daemon/gcm/delivery_handler.rb,
lib/rapns/daemon/apns/delivery_handler.rb,
lib/rapns/daemon/apns/feedback_receiver.rb,
lib/rapns/daemon/apns/disconnection_error.rb,
lib/rapns/gcm/payload_data_size_validator.rb,
lib/rapns/apns/binary_notification_validator.rb,
lib/rapns/apns/device_token_format_validator.rb,
lib/rapns/gcm/registration_ids_count_validator.rb,
lib/rapns/daemon/store/active_record/reconnectable.rb,
lib/rapns/gcm/expiry_collapse_key_mutual_inclusion_validator.rb
Defined Under Namespace
Modules: Apns, Daemon, Deprecatable, Gcm, MultiJsonHelper, Upgraded
Classes: App, Configuration, ConfigurationWithoutDefaults, DeliveryError, Deprecation, Logger, Notification, Reflections
Constant Summary
collapse
- VERSION =
'3.3.1'
- CONFIG_ATTRS =
[:foreground, :push_poll, :feedback_poll, :embedded,
:airbrake_notify, :check_for_errors, :pid_file, :batch_size,
:push, :store, :logger]
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
2
3
4
|
# File 'lib/rapns/configuration.rb', line 2
def self.config
@config ||= Rapns::Configuration.new
end
|
6
7
8
|
# File 'lib/rapns/configuration.rb', line 6
def self.configure
yield config if block_given?
end
|
.embed(options = {}) ⇒ Object
.jruby? ⇒ Boolean
31
32
33
|
# File 'lib/rapns.rb', line 31
def self.jruby?
defined? JRUBY_VERSION
end
|
.logger ⇒ Object
40
41
42
43
|
# File 'lib/rapns.rb', line 40
def self.logger
@logger ||= Logger.new(:foreground => Rapns.config.foreground,
:airbrake_notify => Rapns.config.airbrake_notify)
end
|
.logger=(logger) ⇒ Object
45
46
47
|
# File 'lib/rapns.rb', line 45
def self.logger=(logger)
@logger = logger
end
|
.push(options = {}) ⇒ Object
.reflect {|reflections| ... } ⇒ Object
2
3
4
|
# File 'lib/rapns/reflection.rb', line 2
def self.reflect
yield reflections if block_given?
end
|
.reflections ⇒ Object
6
7
8
|
# File 'lib/rapns/reflection.rb', line 6
def self.reflections
@reflections ||= Reflections.new
end
|
.require_for_daemon ⇒ Object
35
36
37
38
|
# File 'lib/rapns.rb', line 35
def self.require_for_daemon
require 'rapns/daemon'
require 'rapns/patches'
end
|