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