multitenant_push 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84feda872678502fc3fa3c2b3ef432f2054aecb8
4
- data.tar.gz: 9df1ff56a15c1138c7701c9c2b26031bde0ed38f
3
+ metadata.gz: 55712d3f4d9b4fbd71a79e8dfd0699e2780b828a
4
+ data.tar.gz: b009c122845f8dfd4f41080b226dafbce9c1789a
5
5
  SHA512:
6
- metadata.gz: feb8ce4b81d232569cd38b2d98b65aa8f755f50cdb1137efd15b620e85c13f86bf867b67734f1e32d7dc312e2ce0bc650f45a8bcf589a7ee65febf86284b8338
7
- data.tar.gz: 437ee9b69be1d5b1d199bea8fa8fb5531daddaf63bbad4711db3b4e4cbe21b834f68e5232c9fd7b13aa44b36d52252f821ac9f4a09e56fa2e8ed55849089760f
6
+ metadata.gz: 6100d74c2e3400f32c5b157cfde9eb389dc0724392f58f8d3fe367eed332b5246cde4a2a6e0e6ef7a85ee199f6d3a2ca43d59e56e7d6ed686550a1fcf6afbcec
7
+ data.tar.gz: 980da3b9adaea7a18ceeeb2bf95828bee3cfe7fd3aeb8da25d65d5299f2308de4f4b5ba141936e73c5313cbc3290cffbbf0a606bef65819a893e20d47e570a69
@@ -3,6 +3,7 @@ APNS2 = APNS.clone
3
3
 
4
4
  module MultitenantPush
5
5
  module APNS
6
+ include APNS2
6
7
 
7
8
  def self.send_notification(device_token, message)
8
9
  self.load_credentials()
@@ -11,7 +12,7 @@ module MultitenantPush
11
12
 
12
13
  def self.send_notifications(notifications)
13
14
  self.load_credentials()
14
- APNS2.send_notification(device_token, message)
15
+ APNS2.send_notifications(notifications)
15
16
  end
16
17
 
17
18
  def self.feedback
@@ -29,9 +30,9 @@ module MultitenantPush
29
30
 
30
31
 
31
32
  def self.load_credentials
32
- raise NoTenantCredentials if Tenant.current_tenant.nil?
33
+ raise NoTenant if Tenant.current_tenant.nil?
33
34
  credentials = Credential.first
34
- raise NoTenant if credentials.nil? || credentials.apns_host.blank? || credentials.apns_pass.blank?
35
+ raise NoTenantCredentials if credentials.nil? || credentials.apns_host.blank? || credentials.apns_pass.blank?
35
36
 
36
37
  APNS.host = credentials.apns_host
37
38
  APNS.pass = credentials.apns_pass
@@ -3,6 +3,7 @@ GCM2 = GCM.clone
3
3
 
4
4
  module MultitenantPush
5
5
  module GCM
6
+ include GCM2
6
7
 
7
8
  def self.send_notification( device_tokens, data)
8
9
  self.load_credentials()
@@ -19,9 +20,9 @@ module MultitenantPush
19
20
 
20
21
 
21
22
  def self.load_credentials
22
- raise NoTenantCredentials if Tenant.current_tenant.nil?
23
+ raise NoTenant if Tenant.current_tenant.nil?
23
24
  credentials = Credential.first
24
- raise NoTenant if credentials.nil? || credentials.gcm_host.blank? || credentials.gcm_key.blank?
25
+ raise NoTenantCredentials if credentials.nil? || credentials.gcm_host.blank? || credentials.gcm_key.blank?
25
26
 
26
27
  GCM.host = credentials.gcm_host
27
28
  GCM.pass = credentials.gcm_key
@@ -1,3 +1,3 @@
1
1
  module MultitenantPush
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multitenant_push
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - 2point0 Concepts
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-18 00:00:00.000000000 Z
12
+ date: 2014-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails