nethttputils 0.2.4.1 → 0.2.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nethttputils.rb +3 -2
- data/nethttputils.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 627f4578fd2379b3e4781a55a5531ae6e3be21c8
|
4
|
+
data.tar.gz: 9223bdf1313f2d9b44636db775c7142d8544be16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10b2e6f4dc815161ff679e76f518a6217027638710376c09e6fa0c6db975f8480daff3166e9a775782a13ade622b2cfe4b8ec494df82d8a5c75696a9f0a07809
|
7
|
+
data.tar.gz: f3d8f5a374bffd2df400ec4ea675186773a0f70ac33d4f11afd4b4618a296d5bf2ea1834ca63f4a4ec6f42155b5fe14d2f36c3e1fe51e095dffba4ae7cee2152
|
data/lib/nethttputils.rb
CHANGED
@@ -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(
|
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
|
[
|
data/nethttputils.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "nethttputils"
|
3
|
-
spec.version = "0.2.4.
|
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.
|
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-
|
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 --
|