mercurius 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/mercurius/apns/connection.rb +6 -0
- data/lib/mercurius/apns.rb +4 -5
- data/lib/mercurius/version.rb +1 -1
- data/spec/lib/apns_spec.rb +4 -4
- data/spec/lib/gcm_service_spec.rb +1 -1
- 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: 4de527c701af4d667d9f2faefe38feb819745e59
|
4
|
+
data.tar.gz: b6a80534b22197f71f66211884c6b33a90c23e35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7340a047c92fd8aa5d0e7ccd006789ba989f6b9c740591e5ac19246a0ea5818fe1a7210ba2cf77f89272e4eb70b383bdb5668611a1cc295018efd739164a9c8b
|
7
|
+
data.tar.gz: 321d03a0ede631f0a4a114c5456c9ee9c2a71ae08aebf4c050fe6f529b3b2b6a33e0f54a181c29a66e0c05d1e8c0ec1101b3ed0c68c171ba653715b8cbd0a570
|
data/README.md
CHANGED
@@ -41,11 +41,11 @@ You can deliver the gcm_notification in the following manners:
|
|
41
41
|
|
42
42
|
The typical APNS configuration is set automatically, but you need to set the host with with either:
|
43
43
|
|
44
|
-
APNS.
|
44
|
+
APNS.mode = :development # gateway.sandbox.push.apple.com
|
45
45
|
|
46
46
|
or
|
47
47
|
|
48
|
-
APNS.
|
48
|
+
APNS.mode = :production # gateway.push.apple.com
|
49
49
|
|
50
50
|
Next, you'll need to set your PEM information. This can either be with a file or with a text buffer:
|
51
51
|
|
data/lib/mercurius/apns.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module APNS
|
2
2
|
HOSTS = {
|
3
|
-
|
3
|
+
development: 'gateway.sandbox.push.apple.com',
|
4
4
|
production: 'gateway.push.apple.com',
|
5
5
|
}
|
6
6
|
|
@@ -11,10 +11,9 @@ module APNS
|
|
11
11
|
class << self
|
12
12
|
attr_accessor :host, :port, :pem
|
13
13
|
|
14
|
-
def
|
15
|
-
|
16
|
-
|
17
|
-
@host = host
|
14
|
+
def mode=(mode)
|
15
|
+
raise InvalidApnsModeError.new unless HOSTS.include? mode.to_sym
|
16
|
+
@host = HOSTS[mode.to_sym]
|
18
17
|
end
|
19
18
|
|
20
19
|
end
|
data/lib/mercurius/version.rb
CHANGED
data/spec/lib/apns_spec.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
describe APNS do
|
2
2
|
|
3
|
-
it 'sets up the
|
4
|
-
APNS.
|
5
|
-
expect(APNS.host).to eq APNS::HOSTS[:
|
3
|
+
it 'sets up the development mode' do
|
4
|
+
APNS.mode = :development
|
5
|
+
expect(APNS.host).to eq APNS::HOSTS[:development]
|
6
6
|
end
|
7
7
|
|
8
8
|
it 'sets up the production mode' do
|
9
|
-
APNS.
|
9
|
+
APNS.mode = :production
|
10
10
|
expect(APNS.host).to eq APNS::HOSTS[:production]
|
11
11
|
end
|
12
12
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mercurius
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Beck
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|