webpush 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd72ccff15bfca2e3f28ae66b4e48e1898224955
4
- data.tar.gz: 872df71aebcf0dbfd1c655403dcbd7dc053b2de8
3
+ metadata.gz: '0499dcd1f7c46766c0c0f310f4bb2e786fdc875c'
4
+ data.tar.gz: 5aeeedf8d5ead80dad72c9804547f24c8aa7450a
5
5
  SHA512:
6
- metadata.gz: 736595fe6e9304843ca9f22404c4e3ed890442fcbef774089196cc0acf12d189962461c8befafd1343fc789f701d53e64e719a8628bbee6972838f8fad2c4455
7
- data.tar.gz: 6e0f0eab8a4fb5709a5502ff574e53153273f53f6479233f3ccdb53cdcfd98130a0ceeceeb6e3fc826858f22cb0d3f87d048c3d24c0563c6f142135290a48b93
6
+ metadata.gz: 48ec18d9fe4529ab4e16fed5e63b347497c5b1b2e964d4c5771c9d130871c65be066e95e41a004c0631e33ccd4ee474c10297b5152d984c41b59523d44280261
7
+ data.tar.gz: ad6df7b328130176806a8111f28c86469eee04f268731534f8f888750b4ec061d0fac7d48be870e7e58ad928945fd77bd8fcaba16126405c00022676de09b98e
data/README.md CHANGED
@@ -167,7 +167,10 @@ post "/push" do
167
167
  subject: "mailto:sender@example.com",
168
168
  public_key: ENV['VAPID_PUBLIC_KEY'],
169
169
  private_key: ENV['VAPID_PRIVATE_KEY']
170
- }
170
+ },
171
+ ssl_timeout: 5, # value for Net::HTTP#ssl_timeout=, optional
172
+ open_timeout: 5, # value for Net::HTTP#open_timeout=, optional
173
+ read_timeout: 5 # value for Net::HTTP#read_timeout=, optional
171
174
  )
172
175
  end
173
176
  ```
@@ -18,6 +18,10 @@ module Webpush
18
18
  def perform
19
19
  http = Net::HTTP.new(uri.host, uri.port)
20
20
  http.use_ssl = true
21
+ http.ssl_timeout = @options[:ssl_timeout] unless @options[:ssl_timeout].nil?
22
+ http.open_timeout = @options[:open_timeout] unless @options[:open_timeout].nil?
23
+ http.read_timeout = @options[:read_timeout] unless @options[:read_timeout].nil?
24
+
21
25
  req = Net::HTTP::Post.new(uri.request_uri, headers)
22
26
  req.body = body
23
27
  resp = http.request(req)
@@ -1,3 +1,3 @@
1
1
  module Webpush
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webpush
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - zaru@sakuraba
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-06 00:00:00.000000000 Z
11
+ date: 2018-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hkdf
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  version: '0'
167
167
  requirements: []
168
168
  rubyforge_project:
169
- rubygems_version: 2.6.13
169
+ rubygems_version: 2.6.11
170
170
  signing_key:
171
171
  specification_version: 4
172
172
  summary: Encryption Utilities for Web Push payload.