httpi 4.0.3 → 4.0.6
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 +13 -0
- data/README.md +2 -2
- data/lib/httpi/adapter/base.rb +0 -3
- data/lib/httpi/adapter/curb.rb +15 -18
- data/lib/httpi/adapter/em_http.rb +7 -10
- data/lib/httpi/adapter/excon.rb +17 -20
- data/lib/httpi/adapter/http.rb +12 -14
- data/lib/httpi/adapter/httpclient.rb +5 -8
- data/lib/httpi/adapter/net_http.rb +30 -34
- data/lib/httpi/adapter/net_http_persistent.rb +3 -5
- data/lib/httpi/adapter/rack.rb +24 -16
- data/lib/httpi/adapter.rb +9 -12
- data/lib/httpi/auth/config.rb +0 -3
- data/lib/httpi/auth/ssl.rb +15 -18
- data/lib/httpi/cookie.rb +0 -3
- data/lib/httpi/cookie_store.rb +0 -3
- data/lib/httpi/dime.rb +13 -16
- data/lib/httpi/logger.rb +1 -3
- data/lib/httpi/query_builder.rb +5 -11
- data/lib/httpi/request.rb +11 -14
- data/lib/httpi/response.rb +2 -5
- data/lib/httpi/utils.rb +9 -11
- data/lib/httpi/version.rb +1 -1
- data/lib/httpi.rb +8 -11
- metadata +22 -59
- data/.devcontainer/devcontainer.json +0 -22
- data/.github/workflows/development.yml +0 -49
- data/.gitignore +0 -11
- data/.rspec +0 -1
- data/Gemfile +0 -22
- data/Rakefile +0 -18
- data/httpi.gemspec +0 -40
- data/spec/fixtures/attachment.gif +0 -0
- data/spec/fixtures/client_cert.pem +0 -20
- data/spec/fixtures/client_key.pem +0 -27
- data/spec/fixtures/xml.gz +0 -0
- data/spec/fixtures/xml.xml +0 -10
- data/spec/fixtures/xml_dime.dime +0 -0
- data/spec/fixtures/xml_dime.xml +0 -1
- data/spec/httpi/adapter/base_spec.rb +0 -23
- data/spec/httpi/adapter/curb_spec.rb +0 -351
- data/spec/httpi/adapter/em_http_spec.rb +0 -180
- data/spec/httpi/adapter/excon_spec.rb +0 -34
- data/spec/httpi/adapter/http_spec.rb +0 -28
- data/spec/httpi/adapter/httpclient_spec.rb +0 -238
- data/spec/httpi/adapter/net_http_persistent_spec.rb +0 -46
- data/spec/httpi/adapter/net_http_spec.rb +0 -54
- data/spec/httpi/adapter/rack_spec.rb +0 -109
- data/spec/httpi/adapter_spec.rb +0 -68
- data/spec/httpi/auth/config_spec.rb +0 -163
- data/spec/httpi/auth/ssl_spec.rb +0 -216
- data/spec/httpi/cookie_spec.rb +0 -36
- data/spec/httpi/cookie_store_spec.rb +0 -26
- data/spec/httpi/error_spec.rb +0 -43
- data/spec/httpi/httpi_spec.rb +0 -382
- data/spec/httpi/request_spec.rb +0 -290
- data/spec/httpi/response_spec.rb +0 -146
- data/spec/integration/curb_spec.rb +0 -140
- data/spec/integration/em_http_spec.rb +0 -108
- data/spec/integration/excon_spec.rb +0 -174
- data/spec/integration/fixtures/ca_all.pem +0 -19
- data/spec/integration/fixtures/server.cert +0 -19
- data/spec/integration/fixtures/server.key +0 -27
- data/spec/integration/http_spec.rb +0 -156
- data/spec/integration/httpclient_spec.rb +0 -137
- data/spec/integration/net_http_persistent_spec.rb +0 -171
- data/spec/integration/net_http_spec.rb +0 -282
- data/spec/integration/support/application.rb +0 -88
- data/spec/integration/support/server.rb +0 -83
- data/spec/spec_helper.rb +0 -23
- data/spec/support/error_helper.rb +0 -26
- data/spec/support/fixture.rb +0 -27
- data/spec/support/matchers.rb +0 -19
data/spec/support/matchers.rb
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
RSpec::Matchers.define :match_response do |options|
|
|
2
|
-
defaults = { :code => 200, :headers => { "Accept-encoding" => "utf-8" }, :body => "" }
|
|
3
|
-
response = defaults.merge options
|
|
4
|
-
|
|
5
|
-
match do |actual|
|
|
6
|
-
expect(actual).to be_an(HTTPI::Response)
|
|
7
|
-
expect(actual.code).to eq(response[:code])
|
|
8
|
-
expect(downcase(actual.headers)).to eq(downcase(response[:headers]))
|
|
9
|
-
expect(actual.body).to eq(response[:body])
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def downcase(hash)
|
|
13
|
-
hash.inject({}) do |memo, (key, value)|
|
|
14
|
-
memo[key.downcase] = value.downcase
|
|
15
|
-
memo
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
end
|