notifiable-apns-grocer 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f5537d92347ad5a37bc4ae04b6c7fc4c9bbca8c6
4
- data.tar.gz: 93d2e11cb8211e4c5656956bddcb92edbd75b367
3
+ metadata.gz: 81729dc0fc60be1069aadd8c321ffb3d51fd2904
4
+ data.tar.gz: 811ae14c2a604c90acf5605e49ad16d477de56c2
5
5
  SHA512:
6
- metadata.gz: 5655edb4828761e49684635d7e2efe7c2530deb789c6f866e5c2b41d24152f43fe529a8f3656b7b2b28094a8621fe04ee6735494f0e6d6c63d9232befdc2ea63
7
- data.tar.gz: f8f643619041942c244fef93b762c3bd057778e2149eb245bd6a6fd7a8440ec34d1ffab5fc6e3e0dec7b4e38749a7272885bbcadd66e06ff79cd9deba4b5eb9f
6
+ metadata.gz: 8097aaff2dfc5971b0bfc994938404cfff294d83d734ad9b6db7dbc5452145fcadf71721cdeb751146bd6fe4deb7c96a9eaadf2ad3f000ed93dda2307df0a36e
7
+ data.tar.gz: 1435d4d30d38b2129788a7ed6c7aa02ca584bfb51566fd86933a4c707fcf895d447b47cf25828cd170d67bcf6c42efa27d973d12f397e8633137474b2dfe891c
@@ -45,11 +45,15 @@ module Notifiable
45
45
  end
46
46
 
47
47
  private
48
+ def sandbox?
49
+ self.sandbox.eql? "1"
50
+ end
51
+
48
52
  def gateway_config
49
53
  {
50
54
  certificate: self.certificate,
51
55
  passphrase: self.passphrase,
52
- gateway: self.test_env? ? "localhost" : self.sandbox ? "gateway.sandbox.push.apple.com" : "gateway.push.apple.com",
56
+ gateway: self.test_env? ? "localhost" : self.sandbox? ? "gateway.sandbox.push.apple.com" : "gateway.push.apple.com",
53
57
  port: 2195,
54
58
  retries: 3
55
59
  }
@@ -1,7 +1,7 @@
1
1
  module Notifiable
2
2
  module Apns
3
3
  module Grocer
4
- VERSION = "0.9.0"
4
+ VERSION = "0.9.1"
5
5
  end
6
6
  end
7
7
  end
data/spec/grocer_spec.rb CHANGED
@@ -37,4 +37,14 @@ describe Notifiable::Apns::Grocer::Stream do
37
37
  }
38
38
  end
39
39
 
40
+ it "works using production gateway" do
41
+
42
+ g = Notifiable::Apns::Grocer::Stream.new(Rails.env, n1)
43
+ a.configuration = {:apns => {:sandbox => "0"}} # This is how production is configured
44
+ a.configure(:apns, g)
45
+
46
+ expect(g.send(:sandbox?)).to be_false
47
+
48
+ end
49
+
40
50
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notifiable-apns-grocer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kamil Kocemba
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-09 00:00:00.000000000 Z
12
+ date: 2014-09-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: notifiable-rails