apnotic 1.7.2 → 1.8.0

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
  SHA256:
3
- metadata.gz: 7afbcc0c9a9fa876ff60430ae040d24b91d8d5e55808dd274f81bab1e2d1e918
4
- data.tar.gz: 85e7c9d84e759f6c020306103036e3afa8fe94d0acf4e1321c132bef00066ae9
3
+ metadata.gz: d2c8f08a0d9451a3c53a3bbce9f7f102e7916cdb7eade84bc648309b491fa422
4
+ data.tar.gz: 8872c23306319b2e1d10ad18c95f212e1999e0c44d2be38eaa2027a8b081485a
5
5
  SHA512:
6
- metadata.gz: 569b7b8d3dba2e149ad4f6dd6056123d288a5cdd93acb0739ba39b18345f6b0d1e68335c33f6f8e43a772a67dccefaf084bf2e854b23ebf20582950301294733
7
- data.tar.gz: be11e416771518cd8d56ff25ec3bb3679a27f1f1fbdbec7105d3d9e90ca600bbe50118b6d097d5b5145dcbbae95c3bbe74c5d39d276af5952e7c59cb4f8dcfc6
6
+ metadata.gz: 49f376853dd12d3e54e264711974d734b1d3b46aff3407f0c78322ecfff749d5e2d82d2b37a5d3f53466734dd7ea4077b266ed3f077c03ca1869afcdceec895b
7
+ data.tar.gz: ec58ef110e9ff5b675bb451e7b9cc9420b86d28042a04ab629cfe7f6ab083db983b4fdba0752f6a2d8200556b9b4f0f4f4a5fbb5cfb169ab7c42df0efc734720
@@ -7,9 +7,9 @@ jobs:
7
7
  runs-on: ubuntu-latest
8
8
  strategy:
9
9
  matrix:
10
- ruby-version: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2']
10
+ ruby-version: ['3.2', '3.3', '3.4', '4.0']
11
11
  steps:
12
- - uses: actions/checkout@v2
12
+ - uses: actions/checkout@v6
13
13
  - name: Set up Ruby
14
14
  uses: ruby/setup-ruby@v1
15
15
  with:
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 3.2.1
1
+ ruby 3.4.5
data/README.md CHANGED
@@ -1,5 +1,4 @@
1
1
  [![Build Status](https://github.com/ostinelli/apnotic/actions/workflows/ci.yml/badge.svg)](https://github.com/ostinelli/apnotic/actions/workflows/ci.yml)
2
- [![Code Climate](https://codeclimate.com/github/ostinelli/apnotic/badges/gpa.svg)](https://codeclimate.com/github/ostinelli/apnotic)
3
2
  [![Gem Version](https://badge.fury.io/rb/apnotic.svg)](https://badge.fury.io/rb/apnotic)
4
3
 
5
4
  # Apnotic
@@ -43,6 +42,8 @@ token = "6c267f26b173cd9595ae2f6702b1ab560371a60e7c8a9e27419bd0fa4a42e58f"
43
42
 
44
43
  notification = Apnotic::Notification.new(token)
45
44
  notification.alert = "Notification from Apnotic!"
45
+ notification.topic = "com.example.myapp" # your identifier found on https://developer.apple.com/account/resources/identifiers/list
46
+
46
47
 
47
48
  # send (this is a blocking call)
48
49
  response = connection.push(notification)
@@ -71,6 +72,7 @@ token = "6c267f26b173cd9595ae2f6702b1ab560371a60e7c8a9e27419bd0fa4a42e58f"
71
72
 
72
73
  notification = Apnotic::Notification.new(token)
73
74
  notification.alert = "Notification from Apnotic!"
75
+ notification.topic = "com.example.myapp" # your identifier found on https://developer.apple.com/account/resources/identifiers/list
74
76
 
75
77
  # prepare push
76
78
  push = connection.prepare_push(notification)
@@ -417,6 +419,9 @@ Optionally, you may covert the p12 file to a pem file (this step is optional bec
417
419
  $ openssl pkcs12 -in cert.p12 -out apple_push_notification_production.pem -nodes -clcerts
418
420
  ```
419
421
 
422
+ If you see the error `PKCS12_parse: unsupported`, when attempting to create a connection, you might need to [re-encrypt your certificate](https://help.heroku.com/88GYDTB2/how-do-i-configure-openssl-to-allow-the-use-of-legacy-cryptographic-algorithms).
423
+
424
+
420
425
 
421
426
  ## Thread-Safety
422
427
  Apnotic is thread-safe. However, some caution is imperative:
data/apnotic.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.email = ["roberto@ostinelli.net"]
12
12
  spec.summary = %q{Apnotic is an Apple Push Notification gem able to provide instant feedback.}
13
13
  spec.homepage = "http://github.com/ostinelli/apnotic"
14
- spec.required_ruby_version = '>=2.4.0'
14
+ spec.required_ruby_version = '>= 3.2.0'
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
17
  spec.bindir = "exe"
@@ -19,9 +19,10 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency "net-http2", ">= 0.18.3", "< 2"
22
- spec.add_dependency "connection_pool", "~> 2"
22
+ spec.add_dependency "connection_pool", ">= 2", "< 4"
23
+ spec.add_dependency "base64"
23
24
 
24
25
  spec.add_development_dependency "bundler"
25
- spec.add_development_dependency "rake", ">= 12.3.3"
26
+ spec.add_development_dependency "rake", ">= 13.3.1"
26
27
  spec.add_development_dependency "rspec", "~> 3.0"
27
28
  end
@@ -8,7 +8,7 @@ module Apnotic
8
8
  def new(options={}, pool_options={})
9
9
  raise(LocalJumpError, "a block is needed when initializing an Apnotic::ConnectionPool") unless block_given?
10
10
 
11
- ::ConnectionPool.new(pool_options) do
11
+ ::ConnectionPool.new(**pool_options) do
12
12
  connection = Apnotic::Connection.new(options)
13
13
  yield(connection)
14
14
  connection
@@ -18,7 +18,7 @@ module Apnotic
18
18
  def development(options={}, pool_options={})
19
19
  raise(LocalJumpError, "a block is needed when initializing an Apnotic::ConnectionPool") unless block_given?
20
20
 
21
- ::ConnectionPool.new(pool_options) do
21
+ ::ConnectionPool.new(**pool_options) do
22
22
  connection = Apnotic::Connection.development(options)
23
23
  yield(connection)
24
24
  connection
@@ -1,3 +1,3 @@
1
1
  module Apnotic
2
- VERSION = '1.7.2'.freeze
2
+ VERSION = '1.8.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apnotic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.2
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Ostinelli
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-04-10 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: net-http2
@@ -34,16 +33,36 @@ dependencies:
34
33
  name: connection_pool
35
34
  requirement: !ruby/object:Gem::Requirement
36
35
  requirements:
37
- - - "~>"
36
+ - - ">="
38
37
  - !ruby/object:Gem::Version
39
38
  version: '2'
39
+ - - "<"
40
+ - !ruby/object:Gem::Version
41
+ version: '4'
40
42
  type: :runtime
41
43
  prerelease: false
42
44
  version_requirements: !ruby/object:Gem::Requirement
43
45
  requirements:
44
- - - "~>"
46
+ - - ">="
45
47
  - !ruby/object:Gem::Version
46
48
  version: '2'
49
+ - - "<"
50
+ - !ruby/object:Gem::Version
51
+ version: '4'
52
+ - !ruby/object:Gem::Dependency
53
+ name: base64
54
+ requirement: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ type: :runtime
60
+ prerelease: false
61
+ version_requirements: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
47
66
  - !ruby/object:Gem::Dependency
48
67
  name: bundler
49
68
  requirement: !ruby/object:Gem::Requirement
@@ -64,14 +83,14 @@ dependencies:
64
83
  requirements:
65
84
  - - ">="
66
85
  - !ruby/object:Gem::Version
67
- version: 12.3.3
86
+ version: 13.3.1
68
87
  type: :development
69
88
  prerelease: false
70
89
  version_requirements: !ruby/object:Gem::Requirement
71
90
  requirements:
72
91
  - - ">="
73
92
  - !ruby/object:Gem::Version
74
- version: 12.3.3
93
+ version: 13.3.1
75
94
  - !ruby/object:Gem::Dependency
76
95
  name: rspec
77
96
  requirement: !ruby/object:Gem::Requirement
@@ -86,7 +105,6 @@ dependencies:
86
105
  - - "~>"
87
106
  - !ruby/object:Gem::Version
88
107
  version: '3.0'
89
- description:
90
108
  email:
91
109
  - roberto@ostinelli.net
92
110
  executables: []
@@ -120,7 +138,6 @@ homepage: http://github.com/ostinelli/apnotic
120
138
  licenses:
121
139
  - MIT
122
140
  metadata: {}
123
- post_install_message:
124
141
  rdoc_options: []
125
142
  require_paths:
126
143
  - lib
@@ -128,15 +145,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
128
145
  requirements:
129
146
  - - ">="
130
147
  - !ruby/object:Gem::Version
131
- version: 2.4.0
148
+ version: 3.2.0
132
149
  required_rubygems_version: !ruby/object:Gem::Requirement
133
150
  requirements:
134
151
  - - ">="
135
152
  - !ruby/object:Gem::Version
136
153
  version: '0'
137
154
  requirements: []
138
- rubygems_version: 3.0.3.1
139
- signing_key:
155
+ rubygems_version: 3.7.1
140
156
  specification_version: 4
141
157
  summary: Apnotic is an Apple Push Notification gem able to provide instant feedback.
142
158
  test_files: []