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 +4 -4
- data/lib/notifiable/apns/grocer/stream.rb +5 -1
- data/lib/notifiable/apns/grocer/version.rb +1 -1
- data/spec/grocer_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81729dc0fc60be1069aadd8c321ffb3d51fd2904
|
4
|
+
data.tar.gz: 811ae14c2a604c90acf5605e49ad16d477de56c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
}
|
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.
|
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-
|
12
|
+
date: 2014-09-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: notifiable-rails
|