httpi 2.5.0 → 4.0.4

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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +41 -0
  3. data/README.md +25 -10
  4. data/UPDATING.md +11 -0
  5. data/lib/httpi/adapter/net_http.rb +0 -2
  6. data/lib/httpi/adapter.rb +2 -0
  7. data/lib/httpi/request.rb +2 -2
  8. data/lib/httpi/response.rb +1 -1
  9. data/lib/httpi/utils.rb +95 -0
  10. data/lib/httpi/version.rb +1 -1
  11. data/lib/httpi.rb +7 -1
  12. metadata +56 -61
  13. data/.github/workflows/development.yml +0 -48
  14. data/.gitignore +0 -11
  15. data/.rspec +0 -1
  16. data/Gemfile +0 -22
  17. data/Rakefile +0 -18
  18. data/httpi.gemspec +0 -31
  19. data/spec/fixtures/attachment.gif +0 -0
  20. data/spec/fixtures/client_cert.pem +0 -20
  21. data/spec/fixtures/client_key.pem +0 -27
  22. data/spec/fixtures/xml.gz +0 -0
  23. data/spec/fixtures/xml.xml +0 -10
  24. data/spec/fixtures/xml_dime.dime +0 -0
  25. data/spec/fixtures/xml_dime.xml +0 -1
  26. data/spec/httpi/adapter/base_spec.rb +0 -23
  27. data/spec/httpi/adapter/curb_spec.rb +0 -351
  28. data/spec/httpi/adapter/em_http_spec.rb +0 -180
  29. data/spec/httpi/adapter/excon_spec.rb +0 -34
  30. data/spec/httpi/adapter/http_spec.rb +0 -28
  31. data/spec/httpi/adapter/httpclient_spec.rb +0 -238
  32. data/spec/httpi/adapter/net_http_persistent_spec.rb +0 -46
  33. data/spec/httpi/adapter/net_http_spec.rb +0 -54
  34. data/spec/httpi/adapter/rack_spec.rb +0 -109
  35. data/spec/httpi/adapter_spec.rb +0 -68
  36. data/spec/httpi/auth/config_spec.rb +0 -163
  37. data/spec/httpi/auth/ssl_spec.rb +0 -216
  38. data/spec/httpi/cookie_spec.rb +0 -36
  39. data/spec/httpi/cookie_store_spec.rb +0 -26
  40. data/spec/httpi/error_spec.rb +0 -43
  41. data/spec/httpi/httpi_spec.rb +0 -358
  42. data/spec/httpi/request_spec.rb +0 -290
  43. data/spec/httpi/response_spec.rb +0 -142
  44. data/spec/integration/curb_spec.rb +0 -139
  45. data/spec/integration/em_http_spec.rb +0 -108
  46. data/spec/integration/excon_spec.rb +0 -174
  47. data/spec/integration/fixtures/ca_all.pem +0 -19
  48. data/spec/integration/fixtures/server.cert +0 -19
  49. data/spec/integration/fixtures/server.key +0 -27
  50. data/spec/integration/http_spec.rb +0 -156
  51. data/spec/integration/httpclient_spec.rb +0 -136
  52. data/spec/integration/net_http_persistent_spec.rb +0 -171
  53. data/spec/integration/net_http_spec.rb +0 -274
  54. data/spec/integration/support/application.rb +0 -97
  55. data/spec/integration/support/server.rb +0 -83
  56. data/spec/spec_helper.rb +0 -23
  57. data/spec/support/error_helper.rb +0 -26
  58. data/spec/support/fixture.rb +0 -27
  59. data/spec/support/matchers.rb +0 -19
@@ -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