httpi 2.5.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +16 -7
- data/UPDATING.md +7 -0
- data/httpi.gemspec +0 -3
- data/lib/httpi/adapter/net_http.rb +0 -2
- data/lib/httpi/version.rb +1 -1
- data/spec/integration/net_http_spec.rb +11 -3
- metadata +3 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b488ad4ac7b6d32a313798d387be88d00976ffe2533a1413836bd7e102cfda83
|
4
|
+
data.tar.gz: f555c552fbdfa36b727c75e5bf2b3a9a19559098145ce3f969c94f250380b185
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fccd5e6e95668a6b49e440eee050a2e8f7e456434e6a973bd2cc8d54c97854c1961fc5e941456ff6e3a4356a03bb6b8a7aad023fd7b8d74f0d73a2e1a18fd682
|
7
|
+
data.tar.gz: 825d197e0ccb00ba983aba28a40cb6c0f1789bc6ae9cb3ba82363548330fd66609c5c4e904285038d67de6c95850f1ccaca3901f7698b7317657e754f1035f7d
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -11,16 +11,11 @@ A common interface for Ruby's HTTP libraries.
|
|
11
11
|
|
12
12
|
HTTPI is available through [Rubygems](https://rubygems.org/gems/httpi) and can be installed via:
|
13
13
|
|
14
|
-
|
15
|
-
$ gem install httpi
|
16
|
-
```
|
14
|
+
$ gem install httpi
|
17
15
|
|
18
16
|
or add it to your Gemfile like this:
|
19
17
|
|
20
|
-
|
21
|
-
gem 'httpi', '~> 2.1.0'
|
22
|
-
```
|
23
|
-
|
18
|
+
gem 'httpi', '~> 3.0.0'
|
24
19
|
|
25
20
|
## Usage example
|
26
21
|
|
@@ -44,6 +39,20 @@ HTTPI.adapter = :httpclient
|
|
44
39
|
HTTPI.request(:custom, request)
|
45
40
|
```
|
46
41
|
|
42
|
+
### Rack Mock Adapter
|
43
|
+
|
44
|
+
To use the Rack mock adapter, please add the `rack` gem to your gemfile.
|
45
|
+
|
46
|
+
### SOCKS Proxy Support
|
47
|
+
|
48
|
+
To use the the SOCKS proxy support, please add the `socksify` gem to your gemfile, and add the following code:
|
49
|
+
|
50
|
+
``` ruby
|
51
|
+
require 'socksify'
|
52
|
+
require 'socksify/http'
|
53
|
+
```
|
54
|
+
|
55
|
+
to your project.
|
47
56
|
|
48
57
|
## Documentation
|
49
58
|
|
data/UPDATING.md
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
# Update guide
|
2
|
+
|
3
|
+
## From 2.x to 3.x
|
4
|
+
|
5
|
+
BREAKING CHANGE: the [#255](https://github.com/savonrb/httpi/pull/225) made the gem socksify and rack gems optional dependencies.
|
6
|
+
|
7
|
+
In order to restore the old behavior, see the README section "SOCKS Proxy Support" and "Rack Mock Adapter".
|
data/httpi.gemspec
CHANGED
@@ -16,9 +16,6 @@ Gem::Specification.new do |s|
|
|
16
16
|
|
17
17
|
s.license = 'MIT'
|
18
18
|
|
19
|
-
s.add_dependency 'rack'
|
20
|
-
s.add_dependency 'socksify'
|
21
|
-
|
22
19
|
s.add_development_dependency 'rubyntlm', '~> 0.3.2'
|
23
20
|
s.add_development_dependency 'rake', '~> 13.0'
|
24
21
|
s.add_development_dependency 'rspec', '~> 3.5'
|
data/lib/httpi/version.rb
CHANGED
@@ -93,11 +93,19 @@ describe HTTPI::Adapter::NetHTTP do
|
|
93
93
|
end
|
94
94
|
}
|
95
95
|
let(:request_body) { nil }
|
96
|
-
|
96
|
+
|
97
|
+
subject(:response) { HTTPI.request(http_method, request, adapter) }
|
97
98
|
|
98
99
|
shared_examples_for "any supported custom method" do
|
99
|
-
|
100
|
-
|
100
|
+
describe '#body' do
|
101
|
+
subject(:body) {response.body}
|
102
|
+
it { is_expected.to be == http_method.to_s }
|
103
|
+
end
|
104
|
+
|
105
|
+
describe '#headers' do
|
106
|
+
subject(:headers) {response.headers}
|
107
|
+
it { is_expected.to include('content-type' => "text/plain")}
|
108
|
+
end
|
101
109
|
end
|
102
110
|
|
103
111
|
context "PATCH method" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httpi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Harrington
|
@@ -9,36 +9,8 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-10-
|
12
|
+
date: 2021-10-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: rack
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - ">="
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '0'
|
21
|
-
type: :runtime
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: '0'
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: socksify
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - ">="
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '0'
|
35
|
-
type: :runtime
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - ">="
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: '0'
|
42
14
|
- !ruby/object:Gem::Dependency
|
43
15
|
name: rubyntlm
|
44
16
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,6 +109,7 @@ files:
|
|
137
109
|
- LICENSE
|
138
110
|
- README.md
|
139
111
|
- Rakefile
|
112
|
+
- UPDATING.md
|
140
113
|
- httpi.gemspec
|
141
114
|
- lib/httpi.rb
|
142
115
|
- lib/httpi/adapter.rb
|