httpi 4.0.3 → 4.0.4
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/lib/httpi/version.rb +1 -1
- metadata +2 -50
- 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
|