http.rb 0.13.2 → 0.13.3

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
  SHA256:
3
- metadata.gz: ae541e50094a51ccb63d737279a67ce0ae4a6a0ee55fe51a05e091da02e170e9
4
- data.tar.gz: b1c865b1edd6c6ae58711af7502d10e69da3c31d41d1655438d8bb7c83778bf4
3
+ metadata.gz: ccdd073930399a89a9a5345bcad82b9fb08c8f4ec0ac43ac498dfeb7b9d16d36
4
+ data.tar.gz: a9565770affd06919fdfc4d8a82c1d3c80015c046641db788c1da75c5e8852cd
5
5
  SHA512:
6
- metadata.gz: 32a009dc748bef0e9aecf8b225e9bbb8f6bc991f3ffccaa41cb1c43fea085808fcdfb26abed1aa1174ab7332bb297ae3e6202398a8fc8ea20eee9da221e65f21
7
- data.tar.gz: 9ddbec00fc0efcb277bf673ba390a13ec76c449db0f5f5189cc6129fdaddf465624fb75e3a0ae7bc47e3e7e423bc5fae42307b83fd50764d59847a5495eda2aa
6
+ metadata.gz: 27b4d41bf3b4e35476c42fe785ea3262b5d5f66c85d373e319d06b2df8e6f50af91b619148f729d2947414d300fad912d9f7f50023203a7e4968f10fbd9561e1
7
+ data.tar.gz: 467692c9cf9ca0941db528e5391ce796198c3533bfeb0d19fa7e54d279abfb3c96ad0f34a2fa398dd664d3a2c5aadaca06f5f242fbbaed4daf1d47c8a825debc
data/CHANGELOG.txt CHANGED
@@ -1,3 +1,9 @@
1
+ # 20250501
2
+ # 0.13.3: Handle when there's a redirect to a URL with arguments, so as to not add an additional '?' at the end.
3
+ 1. ~ HTTP.get: Check if the args hash is empty.
4
+ 2. ~ HTTP::VERSION: /0.13.2/0.13.3/
5
+ 3. ~ http.rb.gemspec: Change date.
6
+
1
7
  # 202503030
2
8
  # 0.13.2: Change repo name to match gem name (/HTTP/http.rb/); + Use HTTP::VERSION; /require/require_relative/
3
9
  1. ~ README.md: /HTTP/http.rb/, /HTTP.rb/http.rb/
data/http.rb.gemspec CHANGED
@@ -3,7 +3,7 @@ require_relative './lib/HTTP/VERSION'
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'http.rb'
5
5
  s.version = HTTP::VERSION
6
- s.date = '2025-03-30'
6
+ s.date = '2025-05-01'
7
7
 
8
8
  s.summary = "HTTP made easy."
9
9
  s.description = "HTTP is the simplest HTTP mezzanine library for Ruby. Supply a URI, \
data/lib/HTTP/VERSION.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # HTTP::VERSION
3
3
 
4
4
  module HTTP
5
- VERSION = '0.13.2'
5
+ VERSION = '0.13.3'
6
6
  end
data/lib/HTTP/get.rb CHANGED
@@ -20,7 +20,11 @@ module HTTP
20
20
  options[:use_ssl] ||= uri.use_ssl?
21
21
  options[:verify_mode] ||= OpenSSL::SSL::VERIFY_NONE
22
22
  http.options = options
23
- request_object = Net::HTTP::Get.new(uri.request_uri + '?' + args.x_www_form_urlencode)
23
+ if args.empty?
24
+ request_object = Net::HTTP::Get.new(uri.request_uri)
25
+ else
26
+ request_object = Net::HTTP::Get.new(uri.request_uri + '?' + args.x_www_form_urlencode)
27
+ end
24
28
  request_object.headers = headers
25
29
  request_object.basic_auth(uri.user, uri.password) if uri.user
26
30
  response = http.request(request_object)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.2
4
+ version: 0.13.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-30 00:00:00.000000000 Z
10
+ date: 2025-05-01 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: HTTP is the simplest HTTP mezzanine library for Ruby. Supply a URI, some
13
13
  optional query arguments, some optional headers, and some Net::HTTP options,
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0'
54
54
  requirements: []
55
- rubygems_version: 3.6.6
55
+ rubygems_version: 3.6.8
56
56
  specification_version: 4
57
57
  summary: HTTP made easy.
58
58
  test_files: []