Module: Grocer

Defined in:
lib/grocer.rb,
lib/grocer/pusher.rb,
lib/grocer/server.rb,
lib/grocer/version.rb,
lib/grocer/feedback.rb,
lib/grocer/connection.rb,
lib/grocer/ssl_server.rb,
lib/grocer/notification.rb,
lib/grocer/error_response.rb,
lib/grocer/ssl_connection.rb,
lib/grocer/push_connection.rb,
lib/grocer/feedback_connection.rb,
lib/grocer/notification_reader.rb,
lib/grocer/safari_notification.rb,
lib/grocer/passbook_notification.rb,
lib/grocer/newsstand_notification.rb,
lib/grocer/failed_delivery_attempt.rb,
lib/grocer/extensions/deep_symbolize_keys.rb,
lib/grocer/mobile_device_management_notification.rb

Defined Under Namespace

Modules: Extensions Classes: Connection, ErrorResponse, FailedDeliveryAttempt, Feedback, FeedbackConnection, MobileDeviceManagementNotification, NewsstandNotification, Notification, NotificationReader, PassbookNotification, PushConnection, Pusher, SSLConnection, SSLServer, SafariNotification, Server

Constant Summary collapse

Error =
Class.new(::StandardError)
InvalidFormatError =
Class.new(Error)
NoGatewayError =
Class.new(Error)
NoPayloadError =
Class.new(Error)
NoPortError =
Class.new(Error)
PayloadTooLargeError =
Class.new(Error)
CertificateExpiredError =
Module.new
InvalidCommandError =
Class.new(Error)
VERSION =
'0.6.0'

Class Method Summary collapse

Class Method Details

.envObject



24
25
26
# File 'lib/grocer.rb', line 24

def self.env
  ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development'
end

.feedback(options) ⇒ Object



28
29
30
31
# File 'lib/grocer.rb', line 28

def self.feedback(options)
  connection = FeedbackConnection.new(options)
  Feedback.new(connection)
end

.pusher(options) ⇒ Object



33
34
35
36
# File 'lib/grocer.rb', line 33

def self.pusher(options)
  connection = PushConnection.new(options)
  Pusher.new(connection)
end

.server(options = { }) ⇒ Object



38
39
40
41
# File 'lib/grocer.rb', line 38

def self.server(options = { })
  ssl_server = SSLServer.new(options)
  Server.new(ssl_server)
end