net-ping 2.1.1 → 2.2.0
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 +4 -4
- data/CHANGES +5 -0
- data/Gemfile.lock +1 -1
- data/lib/net/ping/http.rb +1 -1
- data/lib/net/ping/version.rb +1 -1
- data/test/test_net_ping_http.rb +22 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cde6d53c546914dc2150eb754a1d0b79ca1391b8a4c10be31ef161ff1d94a13d
|
|
4
|
+
data.tar.gz: b8cad0dbe1bd739e4407c03fdd72aa05e6a5152bed56fe8c0d7b450f0bf84b59
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 324fb64066295878e20c61bd2dd4bfefd82d6171a1ede99bead3c407cd9388012673e4d99245591ed188b48a59b2d6371dc15b0d9c8db549affcdf870a67adfe
|
|
7
|
+
data.tar.gz: c6fdb6bd7c15ef6ae6c3fcdf78e8bf55ca9d2f6c95b6373a9c2eb9dee22ea7b220eccf92c4ad023809d84425fe06e8b18fd54b60918152199536dc26c7ca612c
|
data/CHANGES
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
== 2.2.0 - 22-Sep-2026
|
|
2
|
+
* Add support for HTTP to ping URLs requiring a query parameter, carrying
|
|
3
|
+
forward #25 by Kenneth Perry (@thothonegan)
|
|
4
|
+
[#50](https://github.com/eitoball/net-ping/pull/50).
|
|
5
|
+
|
|
1
6
|
== 2.1.1 - 16-Aug-2026
|
|
2
7
|
* Fix the license format in net-ping.gemspec to use the SPDX identifier
|
|
3
8
|
"Artistic-2.0" [#47](https://github.com/eitoball/net-ping/pull/47).
|
data/Gemfile.lock
CHANGED
data/lib/net/ping/http.rb
CHANGED
data/lib/net/ping/version.rb
CHANGED
data/test/test_net_ping_http.rb
CHANGED
|
@@ -12,6 +12,10 @@ class TC_Net_Ping_HTTP < Test::Unit::TestCase
|
|
|
12
12
|
def setup
|
|
13
13
|
ENV['http_proxy'] = ENV['https_proxy'] = ENV['no_proxy'] = nil
|
|
14
14
|
@uri = 'http://www.google.com/index.html'
|
|
15
|
+
@uri_without_query = 'https://play.google.com/store/apps/details'
|
|
16
|
+
@uri_with_query = 'https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox'
|
|
17
|
+
@uri_empty_path_with_query = 'http://empty-path-query.com?foo=bar'
|
|
18
|
+
|
|
15
19
|
@uri_https = 'https://encrypted.google.com'
|
|
16
20
|
@uri_http_domain = 'http.com'
|
|
17
21
|
@uri_http_domain_scheme = 'http://http.com'
|
|
@@ -21,6 +25,9 @@ class TC_Net_Ping_HTTP < Test::Unit::TestCase
|
|
|
21
25
|
|
|
22
26
|
stub_request(:get, @uri).to_return(body: "PONG")
|
|
23
27
|
stub_request(:head, @uri).to_return(body: "PONG")
|
|
28
|
+
stub_request(:get, @uri_with_query).to_return(body: "PONG")
|
|
29
|
+
stub_request(:head, @uri_with_query).to_return(body: "PONG")
|
|
30
|
+
stub_request(:head, "http://empty-path-query.com/?foo=bar").to_return(body: "PONG")
|
|
24
31
|
stub_request(:head, @uri_https).to_return(body: "PONG")
|
|
25
32
|
stub_request(:get, @uri_https).to_return(body: "PONG")
|
|
26
33
|
stub_request(:get, "http://#{@uri_http_domain}").to_return(body: "PONG")
|
|
@@ -233,6 +240,21 @@ class TC_Net_Ping_HTTP < Test::Unit::TestCase
|
|
|
233
240
|
assert_true(@http.ping)
|
|
234
241
|
end
|
|
235
242
|
|
|
243
|
+
test 'ping_with_query' do
|
|
244
|
+
# without query doesn't work, but with query does
|
|
245
|
+
@http = Net::Ping::HTTP.new(@uri_without_query)
|
|
246
|
+
assert_false(@http.ping)
|
|
247
|
+
|
|
248
|
+
@http = Net::Ping::HTTP.new(@uri_with_query)
|
|
249
|
+
assert_true(@http.ping)
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
test 'ping preserves query string when the path is empty' do
|
|
253
|
+
@http = Net::Ping::HTTP.new(@uri_empty_path_with_query)
|
|
254
|
+
assert_true(@http.ping)
|
|
255
|
+
assert_requested(:head, "http://empty-path-query.com/?foo=bar")
|
|
256
|
+
end
|
|
257
|
+
|
|
236
258
|
test 'ping with http proxy' do
|
|
237
259
|
ENV['http_proxy'] = "http://proxymoxie:3128"
|
|
238
260
|
@http = Net::Ping::HTTP.new(@uri)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: net-ping
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Chernesky
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-09-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: test-unit
|