nethttputils 0.2.4.1 → 0.2.4.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c8d2a8ec9215219787c3f2f8a13569d032d5588b
4
- data.tar.gz: 913adf0d1c1dcbfb733233e4a41308f86cb56e82
3
+ metadata.gz: 627f4578fd2379b3e4781a55a5531ae6e3be21c8
4
+ data.tar.gz: 9223bdf1313f2d9b44636db775c7142d8544be16
5
5
  SHA512:
6
- metadata.gz: cf192d72f3dd6226afa7c2368ce3f41054f563396178543b67cd4b837425cc6db5b349c8ab3de372c96cc7ffa11f9a51698bd96c3668b82b7b179e74919be285
7
- data.tar.gz: dffcfb68ff473068e718bfc74c4f88004f08ca3789f6cce540295f3af6c6b571ba621ee1a2c2efd484e8246d8222d33d24a10ac2dc500489d3400b264a6c2c7d
6
+ metadata.gz: 10b2e6f4dc815161ff679e76f518a6217027638710376c09e6fa0c6db975f8480daff3166e9a775782a13ade622b2cfe4b8ec494df82d8a5c75696a9f0a07809
7
+ data.tar.gz: f3d8f5a374bffd2df400ec4ea675186773a0f70ac33d4f11afd4b4618a296d5bf2ea1834ca63f4a4ec6f42155b5fe14d2f36c3e1fe51e095dffba4ae7cee2152
@@ -26,7 +26,7 @@ module NetHTTPUtils
26
26
 
27
27
  def remove_tags str
28
28
  str.gsub(/<script( [a-z]+="[^"]*")*>.*?<\/script>/m, "").
29
- gsub(/<style( type="text\/css")?>.*?<\/style>/m, "").
29
+ gsub(/<style( [a-z]+="[^"]*")*>.*?<\/style>/m, "").
30
30
  gsub(/<[^>]*>/, "").split(?\n).map(&:strip).reject(&:empty?).join(?\n)
31
31
  end
32
32
 
@@ -295,7 +295,7 @@ if $0 == __FILE__
295
295
  server.shutdown
296
296
 
297
297
  fail unless NetHTTPUtils.request_data("http://httpstat.us/200") == "200 OK"
298
- [400, 404, 500, 503].each do |code|
298
+ [400, 404, 500, 502, 503].each do |code|
299
299
  begin
300
300
  fail NetHTTPUtils.request_data "http://httpstat.us/#{code}"
301
301
  rescue NetHTTPUtils::Error => e
@@ -305,6 +305,7 @@ if $0 == __FILE__
305
305
  fail unless NetHTTPUtils.get_response("http://httpstat.us/400").body == "400 Bad Request"
306
306
  fail unless NetHTTPUtils.get_response("http://httpstat.us/404").body == "404 Not Found"
307
307
  fail unless NetHTTPUtils.get_response("http://httpstat.us/500").body == "500 Internal Server Error"
308
+ fail unless NetHTTPUtils.get_response("http://httpstat.us/502").body == "502 Bad Gateway"
308
309
  fail unless NetHTTPUtils.get_response("http://httpstat.us/503").body == "503 Service Unavailable"
309
310
  NetHTTPUtils.logger.level = Logger::FATAL
310
311
  [
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "nethttputils"
3
- spec.version = "0.2.4.1"
3
+ spec.version = "0.2.4.2"
4
4
  spec.summary = "this tool is like a pet that I adopted young and now I depend on, sorry"
5
5
  spec.description = <<-EOF
6
6
  Back in 2015 I was a guy automating things at my job and two scripts had a common need --
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nethttputils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4.1
4
+ version: 0.2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Maslov aka Nakilon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-14 00:00:00.000000000 Z
11
+ date: 2018-06-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  Back in 2015 I was a guy automating things at my job and two scripts had a common need --