web-push 1.0.0 → 3.0.1

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.
data/lib/web_push.rb CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  require 'openssl'
4
4
  require 'base64'
5
- require 'hkdf'
5
+ require 'jwt'
6
+ require 'uri'
6
7
  require 'net/http'
7
8
  require 'json'
8
9
 
@@ -11,7 +12,6 @@ require 'web_push/errors'
11
12
  require 'web_push/vapid_key'
12
13
  require 'web_push/encryption'
13
14
  require 'web_push/request'
14
- require 'web_push/railtie' if defined?(Rails)
15
15
 
16
16
  # Push API implementation
17
17
  #
@@ -34,7 +34,6 @@ module WebPush
34
34
  # @param options [Hash<Symbol,String>] additional options for the notification
35
35
  # @option options [#to_s] :ttl Time-to-live in seconds
36
36
  # @option options [#to_s] :urgency Urgency can be very-low, low, normal, high
37
- # rubocop:disable Metrics/ParameterLists
38
37
  def payload_send(message: '', endpoint:, p256dh: '', auth: '', vapid: {}, **options)
39
38
  WebPush::Request.new(
40
39
  message: message,
@@ -43,7 +42,6 @@ module WebPush
43
42
  **options
44
43
  ).perform
45
44
  end
46
- # rubocop:enable Metrics/ParameterLists
47
45
 
48
46
  # Generate a VapidKey instance to obtain base64 encoded public and private keys
49
47
  # suitable for VAPID protocol JSON web token signing
data/spec/spec_helper.rb CHANGED
@@ -1,8 +1,7 @@
1
- $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
2
- require 'pry'
3
1
  require 'web_push'
4
2
  require 'webmock/rspec'
5
3
  require 'simplecov'
4
+
6
5
  WebMock.disable_net_connect!(allow_localhost: true)
7
6
  SimpleCov.start
8
7
 
@@ -4,9 +4,7 @@ describe WebPush::Encryption do
4
4
  describe '#encrypt' do
5
5
  let(:curve) do
6
6
  group = 'prime256v1'
7
- curve = OpenSSL::PKey::EC.new(group)
8
- curve.generate_key
9
- curve
7
+ OpenSSL::PKey::EC.generate(group)
10
8
  end
11
9
 
12
10
  let(:p256dh) do
@@ -67,10 +65,10 @@ describe WebPush::Encryption do
67
65
  content_encryption_key_info = "Content-Encoding: aes128gcm\0"
68
66
  nonce_info = "Content-Encoding: nonce\0"
69
67
 
70
- prk = HKDF.new(shared_secret, salt: client_auth_token, algorithm: 'SHA256', info: info).next_bytes(32)
68
+ prk = OpenSSL::KDF.hkdf(shared_secret, salt: client_auth_token, info: info, hash: 'SHA256', length: 32)
71
69
 
72
- content_encryption_key = HKDF.new(prk, salt: salt, info: content_encryption_key_info).next_bytes(16)
73
- nonce = HKDF.new(prk, salt: salt, info: nonce_info).next_bytes(12)
70
+ content_encryption_key = OpenSSL::KDF.hkdf(prk, salt: salt, info: content_encryption_key_info, hash: 'SHA256', length: 16)
71
+ nonce = OpenSSL::KDF.hkdf(prk, salt: salt, info: nonce_info, hash: 'SHA256', length: 12)
74
72
 
75
73
  decrypt_ciphertext(ciphertext, content_encryption_key, nonce)
76
74
  end
@@ -18,51 +18,6 @@ describe WebPush::Request do
18
18
  end
19
19
  end
20
20
 
21
- describe 'from :api_key' do
22
- def build_request_with_api_key(endpoint, options = {})
23
- subscription = {
24
- endpoint: endpoint,
25
- keys: {
26
- p256dh: 'p256dh',
27
- auth: 'auth'
28
- }
29
- }
30
- WebPush::Request.new(message: '', subscription: subscription, vapid: {}, **options)
31
- end
32
-
33
- it 'inserts Authorization header when api_key present, and endpoint is for Chrome\'s non-standards-compliant GCM endpoints' do
34
- request = build_request_with_api_key('https://gcm-http.googleapis.com/gcm/xyz', api_key: 'api_key')
35
-
36
- expect(request.headers['Authorization']).to eq('key=api_key')
37
- end
38
-
39
- it 'insert Authorization header for Chrome\'s new standards-compliant endpoints, even if api_key is present' do
40
- request = build_request_with_api_key('https://fcm.googleapis.com/fcm/send/ABCD1234', api_key: 'api_key')
41
-
42
- expect(request.headers['Authorization']).to eq('key=api_key')
43
- end
44
-
45
- it 'does not insert Authorization header when endpoint is not for Chrome, even if api_key is present' do
46
- request = build_request_with_api_key('https://some.random.endpoint.com/xyz', api_key: 'api_key')
47
-
48
- expect(request.headers['Authorization']).to be_nil
49
- end
50
-
51
- it 'does not insert Authorization header when api_key blank' do
52
- request = build_request_with_api_key('endpoint', api_key: nil)
53
-
54
- expect(request.headers['Authorization']).to be_nil
55
-
56
- request = build_request_with_api_key('endpoint', api_key: '')
57
-
58
- expect(request.headers['Authorization']).to be_nil
59
-
60
- request = build_request_with_api_key('endpoint')
61
-
62
- expect(request.headers['Authorization']).to be_nil
63
- end
64
- end
65
-
66
21
  describe 'from :ttl' do
67
22
  it 'can override Ttl with :ttl option with string' do
68
23
  request = build_request(ttl: '300')
@@ -91,7 +46,7 @@ describe WebPush::Request do
91
46
  time = Time.at(1_476_150_897)
92
47
  jwt_payload = {
93
48
  aud: 'https://fcm.googleapis.com',
94
- exp: time.to_i + 24 * 60 * 60,
49
+ exp: time.to_i + 12 * 60 * 60,
95
50
  sub: 'mailto:sender@example.com'
96
51
  }
97
52
  jwt_header_fields = { "typ": "JWT", "alg": "ES256" }
@@ -43,6 +43,35 @@ describe WebPush::VapidKey do
43
43
  expect(pem).to include('-----BEGIN PUBLIC KEY-----')
44
44
  end
45
45
 
46
+ it 'returns the correct public and private keys in pem format' do
47
+ public_key_base64 = 'BMA-wciFTkEq2waVGB2hg8cSyiRiMcsIvIYQb3LkLOmBheh3YC6NB2GtE9t6YgaXt428rp7bC9JjuPtAY9AQaR8='
48
+ private_key_base64 = '4MwLvN1Cpxe43AV9fa4BiS-SPp51gWlhv9c6bb_XSJ4='
49
+ key = WebPush::VapidKey.from_keys(public_key_base64, private_key_base64)
50
+ pem = key.to_pem
51
+ expected_pem = <<~PEM
52
+ -----BEGIN EC PRIVATE KEY-----
53
+ MHcCAQEEIODMC7zdQqcXuNwFfX2uAYkvkj6edYFpYb/XOm2/10ieoAoGCCqGSM49
54
+ AwEHoUQDQgAEwD7ByIVOQSrbBpUYHaGDxxLKJGIxywi8hhBvcuQs6YGF6HdgLo0H
55
+ Ya0T23piBpe3jbyuntsL0mO4+0Bj0BBpHw==
56
+ -----END EC PRIVATE KEY-----
57
+ -----BEGIN PUBLIC KEY-----
58
+ MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEwD7ByIVOQSrbBpUYHaGDxxLKJGIx
59
+ ywi8hhBvcuQs6YGF6HdgLo0HYa0T23piBpe3jbyuntsL0mO4+0Bj0BBpHw==
60
+ -----END PUBLIC KEY-----
61
+ PEM
62
+ expect(pem).to eq(expected_pem)
63
+ end
64
+
65
+ it 'can return the private key in pem format' do
66
+ pem = WebPush::VapidKey.new.private_key_to_pem
67
+ expect(pem).to include('-----BEGIN EC PRIVATE KEY-----')
68
+ end
69
+
70
+ it 'can return the public key in pem format' do
71
+ pem = WebPush::VapidKey.new.public_key_to_pem
72
+ expect(pem).to include('-----BEGIN PUBLIC KEY-----')
73
+ end
74
+
46
75
  it 'imports pem of public and private keys' do
47
76
  pem = WebPush::VapidKey.new.to_pem
48
77
  key = WebPush::VapidKey.from_pem pem
@@ -194,8 +194,8 @@ describe WebPush do
194
194
  include_examples 'request headers with VAPID'
195
195
  end
196
196
 
197
- context 'chrome GCM endpoint: request headers with GCM api key' do
198
- let(:endpoint) { 'https://android.googleapis.com/gcm/send/subscription-id' }
197
+ context 'chrome endpoint: request headers without VAPID' do
198
+ let(:endpoint) { 'https://fcm.googleapis.com/fcm/subscription-id' }
199
199
  let(:expected_endpoint) { 'https://fcm.googleapis.com/fcm/subscription-id' }
200
200
 
201
201
  let(:message) { JSON.generate(body: 'body') }
@@ -221,7 +221,7 @@ describe WebPush do
221
221
  allow(WebPush::Encryption).to receive(:encrypt).and_return(payload)
222
222
  end
223
223
 
224
- subject { WebPush.payload_send(message: message, endpoint: endpoint, p256dh: p256dh, auth: auth, api_key: 'GCM_API_KEY') }
224
+ subject { WebPush.payload_send(message: message, endpoint: endpoint, p256dh: p256dh, auth: auth) }
225
225
 
226
226
  it 'calls the relevant service with the correct headers' do
227
227
  expect(WebPush::Encryption).to receive(:encrypt).and_return(payload)
@@ -247,7 +247,7 @@ describe WebPush do
247
247
  .with(body: nil, headers: expected_headers)
248
248
  .to_return(status: 201, body: '', headers: {})
249
249
 
250
- WebPush.payload_send(endpoint: endpoint, api_key: 'GCM_API_KEY')
250
+ WebPush.payload_send(endpoint: endpoint)
251
251
  end
252
252
  end
253
253
  end
data/web-push.gemspec CHANGED
@@ -3,6 +3,7 @@ require_relative 'lib/web_push/version'
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'web-push'
5
5
  spec.version = WebPush::VERSION
6
+ spec.license = 'MIT'
6
7
  spec.authors = ['zaru', 'collimarco']
7
8
  spec.email = ['support@pushpad.xyz']
8
9
 
@@ -11,15 +12,12 @@ Gem::Specification.new do |spec|
11
12
 
12
13
  spec.files = `git ls-files`.split("\n")
13
14
 
14
- spec.required_ruby_version = '>= 2.2'
15
+ spec.required_ruby_version = '>= 3.0'
15
16
 
16
- spec.add_dependency 'hkdf', '~> 0.2'
17
17
  spec.add_dependency 'jwt', '~> 2.0'
18
+ spec.add_dependency 'openssl', '~> 3.0'
18
19
 
19
- spec.add_development_dependency 'bundler', '>= 1.17.3'
20
- spec.add_development_dependency 'pry'
21
- spec.add_development_dependency 'rake', '>= 10.0'
22
20
  spec.add_development_dependency 'rspec', '~> 3.0'
23
- spec.add_development_dependency 'simplecov'
21
+ spec.add_development_dependency 'simplecov', '~> 0.0'
24
22
  spec.add_development_dependency 'webmock', '~> 3.0'
25
23
  end
metadata CHANGED
@@ -1,30 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web-push
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - zaru
8
8
  - collimarco
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-11-26 00:00:00.000000000 Z
12
+ date: 2023-11-13 00:00:00.000000000 Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: hkdf
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: '0.2'
21
- type: :runtime
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - "~>"
26
- - !ruby/object:Gem::Version
27
- version: '0.2'
28
14
  - !ruby/object:Gem::Dependency
29
15
  name: jwt
30
16
  requirement: !ruby/object:Gem::Requirement
@@ -40,47 +26,19 @@ dependencies:
40
26
  - !ruby/object:Gem::Version
41
27
  version: '2.0'
42
28
  - !ruby/object:Gem::Dependency
43
- name: bundler
29
+ name: openssl
44
30
  requirement: !ruby/object:Gem::Requirement
45
31
  requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: 1.17.3
49
- type: :development
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: 1.17.3
56
- - !ruby/object:Gem::Dependency
57
- name: pry
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: '0'
63
- type: :development
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- - !ruby/object:Gem::Dependency
71
- name: rake
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
32
+ - - "~>"
75
33
  - !ruby/object:Gem::Version
76
- version: '10.0'
77
- type: :development
34
+ version: '3.0'
35
+ type: :runtime
78
36
  prerelease: false
79
37
  version_requirements: !ruby/object:Gem::Requirement
80
38
  requirements:
81
- - - ">="
39
+ - - "~>"
82
40
  - !ruby/object:Gem::Version
83
- version: '10.0'
41
+ version: '3.0'
84
42
  - !ruby/object:Gem::Dependency
85
43
  name: rspec
86
44
  requirement: !ruby/object:Gem::Requirement
@@ -99,16 +57,16 @@ dependencies:
99
57
  name: simplecov
100
58
  requirement: !ruby/object:Gem::Requirement
101
59
  requirements:
102
- - - ">="
60
+ - - "~>"
103
61
  - !ruby/object:Gem::Version
104
- version: '0'
62
+ version: '0.0'
105
63
  type: :development
106
64
  prerelease: false
107
65
  version_requirements: !ruby/object:Gem::Requirement
108
66
  requirements:
109
- - - ">="
67
+ - - "~>"
110
68
  - !ruby/object:Gem::Version
111
- version: '0'
69
+ version: '0.0'
112
70
  - !ruby/object:Gem::Dependency
113
71
  name: webmock
114
72
  requirement: !ruby/object:Gem::Requirement
@@ -123,32 +81,22 @@ dependencies:
123
81
  - - "~>"
124
82
  - !ruby/object:Gem::Version
125
83
  version: '3.0'
126
- description:
84
+ description:
127
85
  email:
128
86
  - support@pushpad.xyz
129
87
  executables: []
130
88
  extensions: []
131
89
  extra_rdoc_files: []
132
90
  files:
91
+ - ".github/workflows/ci.yml"
133
92
  - ".gitignore"
134
- - ".rspec"
135
- - ".rubocop.yml"
136
- - ".travis.yml"
137
- - CHANGELOG.md
138
93
  - Gemfile
139
94
  - LICENSE
140
95
  - README.md
141
- - Rakefile
142
- - bin/console
143
- - bin/rake
144
- - bin/rspec
145
- - bin/setup
146
- - lib/tasks/web_push.rake
147
96
  - lib/web-push.rb
148
97
  - lib/web_push.rb
149
98
  - lib/web_push/encryption.rb
150
99
  - lib/web_push/errors.rb
151
- - lib/web_push/railtie.rb
152
100
  - lib/web_push/request.rb
153
101
  - lib/web_push/vapid_key.rb
154
102
  - lib/web_push/version.rb
@@ -159,9 +107,10 @@ files:
159
107
  - spec/web_push_spec.rb
160
108
  - web-push.gemspec
161
109
  homepage: https://github.com/pushpad/web-push
162
- licenses: []
110
+ licenses:
111
+ - MIT
163
112
  metadata: {}
164
- post_install_message:
113
+ post_install_message:
165
114
  rdoc_options: []
166
115
  require_paths:
167
116
  - lib
@@ -169,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
169
118
  requirements:
170
119
  - - ">="
171
120
  - !ruby/object:Gem::Version
172
- version: '2.2'
121
+ version: '3.0'
173
122
  required_rubygems_version: !ruby/object:Gem::Requirement
174
123
  requirements:
175
124
  - - ">="
@@ -177,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
126
  version: '0'
178
127
  requirements: []
179
128
  rubygems_version: 3.0.3.1
180
- signing_key:
129
+ signing_key:
181
130
  specification_version: 4
182
131
  summary: Web Push library for Ruby (RFC8030)
183
132
  test_files: []
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
data/.rubocop.yml DELETED
@@ -1,30 +0,0 @@
1
- require: rubocop-performance
2
-
3
- AllCops:
4
- Exclude:
5
- - 'bin/**/*'
6
-
7
- Metrics/AbcSize:
8
- Max: 20
9
-
10
- Metrics/ClassLength:
11
- Max: 100
12
-
13
- Metrics/ModuleLength:
14
- Max: 100
15
-
16
- Metrics/LineLength:
17
- Enabled: false
18
-
19
- Metrics/BlockLength:
20
- Exclude:
21
- - spec/**/*_spec.rb
22
-
23
- Lint/AmbiguousBlockAssociation:
24
- Enabled: false
25
-
26
- Style/Documentation:
27
- Enabled: false
28
-
29
- Style/IndentHeredoc:
30
- Enabled: false
data/.travis.yml DELETED
@@ -1,24 +0,0 @@
1
- env:
2
- global:
3
- - CC_TEST_REPORTER_ID=155202524386dfebe0c3267a5c868b5417ff4cc2cde8ed301fb36b177d46a458
4
- language: ruby
5
- rvm:
6
- - 2.2
7
- - 2.3
8
- - 2.4
9
- - 2.5
10
- - 2.6
11
- - 2.7
12
- before_install:
13
- - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
14
- - gem install bundler -v 1.17.3
15
- before_script:
16
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
17
- - chmod +x ./cc-test-reporter
18
- - ./cc-test-reporter before-build
19
- script: "bundle exec rake spec"
20
- after_script:
21
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
22
- addons:
23
- code_climate:
24
- repo_token: 155202524386dfebe0c3267a5c868b5417ff4cc2cde8ed301fb36b177d46a458
data/CHANGELOG.md DELETED
@@ -1,183 +0,0 @@
1
- # Changelog
2
-
3
- ## [v1.1.0](https://github.com/zaru/webpush/tree/v1.1.0) (2020-11-16)
4
-
5
- [Full Changelog](https://github.com/zaru/webpush/compare/v1.0.0...v1.1.0)
6
-
7
- **Merged pull requests:**
8
-
9
- - Eliminate Ruby 2.7 warnings. [\#95](https://github.com/zaru/webpush/pull/95) ([morgoth](https://github.com/morgoth))
10
- - set minimum ruby version is 2.2 [\#94](https://github.com/zaru/webpush/pull/94) ([Wolfer](https://github.com/Wolfer))
11
- - Add proxy support [\#93](https://github.com/zaru/webpush/pull/93) ([Bugagazavr](https://github.com/Bugagazavr))
12
- - fix syntax error [\#91](https://github.com/zaru/webpush/pull/91) ([tonytonyjan](https://github.com/tonytonyjan))
13
- - change dependency gem versions [\#88](https://github.com/zaru/webpush/pull/88) ([zaru](https://github.com/zaru))
14
-
15
- ## [v1.0.0](https://github.com/zaru/webpush/tree/v1.0.0) (2019-08-15)
16
-
17
- A stable version 1.0.0 has been released.
18
-
19
- Thanks @mohamedhafez, @mplatov and @MedetaiAkaru for everything!
20
-
21
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.3.8...v1.0.0)
22
-
23
- **Merged pull requests:**
24
-
25
- - switch to aes128gcm encoding [\#84](https://github.com/zaru/webpush/pull/84) ([mohamedhafez](https://github.com/mohamedhafez))
26
- - Fixed fcm spec [\#77](https://github.com/zaru/webpush/pull/77) ([zaru](https://github.com/zaru))
27
- - add fcm endpoints [\#76](https://github.com/zaru/webpush/pull/76) ([MedetaiAkaru](https://github.com/MedetaiAkaru))
28
- - Add Rubocop and fix [\#74](https://github.com/zaru/webpush/pull/74) ([zaru](https://github.com/zaru))
29
- - Fix TravisCI bundler version [\#73](https://github.com/zaru/webpush/pull/73) ([zaru](https://github.com/zaru))
30
-
31
- ## [v0.3.8](https://github.com/zaru/webpush/tree/v0.3.8) (2019-04-16)
32
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.3.7...v0.3.8)
33
-
34
- **Merged pull requests:**
35
-
36
- - Fix authorization header [\#72](https://github.com/zaru/webpush/pull/72) ([xronos-i-am](https://github.com/xronos-i-am))
37
-
38
- ## [v0.3.7](https://github.com/zaru/webpush/tree/v0.3.7) (2019-03-06)
39
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.3.6...v0.3.7)
40
-
41
- **Merged pull requests:**
42
-
43
- - Add PEM support to import / export keys [\#65](https://github.com/zaru/webpush/pull/65) ([collimarco](https://github.com/collimarco))
44
-
45
- ## [v0.3.6](https://github.com/zaru/webpush/tree/v0.3.6) (2019-01-09)
46
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.3.5...v0.3.6)
47
-
48
- **Merged pull requests:**
49
-
50
- - Added a error class to arguments of raise\_error [\#62](https://github.com/zaru/webpush/pull/62) ([zaru](https://github.com/zaru))
51
- - Fix TravisCI bundler version [\#61](https://github.com/zaru/webpush/pull/61) ([zaru](https://github.com/zaru))
52
- - Raise Webpush::Unauthorized on HTTP 403 [\#59](https://github.com/zaru/webpush/pull/59) ([collimarco](https://github.com/collimarco))
53
-
54
- ## [v0.3.5](https://github.com/zaru/webpush/tree/v0.3.5) (2019-01-02)
55
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.3.4...v0.3.5)
56
-
57
- **Merged pull requests:**
58
-
59
- - Fix \#55 and \#51: raise the proper error based on the HTTP status code [\#58](https://github.com/zaru/webpush/pull/58) ([collimarco](https://github.com/collimarco))
60
- - Add urgency option [\#57](https://github.com/zaru/webpush/pull/57) ([collimarco](https://github.com/collimarco))
61
- - Add Rake task to generate VAPID keys [\#54](https://github.com/zaru/webpush/pull/54) ([stevenharman](https://github.com/stevenharman))
62
-
63
- ## [v0.3.4](https://github.com/zaru/webpush/tree/v0.3.4) (2018-05-25)
64
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.3.3...v0.3.4)
65
-
66
- **Merged pull requests:**
67
-
68
- - add http timeout options [\#50](https://github.com/zaru/webpush/pull/50) ([aishek](https://github.com/aishek))
69
-
70
- ## [v0.3.3](https://github.com/zaru/webpush/tree/v0.3.3) (2017-11-06)
71
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.3.2...v0.3.3)
72
-
73
- **Merged pull requests:**
74
-
75
- - Add typ to JWT header fields [\#46](https://github.com/zaru/webpush/pull/46) ([ykzts](https://github.com/ykzts))
76
- - Specify the version of JWT strictly [\#45](https://github.com/zaru/webpush/pull/45) ([ykzts](https://github.com/ykzts))
77
-
78
- ## [v0.3.2](https://github.com/zaru/webpush/tree/v0.3.2) (2017-07-01)
79
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.3.1...v0.3.2)
80
-
81
- **Merged pull requests:**
82
-
83
- - feat: improve response error codes [\#39](https://github.com/zaru/webpush/pull/39) ([glennr](https://github.com/glennr))
84
- - Update README.md [\#38](https://github.com/zaru/webpush/pull/38) ([kitaindia](https://github.com/kitaindia))
85
- - Fix code example: Add close bracket [\#37](https://github.com/zaru/webpush/pull/37) ([kuranari](https://github.com/kuranari))
86
- - fix code in README [\#36](https://github.com/zaru/webpush/pull/36) ([kuranari](https://github.com/kuranari))
87
- - Minor fix in README: Close code blocks [\#32](https://github.com/zaru/webpush/pull/32) ([nicolas-fricke](https://github.com/nicolas-fricke))
88
- - Copy edits for README clarifying GCM requirements [\#30](https://github.com/zaru/webpush/pull/30) ([rossta](https://github.com/rossta))
89
- - Adding VAPID documentation [\#28](https://github.com/zaru/webpush/pull/28) ([rossta](https://github.com/rossta))
90
-
91
- ## [v0.3.1](https://github.com/zaru/webpush/tree/v0.3.1) (2016-10-24)
92
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.3.0...v0.3.1)
93
-
94
- **Merged pull requests:**
95
-
96
- - Bug fix invalid base64 [\#29](https://github.com/zaru/webpush/pull/29) ([rossta](https://github.com/rossta))
97
- - Clarify VAPID usage further in README [\#27](https://github.com/zaru/webpush/pull/27) ([rossta](https://github.com/rossta))
98
-
99
- ## [v0.3.0](https://github.com/zaru/webpush/tree/v0.3.0) (2016-10-14)
100
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.2.5...v0.3.0)
101
-
102
- **Merged pull requests:**
103
-
104
- - Implement VAPID authorization [\#26](https://github.com/zaru/webpush/pull/26) ([rossta](https://github.com/rossta))
105
-
106
- ## [v0.2.5](https://github.com/zaru/webpush/tree/v0.2.5) (2016-09-14)
107
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.2.4...v0.2.5)
108
-
109
- **Merged pull requests:**
110
-
111
- - api key only needed for old google apis [\#24](https://github.com/zaru/webpush/pull/24) ([mohamedhafez](https://github.com/mohamedhafez))
112
-
113
- ## [v0.2.4](https://github.com/zaru/webpush/tree/v0.2.4) (2016-08-29)
114
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.2.3...v0.2.4)
115
-
116
- **Merged pull requests:**
117
-
118
- - VERIFY\_PEER by default - no need for a cert\_store option [\#20](https://github.com/zaru/webpush/pull/20) ([mohamedhafez](https://github.com/mohamedhafez))
119
-
120
- ## [v0.2.3](https://github.com/zaru/webpush/tree/v0.2.3) (2016-06-19)
121
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.2.2...v0.2.3)
122
-
123
- **Merged pull requests:**
124
-
125
- - detect and handle response errors [\#18](https://github.com/zaru/webpush/pull/18) ([mohamedhafez](https://github.com/mohamedhafez))
126
-
127
- ## [v0.2.2](https://github.com/zaru/webpush/tree/v0.2.2) (2016-06-13)
128
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.2.1...v0.2.2)
129
-
130
- **Merged pull requests:**
131
-
132
- - Don't include API key for firefox or other browsers [\#16](https://github.com/zaru/webpush/pull/16) ([mohamedhafez](https://github.com/mohamedhafez))
133
- - Option to specify a cert store [\#15](https://github.com/zaru/webpush/pull/15) ([mohamedhafez](https://github.com/mohamedhafez))
134
- - show ttl option in README [\#14](https://github.com/zaru/webpush/pull/14) ([mohamedhafez](https://github.com/mohamedhafez))
135
-
136
- ## [v0.2.1](https://github.com/zaru/webpush/tree/v0.2.1) (2016-05-23)
137
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.2.0...v0.2.1)
138
-
139
- **Merged pull requests:**
140
-
141
- - Make the response more detailed. [\#10](https://github.com/zaru/webpush/pull/10) ([kevinjom](https://github.com/kevinjom))
142
-
143
- ## [v0.2.0](https://github.com/zaru/webpush/tree/v0.2.0) (2016-05-16)
144
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.1.6...v0.2.0)
145
-
146
- **Merged pull requests:**
147
-
148
- - Make message payload optional [\#8](https://github.com/zaru/webpush/pull/8) ([rossta](https://github.com/rossta))
149
- - Add specs [\#7](https://github.com/zaru/webpush/pull/7) ([rossta](https://github.com/rossta))
150
-
151
- ## [v0.1.6](https://github.com/zaru/webpush/tree/v0.1.6) (2016-05-12)
152
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.1.5...v0.1.6)
153
-
154
- **Merged pull requests:**
155
-
156
- - Add rake binstub [\#6](https://github.com/zaru/webpush/pull/6) ([rossta](https://github.com/rossta))
157
- - Add syntax highlighting to README snippets [\#5](https://github.com/zaru/webpush/pull/5) ([rossta](https://github.com/rossta))
158
- - Extract encryption module [\#4](https://github.com/zaru/webpush/pull/4) ([rossta](https://github.com/rossta))
159
- - Add some happy case specs [\#3](https://github.com/zaru/webpush/pull/3) ([waheedel](https://github.com/waheedel))
160
-
161
- ## [v0.1.5](https://github.com/zaru/webpush/tree/v0.1.5) (2016-04-29)
162
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.1.4...v0.1.5)
163
-
164
- **Merged pull requests:**
165
-
166
- - add Ttl header parameter [\#1](https://github.com/zaru/webpush/pull/1) ([shouta-dev](https://github.com/shouta-dev))
167
-
168
- ## [v0.1.4](https://github.com/zaru/webpush/tree/v0.1.4) (2016-04-27)
169
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.1.3...v0.1.4)
170
-
171
- ## [v0.1.3](https://github.com/zaru/webpush/tree/v0.1.3) (2016-04-13)
172
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.1.2...v0.1.3)
173
-
174
- ## [v0.1.2](https://github.com/zaru/webpush/tree/v0.1.2) (2016-04-12)
175
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.1.1...v0.1.2)
176
-
177
- ## [v0.1.1](https://github.com/zaru/webpush/tree/v0.1.1) (2016-03-31)
178
- [Full Changelog](https://github.com/zaru/webpush/compare/v0.1.0...v0.1.1)
179
-
180
- ## [v0.1.0](https://github.com/zaru/webpush/tree/v0.1.0) (2016-03-31)
181
-
182
-
183
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task default: :spec
7
-
8
- import './lib/tasks/web_push.rake'
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "web_push"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start