site_watcher 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/site_watcher/version.rb +1 -1
- data/lib/site_watcher.rb +8 -6
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df65a9d8f51bcde0117e6202caa4bc5053e6559c24967dfff33fb6b1542d54b3
|
4
|
+
data.tar.gz: 675de476412013dbadd3d75cead811433f913e6be1c79ae037798621f651078e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28f0382fae6c8c7cf69f579dd7f0dadc27b86dac5f0b562ff4cca1bf9a80822afffb22b53e8a0cabc3a5d712168dc39d2b2de5050a28585231b8b5c6d94afe54
|
7
|
+
data.tar.gz: d92430b4dc7fa2de6dabf1df4fa77899ca60d8cc7206fe435279397d0be1f2709c5aa35f6acda4813f1de10ee17fcce56257c5f53b53886b5cbb8bd8e629f3c3
|
data/lib/site_watcher/version.rb
CHANGED
data/lib/site_watcher.rb
CHANGED
@@ -140,6 +140,7 @@ class SiteWatcher
|
|
140
140
|
@__sw_http_method = http_method
|
141
141
|
end
|
142
142
|
|
143
|
+
# FIXME this isn't even used?
|
143
144
|
def body(body)
|
144
145
|
@__sw_body = body
|
145
146
|
end
|
@@ -149,14 +150,15 @@ class SiteWatcher
|
|
149
150
|
end
|
150
151
|
|
151
152
|
def __sw_run!(force, logger, timeout)
|
153
|
+
client = ::HTTP
|
154
|
+
.use(logging: {logger: logger})
|
155
|
+
.timeout(timeout)
|
156
|
+
.headers(@__sw_headers)
|
157
|
+
|
152
158
|
if @__sw_fetch
|
153
|
-
response = @__sw_fetch.call(@__sw_url)
|
159
|
+
response = @__sw_fetch.call(@__sw_url, client)
|
154
160
|
else
|
155
|
-
response =
|
156
|
-
.use(logging: {logger: logger})
|
157
|
-
.timeout(timeout)
|
158
|
-
.headers(@__sw_headers)
|
159
|
-
.request(@__sw_method, @__sw_url, **@__sw_http_opts)
|
161
|
+
response = client.request(@__sw_method, @__sw_url, **@__sw_http_opts)
|
160
162
|
|
161
163
|
case response.content_type.mime_type
|
162
164
|
when /json/i
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: site_watcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Genco
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
description:
|
111
|
+
description:
|
112
112
|
email:
|
113
113
|
- alexgenco@gmail.com
|
114
114
|
executables: []
|
@@ -123,7 +123,7 @@ homepage: https://github.com/alexgenco/site_watcher
|
|
123
123
|
licenses:
|
124
124
|
- MIT
|
125
125
|
metadata: {}
|
126
|
-
post_install_message:
|
126
|
+
post_install_message:
|
127
127
|
rdoc_options: []
|
128
128
|
require_paths:
|
129
129
|
- lib
|
@@ -138,8 +138,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
|
-
rubygems_version: 3.
|
142
|
-
signing_key:
|
141
|
+
rubygems_version: 3.3.7
|
142
|
+
signing_key:
|
143
143
|
specification_version: 4
|
144
144
|
summary: Periodically monitor a website
|
145
145
|
test_files: []
|