11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/notify_user/channels/apns/apns_channel.rb', line 11
def deliver(notification, options={})
case NotifyUser.apns_provider
when :houston
NotifyUser::Houston.new(notification, options).push
when :urban_airship
if !ENV['DEV_UA_APPLICATION_KEY'].nil? && !ENV['DEV_UA_APPLICATION_SECRET'].nil? && !ENV['DEV_UA_MASTER_SECRET'].nil?
Urbanairship.application_key = ENV['DEV_UA_APPLICATION_KEY']
Urbanairship.application_secret = ENV['DEV_UA_APPLICATION_SECRET']
Urbanairship.master_secret = ENV['DEV_UA_MASTER_SECRET']
NotifyUser::UrbanAirship.new(notification).push
Urbanairship.application_key = ENV['UA_APPLICATION_KEY']
Urbanairship.application_secret = ENV['UA_APPLICATION_SECRET']
Urbanairship.master_secret = ENV['UA_MASTER_SECRET']
end
end
end
|