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 +4 -4
- data/README.md +4 -1
- data/lib/webpush/request.rb +4 -0
- data/lib/webpush/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0499dcd1f7c46766c0c0f310f4bb2e786fdc875c'
|
4
|
+
data.tar.gz: 5aeeedf8d5ead80dad72c9804547f24c8aa7450a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
```
|
data/lib/webpush/request.rb
CHANGED
@@ -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)
|
data/lib/webpush/version.rb
CHANGED
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.
|
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:
|
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.
|
169
|
+
rubygems_version: 2.6.11
|
170
170
|
signing_key:
|
171
171
|
specification_version: 4
|
172
172
|
summary: Encryption Utilities for Web Push payload.
|