httpx 0.6.1 → 0.6.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 +4 -4
- data/lib/httpx/headers.rb +2 -2
- data/lib/httpx/plugins/basic_authentication.rb +1 -1
- data/lib/httpx/request.rb +11 -1
- data/lib/httpx/version.rb +1 -1
- 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: 06cc2e51d9b985b5df5b830bcfcdbcde9170253cc90b914dbb54c903106e8627
|
4
|
+
data.tar.gz: c1cd4de4e8ef8b1792b4b9e2ef12ff4abda3e101a82add4aeb580953ea641460
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da578cf07f612ab7af2f499aad38aa71e8b8cb447da80f2c0274e75e2364599e1bcccde9cd5ef82ca14078d3a3a7bce9ee533f3ad11f35efba448761b492a496
|
7
|
+
data.tar.gz: 1c339abaf5e9f56641546b814c0b073867db4d0aa2c7b44dc5bc7049552b8a8c11dd0743b66f21a8d99bf7bab855b98768c1eb292c3e89400863a9abe1a8f53f
|
data/lib/httpx/headers.rb
CHANGED
@@ -15,7 +15,7 @@ module HTTPX
|
|
15
15
|
|
16
16
|
module InstanceMethods
|
17
17
|
def basic_authentication(user, password)
|
18
|
-
authentication("Basic #{Base64.strict_encode64("#{
|
18
|
+
authentication("Basic #{Base64.strict_encode64("#{user}:#{password}")}")
|
19
19
|
end
|
20
20
|
alias_method :basic_auth, :basic_authentication
|
21
21
|
end
|
data/lib/httpx/request.rb
CHANGED
@@ -47,7 +47,7 @@ module HTTPX
|
|
47
47
|
|
48
48
|
def initialize(verb, uri, options = {})
|
49
49
|
@verb = verb.to_s.downcase.to_sym
|
50
|
-
@uri = URI(
|
50
|
+
@uri = URI(uri.to_s)
|
51
51
|
@options = Options.new(options)
|
52
52
|
|
53
53
|
raise(Error, "unknown method: #{verb}") unless METHODS.include?(@verb)
|
@@ -60,6 +60,16 @@ module HTTPX
|
|
60
60
|
@state = :idle
|
61
61
|
end
|
62
62
|
|
63
|
+
if RUBY_VERSION < "2.2"
|
64
|
+
# rubocop: disable Lint/UriEscapeUnescape:
|
65
|
+
def initialize_with_escape(verb, uri, options = {})
|
66
|
+
initialize_without_escape(verb, URI.escape(uri.to_s), options)
|
67
|
+
end
|
68
|
+
alias_method :initialize_without_escape, :initialize
|
69
|
+
alias_method :initialize, :initialize_with_escape
|
70
|
+
# rubocop: enable Lint/UriEscapeUnescape:
|
71
|
+
end
|
72
|
+
|
63
73
|
def merge_headers(h)
|
64
74
|
@headers = @headers.merge(h)
|
65
75
|
end
|
data/lib/httpx/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httpx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tiago Cardoso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http-2-next
|