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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3871bda59d433bb2e423b760919479b402714bcb2ac18ef0d2e6312f3e06a3ee
4
- data.tar.gz: b154e6c67de541fe782cdf1583c335ddd30fbc92d98cdc8895d1541f397ac414
3
+ metadata.gz: df65a9d8f51bcde0117e6202caa4bc5053e6559c24967dfff33fb6b1542d54b3
4
+ data.tar.gz: 675de476412013dbadd3d75cead811433f913e6be1c79ae037798621f651078e
5
5
  SHA512:
6
- metadata.gz: 50a42cc608c857812f62578cac2f37eca9a7c2a8b1d3b73850c6a95a5ff75f1a940f71b856a069ccb4e93891906b097cc051bcd4b9284ced82beaa0b6e62437b
7
- data.tar.gz: 5b2587837c2d4db18c2565c7818146ce7b70e83c2989a39197dde9f3e013456af86d721e3e71f58daf76f66af43b78b945a4ed9d9122ccc7886aa684b9b33049
6
+ metadata.gz: 28f0382fae6c8c7cf69f579dd7f0dadc27b86dac5f0b562ff4cca1bf9a80822afffb22b53e8a0cabc3a5d712168dc39d2b2de5050a28585231b8b5c6d94afe54
7
+ data.tar.gz: d92430b4dc7fa2de6dabf1df4fa77899ca60d8cc7206fe435279397d0be1f2709c5aa35f6acda4813f1de10ee17fcce56257c5f53b53886b5cbb8bd8e629f3c3
@@ -1,3 +1,3 @@
1
1
  class SiteWatcher
2
- VERSION = "1.3.0"
2
+ VERSION = "1.4.0"
3
3
  end
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 = ::HTTP
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.3.0
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: 2021-11-11 00:00:00.000000000 Z
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.1.4
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: []