apnotic 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.tool-versions +1 -0
- data/.travis.yml +5 -2
- data/README.md +4 -1
- data/apnotic.gemspec +2 -2
- data/lib/apnotic/connection.rb +2 -2
- data/lib/apnotic/notification.rb +5 -1
- data/lib/apnotic/version.rb +1 -1
- metadata +14 -16
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5ae71d53585d79f023006333f32688ff88ccf7ae92c3c639831ece42a05a2de3
|
4
|
+
data.tar.gz: a4b9ba46513dfb766c303d9ba72ad99e0db0122258967414f34e7c0236aa53bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55d81b9a2d59f19f6725cc1f7f163769123b91bfe84a4b1517810d6c8f3f6b533a12e66c535f9337a81356957c426388eb361551075b646d6b1ac34e61145e89
|
7
|
+
data.tar.gz: 6ee59aada3067fc897c259d9a8c41c6fd94c6ac68e3d1e2e7bed402aa7284bdf51fe67dad7a428f4583fe82257b85e06bf680320d3c57e8bd2d12cca8da172b1
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 2.7.1
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -86,7 +86,7 @@ end
|
|
86
86
|
connection.push_async(push)
|
87
87
|
|
88
88
|
# wait for all requests to be completed
|
89
|
-
connection.join
|
89
|
+
connection.join(timeout: 5)
|
90
90
|
|
91
91
|
# close the connection
|
92
92
|
connection.close
|
@@ -315,6 +315,9 @@ These are all Accessor attributes.
|
|
315
315
|
| `category` | "
|
316
316
|
| `custom_payload` | "
|
317
317
|
| `thread_id` | "
|
318
|
+
| `target_content_id` | "
|
319
|
+
| `interruption_level` | Refer to [Payload Key Reference](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification#2943363) for details. iOS 15+
|
320
|
+
| `relevance_score` | Refer to [Payload Key Reference](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification#2943363) for details. iOS 15+
|
318
321
|
| `apns_id` | Refer to [Communicating with APNs](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for details.
|
319
322
|
| `expiration` | "
|
320
323
|
| `priority` | "
|
data/apnotic.gemspec
CHANGED
@@ -18,10 +18,10 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "net-http2", ">= 0.18", "< 2"
|
21
|
+
spec.add_dependency "net-http2", ">= 0.18.3", "< 2"
|
22
22
|
spec.add_dependency "connection_pool", "~> 2"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler"
|
25
|
-
spec.add_development_dependency "rake", "
|
25
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
26
26
|
spec.add_development_dependency "rspec", "~> 3.0"
|
27
27
|
end
|
data/lib/apnotic/connection.rb
CHANGED
data/lib/apnotic/notification.rb
CHANGED
@@ -4,7 +4,8 @@ module Apnotic
|
|
4
4
|
|
5
5
|
class Notification < AbstractNotification
|
6
6
|
attr_accessor :alert, :badge, :sound, :content_available, :category, :custom_payload, :url_args, :mutable_content, :thread_id
|
7
|
-
|
7
|
+
attr_accessor :target_content_id, :interruption_level, :relevance_score
|
8
|
+
|
8
9
|
def background_notification?
|
9
10
|
aps.count == 1 && aps.key?('content-available') && aps['content-available'] == 1
|
10
11
|
end
|
@@ -21,6 +22,9 @@ module Apnotic
|
|
21
22
|
result.merge!('url-args' => url_args) if url_args
|
22
23
|
result.merge!('mutable-content' => mutable_content) if mutable_content
|
23
24
|
result.merge!('thread-id' => thread_id) if thread_id
|
25
|
+
result.merge!('target-content-id' => target_content_id) if target_content_id
|
26
|
+
result.merge!('interruption-level' => interruption_level) if interruption_level
|
27
|
+
result.merge!('relevance-score' => relevance_score) if relevance_score
|
24
28
|
end
|
25
29
|
end
|
26
30
|
|
data/lib/apnotic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apnotic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Ostinelli
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-http2
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.18.3
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '2'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 0.18.3
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '2'
|
@@ -62,16 +62,16 @@ dependencies:
|
|
62
62
|
name: rake
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - "
|
65
|
+
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
67
|
+
version: 12.3.3
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - "
|
72
|
+
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
74
|
+
version: 12.3.3
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rspec
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,7 +86,7 @@ dependencies:
|
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '3.0'
|
89
|
-
description:
|
89
|
+
description:
|
90
90
|
email:
|
91
91
|
- roberto@ostinelli.net
|
92
92
|
executables: []
|
@@ -95,8 +95,7 @@ extra_rdoc_files: []
|
|
95
95
|
files:
|
96
96
|
- ".gitignore"
|
97
97
|
- ".rspec"
|
98
|
-
- ".
|
99
|
-
- ".ruby-version"
|
98
|
+
- ".tool-versions"
|
100
99
|
- ".travis.yml"
|
101
100
|
- Gemfile
|
102
101
|
- LICENSE.md
|
@@ -121,7 +120,7 @@ homepage: http://github.com/ostinelli/apnotic
|
|
121
120
|
licenses:
|
122
121
|
- MIT
|
123
122
|
metadata: {}
|
124
|
-
post_install_message:
|
123
|
+
post_install_message:
|
125
124
|
rdoc_options: []
|
126
125
|
require_paths:
|
127
126
|
- lib
|
@@ -136,9 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
135
|
- !ruby/object:Gem::Version
|
137
136
|
version: '0'
|
138
137
|
requirements: []
|
139
|
-
|
140
|
-
|
141
|
-
signing_key:
|
138
|
+
rubygems_version: 3.1.2
|
139
|
+
signing_key:
|
142
140
|
specification_version: 4
|
143
141
|
summary: Apnotic is an Apple Push Notification gem able to provide instant feedback.
|
144
142
|
test_files: []
|
data/.ruby-gemset
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
apnotic
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby-2.3.1
|