httpi 2.5.0 → 3.0.1
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.md +8 -0
- data/README.md +13 -9
- data/UPDATING.md +7 -0
- data/httpi.gemspec +0 -1
- 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 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3e533863eed443ec1b23c42cf9959c3312c8ddff5a1b45102028263325ad473
|
4
|
+
data.tar.gz: 5ea0350ab1711603f712d0ae02ea6e14f3f89b225866585b5aff8833c855d60c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d53e35db56687d59d42e7b7e2b609c00ec3f5d241a77189bcbd780c87d6596466a0e709d300ed66956e67634f228c94dff675bd60ec13b6c5a4d1422f5253d1
|
7
|
+
data.tar.gz: 29fa0caf340530e89c435c1730387d255301ad6a06395b8860c1642c272150c91ce0f5c7c128a5500aecf0ba5484fbeaed384600f60ce48a530dd51b76e8b690
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
### 3.0.1 (2021-12-17)
|
2
|
+
|
3
|
+
* Fix: [#230](https://github.com/savonrb/httpi/pull/230) Make rack a runtime dependency.
|
4
|
+
|
5
|
+
### 3.0.0 (2021-10-19)
|
6
|
+
|
7
|
+
* Improvement: [#225](https://github.com/savonrb/httpi/pull/225) Make rack and socksify dependencies optional.
|
8
|
+
|
1
9
|
### 2.5.0 (2021-10-05)
|
2
10
|
|
3
11
|
* Feature: [#214](https://github.com/savonrb/httpi/pull/214) Add SSL ciphers configuration
|
data/README.md
CHANGED
@@ -2,8 +2,7 @@
|
|
2
2
|
|
3
3
|
A common interface for Ruby's HTTP libraries.
|
4
4
|
|
5
|
-
[Documentation](https://www.rubydoc.info/gems/httpi)
|
6
|
-
[Mailing list](https://groups.google.com/forum/#!forum/httpirb)
|
5
|
+
[Documentation](https://www.rubydoc.info/gems/httpi)
|
7
6
|
|
8
7
|
[](https://github.com/savonrb/httpi/actions/workflows/development.yml)
|
9
8
|
|
@@ -11,16 +10,11 @@ A common interface for Ruby's HTTP libraries.
|
|
11
10
|
|
12
11
|
HTTPI is available through [Rubygems](https://rubygems.org/gems/httpi) and can be installed via:
|
13
12
|
|
14
|
-
|
15
|
-
$ gem install httpi
|
16
|
-
```
|
13
|
+
$ gem install httpi
|
17
14
|
|
18
15
|
or add it to your Gemfile like this:
|
19
16
|
|
20
|
-
|
21
|
-
gem 'httpi', '~> 2.1.0'
|
22
|
-
```
|
23
|
-
|
17
|
+
gem 'httpi', '~> 3.0.0'
|
24
18
|
|
25
19
|
## Usage example
|
26
20
|
|
@@ -44,6 +38,16 @@ HTTPI.adapter = :httpclient
|
|
44
38
|
HTTPI.request(:custom, request)
|
45
39
|
```
|
46
40
|
|
41
|
+
### SOCKS Proxy Support
|
42
|
+
|
43
|
+
To use the the SOCKS proxy support, please add the `socksify` gem to your gemfile, and add the following code:
|
44
|
+
|
45
|
+
``` ruby
|
46
|
+
require 'socksify'
|
47
|
+
require 'socksify/http'
|
48
|
+
```
|
49
|
+
|
50
|
+
to your project.
|
47
51
|
|
48
52
|
## Documentation
|
49
53
|
|
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
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Harrington
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-12-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
@@ -25,20 +25,6 @@ dependencies:
|
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
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
28
|
- !ruby/object:Gem::Dependency
|
43
29
|
name: rubyntlm
|
44
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,6 +123,7 @@ files:
|
|
137
123
|
- LICENSE
|
138
124
|
- README.md
|
139
125
|
- Rakefile
|
126
|
+
- UPDATING.md
|
140
127
|
- httpi.gemspec
|
141
128
|
- lib/httpi.rb
|
142
129
|
- lib/httpi/adapter.rb
|