module Pushpad

Public Class Methods

auth_token() click to toggle source
# File lib/pushpad.rb, line 13
def self.auth_token
  @@auth_token
end
auth_token=(auth_token) click to toggle source
# File lib/pushpad.rb, line 17
def self.auth_token=(auth_token)
  @@auth_token = auth_token
end
project_id() click to toggle source
# File lib/pushpad.rb, line 21
def self.project_id
  @@project_id
end
project_id=(project_id) click to toggle source
# File lib/pushpad.rb, line 25
def self.project_id=(project_id)
  @@project_id = project_id
end
signature_for(data) click to toggle source
# File lib/pushpad.rb, line 29
def self.signature_for(data)
  raise "You must set Pushpad.auth_token" unless Pushpad.auth_token
  OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), self.auth_token, data.to_s)
end