http-client 0.4.0 → 0.5.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/CHANGELOG +4 -0
- data/lib/http/client.rb +7 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f4a112248d92e2509e0216202710ecf2f4b7d0e
|
4
|
+
data.tar.gz: 79dacb1979e38cdcd9e56595e06d9d7e5faaabd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 884c171d1b1329d12542601a2380e9079dd2eb52c0e92620d51810d6789b8c803c6bf2c2e244f80b21c34b3ec6d9ab229a7632340cb5491cfdbda54de0d84ea9
|
7
|
+
data.tar.gz: 39f076f5abcf0b6a5cde2400be1c4c3b33f3447c956e01f46855fef49d4d85fc1a9f27cae4bd2a00ea9f0f3cc7c238bcab897cc160d41dcafe4dedf9a2bfaa28
|
data/CHANGELOG
CHANGED
data/lib/http/client.rb
CHANGED
@@ -9,7 +9,7 @@ require 'zlib'
|
|
9
9
|
|
10
10
|
module HTTP
|
11
11
|
module Client
|
12
|
-
VERSION = '0.
|
12
|
+
VERSION = '0.5.0'
|
13
13
|
|
14
14
|
GET = Net::HTTP::Get
|
15
15
|
HEAD = Net::HTTP::Head
|
@@ -90,10 +90,16 @@ module HTTP
|
|
90
90
|
@delegate.body = body
|
91
91
|
end
|
92
92
|
|
93
|
+
# if auth is passed as arguments.
|
93
94
|
if auth = args[:auth]
|
94
95
|
@delegate.basic_auth(auth.fetch(:username), auth.fetch(:password))
|
95
96
|
end
|
96
97
|
|
98
|
+
# if auth is passed in uri.
|
99
|
+
if uri.user && uri.password
|
100
|
+
@delegate.basic_auth(uri.user, uri.password)
|
101
|
+
end
|
102
|
+
|
97
103
|
# generic timeout
|
98
104
|
if timeout = args[:timeout]
|
99
105
|
@open_timeout = timeout
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bharanee Rathna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
126
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.
|
127
|
+
rubygems_version: 2.5.1
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: A client wrapper around Net::HTTP
|