httpi 1.1.1 → 2.0.0.rc1
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.
- data/.gitignore +2 -0
- data/.rvmrc +1 -0
- data/CHANGELOG.md +51 -26
- data/Gemfile +6 -4
- data/README.md +19 -205
- data/httpi.gemspec +7 -10
- data/lib/httpi.rb +54 -56
- data/lib/httpi/adapter.rb +25 -18
- data/lib/httpi/adapter/base.rb +35 -0
- data/lib/httpi/adapter/curb.rb +59 -60
- data/lib/httpi/adapter/em_http.rb +126 -0
- data/lib/httpi/adapter/httpclient.rb +33 -63
- data/lib/httpi/adapter/net_http.rb +44 -62
- data/lib/httpi/auth/ssl.rb +26 -2
- data/lib/httpi/dime.rb +45 -29
- data/lib/httpi/request.rb +1 -1
- data/lib/httpi/response.rb +6 -4
- data/lib/httpi/version.rb +1 -1
- data/spec/httpi/adapter/base_spec.rb +23 -0
- data/spec/httpi/adapter/curb_spec.rb +107 -67
- data/spec/httpi/adapter/em_http_spec.rb +168 -0
- data/spec/httpi/adapter/httpclient_spec.rb +67 -56
- data/spec/httpi/adapter/net_http_spec.rb +62 -47
- data/spec/httpi/adapter_spec.rb +15 -2
- data/spec/httpi/auth/ssl_spec.rb +34 -1
- data/spec/httpi/httpi_spec.rb +80 -115
- data/spec/integration/fixtures/ca.pem +23 -0
- data/spec/integration/fixtures/ca_all.pem +44 -0
- data/spec/integration/fixtures/htdigest +1 -0
- data/spec/integration/fixtures/htpasswd +2 -0
- data/spec/integration/fixtures/server.cert +19 -0
- data/spec/integration/fixtures/server.key +15 -0
- data/spec/integration/fixtures/subca.pem +21 -0
- data/spec/integration/request_spec.rb +15 -2
- data/spec/integration/ssl_server.rb +70 -0
- data/spec/integration/ssl_spec.rb +102 -0
- data/spec/support/fixture.rb +1 -1
- metadata +60 -73
@@ -0,0 +1 @@
|
|
1
|
+
admin:auth:4302fe65caa32f27721949149ccd3083
|
@@ -0,0 +1,19 @@
|
|
1
|
+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sxwVnCXmKoB/owCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQCJ/OyN
|
15
|
+
rT8Cq2Y+G2yA/L1EMRvvxwFBqxavqaqHl/6rwsIBFlB3zbqGA/0oec6MAVnYynq4
|
16
|
+
c4AcHTjx3bQ/S4r2sNTZq0DH4SYbQzIobx/YW8PjQUJt8KQdKMcwwi7arHP7A/Ha
|
17
|
+
LKu8eIC2nsUBnP4NhkYSGhbmpJK+PFD0FVtD0ZIRlY/wsnaZNjWWcnWF1/FNuQ4H
|
18
|
+
ySjIblqVQkPuzebv3Ror6ZnVDukn96Mg7kP4u6zgxOeqlJGRe1M949SS9Vudjl8X
|
19
|
+
SF4aZUUB9pQGhsqQJVqaz2OlhGOp9D0q54xko/rekjAIcuDjl1mdX4F2WRrzpUmZ
|
20
|
+
uY/bPeOBYiVsOYVe
|
21
|
+
-----END CERTIFICATE-----
|
@@ -78,7 +78,20 @@ describe HTTPI do
|
|
78
78
|
end
|
79
79
|
|
80
80
|
HTTPI::Adapter::ADAPTERS.keys.each do |adapter|
|
81
|
-
|
81
|
+
if adapter == :em_http && RUBY_VERSION >= "1.9.0"
|
82
|
+
|
83
|
+
around(:each) do |example|
|
84
|
+
# Only wrap the example for the :em_http adapter
|
85
|
+
if EM.respond_to?(:synchrony)
|
86
|
+
EM.synchrony do
|
87
|
+
example.run
|
88
|
+
EM.stop
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
unless (adapter == :curb && RUBY_PLATFORM =~ /java/) || (adapter == :em_http && RUBY_VERSION =~ /1\.8/)
|
82
95
|
context "using :#{adapter}" do
|
83
96
|
let(:adapter) { adapter }
|
84
97
|
it_should_behave_like "an HTTP client"
|
@@ -88,7 +101,7 @@ describe HTTPI do
|
|
88
101
|
end
|
89
102
|
|
90
103
|
(HTTPI::Adapter::ADAPTERS.keys - [:net_http]).each do |adapter|
|
91
|
-
unless adapter == :curb && RUBY_PLATFORM =~ /java/
|
104
|
+
unless (adapter == :curb && RUBY_PLATFORM =~ /java/) || adapter == :em_http
|
92
105
|
context "using :#{adapter}" do
|
93
106
|
let(:adapter) { adapter }
|
94
107
|
it_should_behave_like "it works with HTTP digest auth"
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require "webrick/https"
|
2
|
+
require "logger"
|
3
|
+
require "cgi"
|
4
|
+
|
5
|
+
# https://github.com/asakusarb/odrk-http-client
|
6
|
+
class SSLServer < WEBrick::HTTPServer
|
7
|
+
DIR = File.dirname(__FILE__)
|
8
|
+
|
9
|
+
def initialize(host, port)
|
10
|
+
@logger = Logger.new($stderr)
|
11
|
+
@logger.level = Logger::Severity::FATAL
|
12
|
+
|
13
|
+
super(
|
14
|
+
:BindAddress => host,
|
15
|
+
:Logger => logger,
|
16
|
+
:Port => port,
|
17
|
+
:AccessLog => [],
|
18
|
+
:DocumentRoot => DIR,
|
19
|
+
:SSLEnable => true,
|
20
|
+
:SSLCACertificateFile => File.join(DIR, "fixtures", "ca.pem"),
|
21
|
+
:SSLCertificate => cert("server.cert"),
|
22
|
+
:SSLPrivateKey => key("server.key"),
|
23
|
+
:SSLVerifyClient => nil, #OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT|OpenSSL::SSL::VERIFY_PEER,
|
24
|
+
:SSLClientCA => nil,
|
25
|
+
:SSLCertName => nil
|
26
|
+
)
|
27
|
+
|
28
|
+
self.mount(
|
29
|
+
"/hello",
|
30
|
+
WEBrick::HTTPServlet::ProcHandler.new(method("do_hello").to_proc)
|
31
|
+
)
|
32
|
+
|
33
|
+
@server_thread = start_server_thread(self)
|
34
|
+
end
|
35
|
+
|
36
|
+
def shutdown
|
37
|
+
super
|
38
|
+
@server_thread.join if defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def cert(filename)
|
44
|
+
OpenSSL::X509::Certificate.new File.read(File.join(DIR, "fixtures", filename))
|
45
|
+
end
|
46
|
+
|
47
|
+
def key(filename)
|
48
|
+
OpenSSL::PKey::RSA.new File.read(File.join(DIR, "fixtures", filename))
|
49
|
+
end
|
50
|
+
|
51
|
+
def start_server_thread(server)
|
52
|
+
t = Thread.new { server.start }
|
53
|
+
|
54
|
+
while server.status != :Running
|
55
|
+
Thread.pass
|
56
|
+
unless t.alive?
|
57
|
+
t.join
|
58
|
+
raise
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
t
|
63
|
+
end
|
64
|
+
|
65
|
+
def do_hello(req, res)
|
66
|
+
res["Content-Type"] = "text/plain"
|
67
|
+
res.body = "hello ssl"
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "httpi"
|
3
|
+
require "integration/ssl_server"
|
4
|
+
|
5
|
+
describe "SSL authentication" do
|
6
|
+
|
7
|
+
before :all do
|
8
|
+
WebMock.allow_net_connect!
|
9
|
+
|
10
|
+
@host = "localhost"
|
11
|
+
@port = 17171
|
12
|
+
@ssl_port = 17172
|
13
|
+
@proxy_port = 17173
|
14
|
+
|
15
|
+
@url = "http://#{@host}:#{@port}/"
|
16
|
+
@ssl_url = "https://localhost:#{@ssl_port}/"
|
17
|
+
@ssl_fake_url = "https://127.0.0.1:#{@ssl_port}/"
|
18
|
+
@proxy_url = "http://#{@host}:#{@proxy_port}/"
|
19
|
+
|
20
|
+
@ssl_server = SSLServer.new(@host, @ssl_port)
|
21
|
+
end
|
22
|
+
|
23
|
+
def teardown
|
24
|
+
@ssl_server.shutdown if @ssl_server
|
25
|
+
end
|
26
|
+
|
27
|
+
HTTPI::Adapter::ADAPTERS.keys.each do |adapter|
|
28
|
+
context "with #{adapter}" do
|
29
|
+
|
30
|
+
if adapter == :em_http && RUBY_VERSION =~ /1\.8/
|
31
|
+
# em_http depends on fibers
|
32
|
+
elsif adapter == :curb && RUBY_PLATFORM =~ /java/
|
33
|
+
# curb does not run on jruby
|
34
|
+
elsif adapter == :em_http && RUBY_VERSION >= "1.9.0" && RUBY_PLATFORM =~ /java/
|
35
|
+
it "fails for whatever reason"
|
36
|
+
else
|
37
|
+
|
38
|
+
if adapter == :em_http && RUBY_VERSION >= "1.9.0"
|
39
|
+
# dependencies are loaded upon request, so we need to manually require this
|
40
|
+
require "em-synchrony"
|
41
|
+
|
42
|
+
around(:each) do |example|
|
43
|
+
EM.synchrony do
|
44
|
+
example.run
|
45
|
+
EM.stop
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# 105 ssl
|
51
|
+
if adapter == :httpclient || adapter == :curb
|
52
|
+
it "raises when no certificate was set up" do
|
53
|
+
expect { HTTPI.post(@ssl_url + "hello", "", adapter) }.
|
54
|
+
to raise_error(HTTPI::SSLError)
|
55
|
+
end
|
56
|
+
else
|
57
|
+
if adapter == :net_http && RUBY_VERSION >= "1.9"
|
58
|
+
it "raises in 1.9, but does not raise in 1.8"
|
59
|
+
else
|
60
|
+
it "does not raise when no certificate was set up" do
|
61
|
+
expect { HTTPI.post(@ssl_url + "hello", "", adapter) }.
|
62
|
+
to_not raise_error(HTTPI::SSLError)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# 106 ssl ca
|
68
|
+
it "works when set up properly" do
|
69
|
+
unless adapter == :em_http
|
70
|
+
ca_file = File.expand_path("../fixtures/ca_all.pem", __FILE__)
|
71
|
+
request = HTTPI::Request.new(@ssl_url + "hello")
|
72
|
+
request.auth.ssl.ca_cert_file = ca_file
|
73
|
+
|
74
|
+
response = HTTPI.get(request, adapter)
|
75
|
+
expect(response.body).to eq("hello ssl")
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# 107 ssl hostname
|
80
|
+
if adapter == :em_http
|
81
|
+
it "raises when configured for ssl client auth" do
|
82
|
+
ca_file = File.expand_path("../fixtures/ca_all.pem", __FILE__)
|
83
|
+
request = HTTPI::Request.new(@ssl_fake_url + "hello")
|
84
|
+
request.auth.ssl.ca_cert_file = ca_file
|
85
|
+
|
86
|
+
expect { HTTPI.get(request, adapter) }.
|
87
|
+
to raise_error(HTTPI::NotSupportedError, "EM-HTTP-Request does not support SSL client auth")
|
88
|
+
end
|
89
|
+
else
|
90
|
+
it "raises when the server could not be verified" do
|
91
|
+
ca_file = File.expand_path("../fixtures/ca_all.pem", __FILE__)
|
92
|
+
request = HTTPI::Request.new(@ssl_fake_url + "hello")
|
93
|
+
request.auth.ssl.ca_cert_file = ca_file
|
94
|
+
|
95
|
+
expect { HTTPI.get(request, adapter) }.to raise_error(HTTPI::SSLError)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
data/spec/support/fixture.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httpi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: -342245774
|
5
|
+
prerelease: 6
|
6
6
|
segments:
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
- rc
|
7
11
|
- 1
|
8
|
-
|
9
|
-
- 1
|
10
|
-
version: 1.1.1
|
12
|
+
version: 2.0.0.rc1
|
11
13
|
platform: ruby
|
12
14
|
authors:
|
13
15
|
- Daniel Harrington
|
@@ -16,10 +18,11 @@ autorequire:
|
|
16
18
|
bindir: bin
|
17
19
|
cert_chain: []
|
18
20
|
|
19
|
-
date: 2012-
|
21
|
+
date: 2012-11-10 00:00:00 +01:00
|
22
|
+
default_executable:
|
20
23
|
dependencies:
|
21
24
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
23
26
|
none: false
|
24
27
|
requirements:
|
25
28
|
- - ">="
|
@@ -28,104 +31,71 @@ dependencies:
|
|
28
31
|
segments:
|
29
32
|
- 0
|
30
33
|
version: "0"
|
34
|
+
version_requirements: *id001
|
31
35
|
name: rack
|
32
|
-
type: :runtime
|
33
36
|
prerelease: false
|
34
|
-
|
37
|
+
type: :runtime
|
35
38
|
- !ruby/object:Gem::Dependency
|
36
|
-
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
37
40
|
none: false
|
38
41
|
requirements:
|
39
42
|
- - ~>
|
40
43
|
- !ruby/object:Gem::Version
|
41
|
-
hash:
|
44
|
+
hash: 25
|
42
45
|
segments:
|
43
46
|
- 0
|
44
|
-
-
|
45
|
-
|
46
|
-
|
47
|
+
- 9
|
48
|
+
version: "0.9"
|
49
|
+
version_requirements: *id002
|
47
50
|
name: rake
|
48
|
-
type: :development
|
49
51
|
prerelease: false
|
50
|
-
|
52
|
+
type: :development
|
51
53
|
- !ruby/object:Gem::Dependency
|
52
|
-
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
55
|
none: false
|
54
56
|
requirements:
|
55
57
|
- - ~>
|
56
58
|
- !ruby/object:Gem::Version
|
57
|
-
hash:
|
59
|
+
hash: 21
|
58
60
|
segments:
|
59
61
|
- 2
|
60
|
-
-
|
61
|
-
version: "2.
|
62
|
+
- 11
|
63
|
+
version: "2.11"
|
64
|
+
version_requirements: *id003
|
62
65
|
name: rspec
|
63
|
-
type: :development
|
64
66
|
prerelease: false
|
65
|
-
|
67
|
+
type: :development
|
66
68
|
- !ruby/object:Gem::Dependency
|
67
|
-
|
69
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
68
70
|
none: false
|
69
71
|
requirements:
|
70
72
|
- - ~>
|
71
73
|
- !ruby/object:Gem::Version
|
72
|
-
hash:
|
74
|
+
hash: 19
|
73
75
|
segments:
|
74
76
|
- 0
|
75
|
-
-
|
76
|
-
|
77
|
-
|
77
|
+
- 12
|
78
|
+
version: "0.12"
|
79
|
+
version_requirements: *id004
|
78
80
|
name: mocha
|
79
|
-
type: :development
|
80
81
|
prerelease: false
|
81
|
-
|
82
|
+
type: :development
|
82
83
|
- !ruby/object:Gem::Dependency
|
83
|
-
|
84
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
84
85
|
none: false
|
85
86
|
requirements:
|
86
87
|
- - ~>
|
87
88
|
- !ruby/object:Gem::Version
|
88
|
-
hash:
|
89
|
+
hash: 31
|
89
90
|
segments:
|
90
91
|
- 1
|
91
|
-
-
|
92
|
-
|
93
|
-
|
92
|
+
- 8
|
93
|
+
version: "1.8"
|
94
|
+
version_requirements: *id005
|
94
95
|
name: webmock
|
95
|
-
type: :development
|
96
96
|
prerelease: false
|
97
|
-
requirement: *id005
|
98
|
-
- !ruby/object:Gem::Dependency
|
99
|
-
version_requirements: &id006 !ruby/object:Gem::Requirement
|
100
|
-
none: false
|
101
|
-
requirements:
|
102
|
-
- - ">="
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
hash: 3
|
105
|
-
segments:
|
106
|
-
- 0
|
107
|
-
version: "0"
|
108
|
-
name: autotest
|
109
97
|
type: :development
|
110
|
-
|
111
|
-
requirement: *id006
|
112
|
-
- !ruby/object:Gem::Dependency
|
113
|
-
version_requirements: &id007 !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
|
-
requirements:
|
116
|
-
- - "="
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
hash: 43
|
119
|
-
segments:
|
120
|
-
- 4
|
121
|
-
- 5
|
122
|
-
- 0
|
123
|
-
version: 4.5.0
|
124
|
-
name: ZenTest
|
125
|
-
type: :development
|
126
|
-
prerelease: false
|
127
|
-
requirement: *id007
|
128
|
-
description: HTTPI provides a common interface for Ruby HTTP libraries.
|
98
|
+
description: HTTPI provides a common interface for Ruby's HTTP libraries
|
129
99
|
email: me@rubiii.com
|
130
100
|
executables: []
|
131
101
|
|
@@ -136,6 +106,7 @@ extra_rdoc_files: []
|
|
136
106
|
files:
|
137
107
|
- .gitignore
|
138
108
|
- .rspec
|
109
|
+
- .rvmrc
|
139
110
|
- .travis.yml
|
140
111
|
- CHANGELOG.md
|
141
112
|
- Gemfile
|
@@ -145,7 +116,9 @@ files:
|
|
145
116
|
- httpi.gemspec
|
146
117
|
- lib/httpi.rb
|
147
118
|
- lib/httpi/adapter.rb
|
119
|
+
- lib/httpi/adapter/base.rb
|
148
120
|
- lib/httpi/adapter/curb.rb
|
121
|
+
- lib/httpi/adapter/em_http.rb
|
149
122
|
- lib/httpi/adapter/httpclient.rb
|
150
123
|
- lib/httpi/adapter/net_http.rb
|
151
124
|
- lib/httpi/auth/config.rb
|
@@ -163,7 +136,9 @@ files:
|
|
163
136
|
- spec/fixtures/xml.xml
|
164
137
|
- spec/fixtures/xml_dime.dime
|
165
138
|
- spec/fixtures/xml_dime.xml
|
139
|
+
- spec/httpi/adapter/base_spec.rb
|
166
140
|
- spec/httpi/adapter/curb_spec.rb
|
141
|
+
- spec/httpi/adapter/em_http_spec.rb
|
167
142
|
- spec/httpi/adapter/httpclient_spec.rb
|
168
143
|
- spec/httpi/adapter/net_http_spec.rb
|
169
144
|
- spec/httpi/adapter_spec.rb
|
@@ -174,12 +149,22 @@ files:
|
|
174
149
|
- spec/httpi/httpi_spec.rb
|
175
150
|
- spec/httpi/request_spec.rb
|
176
151
|
- spec/httpi/response_spec.rb
|
152
|
+
- spec/integration/fixtures/ca.pem
|
153
|
+
- spec/integration/fixtures/ca_all.pem
|
154
|
+
- spec/integration/fixtures/htdigest
|
155
|
+
- spec/integration/fixtures/htpasswd
|
156
|
+
- spec/integration/fixtures/server.cert
|
157
|
+
- spec/integration/fixtures/server.key
|
158
|
+
- spec/integration/fixtures/subca.pem
|
177
159
|
- spec/integration/request_spec.rb
|
178
160
|
- spec/integration/server.rb
|
161
|
+
- spec/integration/ssl_server.rb
|
162
|
+
- spec/integration/ssl_spec.rb
|
179
163
|
- spec/spec_helper.rb
|
180
164
|
- spec/support/fixture.rb
|
181
165
|
- spec/support/matchers.rb
|
182
|
-
|
166
|
+
has_rdoc: true
|
167
|
+
homepage: http://github.com/savonrb/httpi
|
183
168
|
licenses: []
|
184
169
|
|
185
170
|
post_install_message:
|
@@ -199,18 +184,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
199
184
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
200
185
|
none: false
|
201
186
|
requirements:
|
202
|
-
- - "
|
187
|
+
- - ">"
|
203
188
|
- !ruby/object:Gem::Version
|
204
|
-
hash:
|
189
|
+
hash: 25
|
205
190
|
segments:
|
206
|
-
-
|
207
|
-
|
191
|
+
- 1
|
192
|
+
- 3
|
193
|
+
- 1
|
194
|
+
version: 1.3.1
|
208
195
|
requirements: []
|
209
196
|
|
210
197
|
rubyforge_project: httpi
|
211
|
-
rubygems_version: 1.
|
198
|
+
rubygems_version: 1.6.2
|
212
199
|
signing_key:
|
213
200
|
specification_version: 3
|
214
|
-
summary:
|
201
|
+
summary: Common interface for Ruby's HTTP libraries
|
215
202
|
test_files: []
|
216
203
|
|