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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c921690b77440f26fa4da9bac58ed74d16440e9df7d180be606e1c21460dfbb
4
- data.tar.gz: d95e355e1925d7cb78622fc6188cc761eedec15e30ad9bd93b565937873d86c6
3
+ metadata.gz: c3e533863eed443ec1b23c42cf9959c3312c8ddff5a1b45102028263325ad473
4
+ data.tar.gz: 5ea0350ab1711603f712d0ae02ea6e14f3f89b225866585b5aff8833c855d60c
5
5
  SHA512:
6
- metadata.gz: '09c5e6e4bf5242de2f9472123c94ca3f17a3fd60e816886cf7402d4d977d45e2cc8be98e3d6a4ac2c7d16b68af8cef58a016d4b1b4aa443bfca92bde6f7232ce'
7
- data.tar.gz: ba7d999bc0d771365a4c647df38419f7ba2ee22f3d06c33dd660645aad999d7529d1ce8036b9d2d24994098fcdf2f415df2b533b4c68c5c1a483b0e25862629a
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
  [![Development](https://github.com/savonrb/httpi/actions/workflows/development.yml/badge.svg)](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
@@ -17,7 +17,6 @@ Gem::Specification.new do |s|
17
17
  s.license = 'MIT'
18
18
 
19
19
  s.add_dependency 'rack'
20
- s.add_dependency 'socksify'
21
20
 
22
21
  s.add_development_dependency 'rubyntlm', '~> 0.3.2'
23
22
  s.add_development_dependency 'rake', '~> 13.0'
@@ -4,8 +4,6 @@ require "httpi/adapter/base"
4
4
  require "httpi/response"
5
5
  require 'kconv'
6
6
  require 'socket'
7
- require "socksify"
8
- require 'socksify/http'
9
7
 
10
8
  module HTTPI
11
9
  module Adapter
data/lib/httpi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module HTTPI
2
- VERSION = '2.5.0'
2
+ VERSION = '3.0.1'
3
3
  end
@@ -93,11 +93,19 @@ describe HTTPI::Adapter::NetHTTP do
93
93
  end
94
94
  }
95
95
  let(:request_body) { nil }
96
- let(:response) { HTTPI.request(http_method, request, adapter) }
96
+
97
+ subject(:response) { HTTPI.request(http_method, request, adapter) }
97
98
 
98
99
  shared_examples_for "any supported custom method" do
99
- specify { response.body.should eq http_method.to_s }
100
- specify { response.headers["Content-Type"].should eq("text/plain") }
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: 2.5.0
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-10-05 00:00:00.000000000 Z
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