Module: Rapns
- Defined in:
- lib/rapns.rb,
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/daemon/batch.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/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/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/daemon/delivery_handler_collection.rb,
lib/rapns/gcm/registration_ids_count_validator.rb,
lib/rapns/daemon/apns/certificate_expired_error.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.4.0'
- CONFIG_ATTRS =
[:foreground, :push_poll, :feedback_poll, :embedded,
:airbrake_notify, :check_for_errors, :pid_file, :batch_size,
:push, :store, :logger, :batch_storage_updates]
Class Method Summary
collapse
Class Method Details
.attr_accessible_available? ⇒ Boolean
5
6
7
8
|
# File 'lib/rapns.rb', line 5
def self.attr_accessible_available?
require 'rails'
::Rails::VERSION::STRING < '4'
end
|
.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
38
39
40
|
# File 'lib/rapns.rb', line 38
def self.jruby?
defined? JRUBY_VERSION
end
|
.logger ⇒ Object
47
48
49
50
|
# File 'lib/rapns.rb', line 47
def self.logger
@logger ||= Logger.new(:foreground => Rapns.config.foreground,
:airbrake_notify => Rapns.config.airbrake_notify)
end
|
.logger=(logger) ⇒ Object
52
53
54
|
# File 'lib/rapns.rb', line 52
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
42
43
44
45
|
# File 'lib/rapns.rb', line 42
def self.require_for_daemon
require 'rapns/daemon'
require 'rapns/patches'
end
|