rubysl-net-http 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +0 -1
- data/.travis.yml +7 -0
- data/README.md +2 -2
- data/Rakefile +0 -1
- data/lib/net/http.rb +1 -0
- data/lib/rubysl/net/http.rb +2 -0
- data/lib/rubysl/net/http/http.rb +2290 -0
- data/lib/rubysl/net/http/https.rb +173 -0
- data/lib/{rubysl-net-http → rubysl/net/http}/version.rb +2 -2
- data/rubysl-net-http.gemspec +18 -18
- data/spec/HTTPBadResponse_spec.rb +7 -0
- data/spec/HTTPError_spec.rb +11 -0
- data/spec/HTTPFatalError_spec.rb +11 -0
- data/spec/HTTPHeaderSyntaxError_spec.rb +7 -0
- data/spec/HTTPRetriableError_spec.rb +11 -0
- data/spec/HTTPServerException_spec.rb +11 -0
- data/spec/http/Proxy_spec.rb +34 -0
- data/spec/http/active_spec.rb +7 -0
- data/spec/http/address_spec.rb +8 -0
- data/spec/http/close_on_empty_response_spec.rb +9 -0
- data/spec/http/copy_spec.rb +26 -0
- data/spec/http/default_port_spec.rb +7 -0
- data/spec/http/delete_spec.rb +26 -0
- data/spec/http/finish_spec.rb +30 -0
- data/spec/http/fixtures/http_server.rb +97 -0
- data/spec/http/get2_spec.rb +7 -0
- data/spec/http/get_print_spec.rb +28 -0
- data/spec/http/get_response_spec.rb +28 -0
- data/spec/http/get_spec.rb +52 -0
- data/spec/http/head2_spec.rb +8 -0
- data/spec/http/head_spec.rb +30 -0
- data/spec/http/http_default_port_spec.rb +7 -0
- data/spec/http/https_default_port_spec.rb +7 -0
- data/spec/http/initialize_spec.rb +45 -0
- data/spec/http/inspect_spec.rb +25 -0
- data/spec/http/is_version_1_1_spec.rb +6 -0
- data/spec/http/is_version_1_2_spec.rb +6 -0
- data/spec/http/lock_spec.rb +26 -0
- data/spec/http/mkcol_spec.rb +26 -0
- data/spec/http/move_spec.rb +30 -0
- data/spec/http/new_spec.rb +96 -0
- data/spec/http/newobj_spec.rb +47 -0
- data/spec/http/open_timeout_spec.rb +23 -0
- data/spec/http/options_spec.rb +30 -0
- data/spec/http/port_spec.rb +8 -0
- data/spec/http/post2_spec.rb +7 -0
- data/spec/http/post_form_spec.rb +20 -0
- data/spec/http/post_spec.rb +43 -0
- data/spec/http/propfind_spec.rb +29 -0
- data/spec/http/proppatch_spec.rb +29 -0
- data/spec/http/proxy_address_spec.rb +30 -0
- data/spec/http/proxy_class_spec.rb +8 -0
- data/spec/http/proxy_pass_spec.rb +38 -0
- data/spec/http/proxy_port_spec.rb +38 -0
- data/spec/http/proxy_user_spec.rb +38 -0
- data/spec/http/put2_spec.rb +7 -0
- data/spec/http/put_spec.rb +29 -0
- data/spec/http/read_timeout_spec.rb +23 -0
- data/spec/http/request_get_spec.rb +7 -0
- data/spec/http/request_head_spec.rb +7 -0
- data/spec/http/request_post_spec.rb +7 -0
- data/spec/http/request_put_spec.rb +7 -0
- data/spec/http/request_spec.rb +114 -0
- data/spec/http/request_types_spec.rb +253 -0
- data/spec/http/send_request_spec.rb +123 -0
- data/spec/http/set_debug_output_spec.rb +34 -0
- data/spec/http/shared/request_get.rb +49 -0
- data/spec/http/shared/request_head.rb +49 -0
- data/spec/http/shared/request_post.rb +49 -0
- data/spec/http/shared/request_put.rb +49 -0
- data/spec/http/shared/started.rb +28 -0
- data/spec/http/shared/version_1_1.rb +19 -0
- data/spec/http/shared/version_1_2.rb +6 -0
- data/spec/http/socket_type_spec.rb +7 -0
- data/spec/http/start_spec.rb +115 -0
- data/spec/http/started_spec.rb +7 -0
- data/spec/http/trace_spec.rb +29 -0
- data/spec/http/unlock_spec.rb +29 -0
- data/spec/http/use_ssl_spec.rb +8 -0
- data/spec/http/version_1_1_spec.rb +21 -0
- data/spec/http/version_1_2_spec.rb +19 -0
- data/spec/httpexceptions/fixtures/classes.rb +5 -0
- data/spec/httpexceptions/initialize_spec.rb +16 -0
- data/spec/httpexceptions/response_spec.rb +9 -0
- data/spec/httpgenericrequest/body_exist_spec.rb +26 -0
- data/spec/httpgenericrequest/body_spec.rb +29 -0
- data/spec/httpgenericrequest/body_stream_spec.rb +31 -0
- data/spec/httpgenericrequest/exec_spec.rb +135 -0
- data/spec/httpgenericrequest/inspect_spec.rb +24 -0
- data/spec/httpgenericrequest/method_spec.rb +14 -0
- data/spec/httpgenericrequest/path_spec.rb +11 -0
- data/spec/httpgenericrequest/request_body_permitted_spec.rb +11 -0
- data/spec/httpgenericrequest/response_body_permitted_spec.rb +11 -0
- data/spec/httpgenericrequest/set_body_internal_spec.rb +20 -0
- data/spec/httpheader/add_field_spec.rb +30 -0
- data/spec/httpheader/basic_auth_spec.rb +13 -0
- data/spec/httpheader/canonical_each_spec.rb +7 -0
- data/spec/httpheader/chunked_spec.rb +21 -0
- data/spec/httpheader/content_length_spec.rb +53 -0
- data/spec/httpheader/content_range_spec.rb +33 -0
- data/spec/httpheader/content_type_spec.rb +25 -0
- data/spec/httpheader/delete_spec.rb +29 -0
- data/spec/httpheader/each_capitalized_name_spec.rb +44 -0
- data/spec/httpheader/each_capitalized_spec.rb +8 -0
- data/spec/httpheader/each_header_spec.rb +7 -0
- data/spec/httpheader/each_key_spec.rb +7 -0
- data/spec/httpheader/each_name_spec.rb +7 -0
- data/spec/httpheader/each_spec.rb +7 -0
- data/spec/httpheader/each_value_spec.rb +45 -0
- data/spec/httpheader/element_reference_spec.rb +38 -0
- data/spec/httpheader/element_set_spec.rb +40 -0
- data/spec/httpheader/fetch_spec.rb +68 -0
- data/spec/httpheader/fixtures/classes.rb +11 -0
- data/spec/httpheader/form_data_spec.rb +7 -0
- data/spec/httpheader/get_fields_spec.rb +38 -0
- data/spec/httpheader/initialize_http_header_spec.rb +28 -0
- data/spec/httpheader/key_spec.rb +20 -0
- data/spec/httpheader/length_spec.rb +7 -0
- data/spec/httpheader/main_type_spec.rb +23 -0
- data/spec/httpheader/proxy_basic_auth_spec.rb +13 -0
- data/spec/httpheader/range_length_spec.rb +31 -0
- data/spec/httpheader/range_spec.rb +47 -0
- data/spec/httpheader/set_content_type_spec.rb +7 -0
- data/spec/httpheader/set_form_data_spec.rb +7 -0
- data/spec/httpheader/set_range_spec.rb +7 -0
- data/spec/httpheader/shared/each_capitalized.rb +42 -0
- data/spec/httpheader/shared/each_header.rb +42 -0
- data/spec/httpheader/shared/each_name.rb +39 -0
- data/spec/httpheader/shared/set_content_type.rb +20 -0
- data/spec/httpheader/shared/set_form_data.rb +27 -0
- data/spec/httpheader/shared/set_range.rb +89 -0
- data/spec/httpheader/shared/size.rb +18 -0
- data/spec/httpheader/size_spec.rb +7 -0
- data/spec/httpheader/sub_type_spec.rb +31 -0
- data/spec/httpheader/to_hash_spec.rb +24 -0
- data/spec/httpheader/type_params_spec.rb +23 -0
- data/spec/httprequest/initialize_spec.rb +44 -0
- data/spec/httpresponse/body_permitted_spec.rb +12 -0
- data/spec/httpresponse/body_spec.rb +6 -0
- data/spec/httpresponse/code_spec.rb +23 -0
- data/spec/httpresponse/code_type_spec.rb +23 -0
- data/spec/httpresponse/entity_spec.rb +6 -0
- data/spec/httpresponse/error_spec.rb +23 -0
- data/spec/httpresponse/error_type_spec.rb +23 -0
- data/spec/httpresponse/exception_type_spec.rb +12 -0
- data/spec/httpresponse/header_spec.rb +8 -0
- data/spec/httpresponse/http_version_spec.rb +11 -0
- data/spec/httpresponse/initialize_spec.rb +10 -0
- data/spec/httpresponse/inspect_spec.rb +14 -0
- data/spec/httpresponse/message_spec.rb +8 -0
- data/spec/httpresponse/msg_spec.rb +8 -0
- data/spec/httpresponse/read_body_spec.rb +85 -0
- data/spec/httpresponse/read_header_spec.rb +8 -0
- data/spec/httpresponse/read_new_spec.rb +21 -0
- data/spec/httpresponse/reading_body_spec.rb +57 -0
- data/spec/httpresponse/response_spec.rb +8 -0
- data/spec/httpresponse/shared/body.rb +18 -0
- data/spec/httpresponse/to_ary_spec.rb +25 -0
- data/spec/httpresponse/value_spec.rb +23 -0
- metadata +366 -88
- data/lib/rubysl-net-http.rb +0 -9
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
|
3
|
+
describe "Net::HTTPResponse#http_version" do
|
4
|
+
it "returns self's http version" do
|
5
|
+
res = Net::HTTPUnknownResponse.new("1.0", "???", "test response")
|
6
|
+
res.http_version.should == "1.0"
|
7
|
+
|
8
|
+
res = Net::HTTPUnknownResponse.new("1.1", "???", "test response")
|
9
|
+
res.http_version.should == "1.1"
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
|
3
|
+
describe "Net::HTTPResponse#initialize when passed http_version, response_code, response_message" do
|
4
|
+
it "sets self http_version, response_code and response_message to the passed values" do
|
5
|
+
res = Net::HTTPUnknownResponse.new("1.0", "???", "test response")
|
6
|
+
res.http_version.should == "1.0"
|
7
|
+
res.code.should == "???"
|
8
|
+
res.message.should == "test response"
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require "stringio"
|
3
|
+
|
4
|
+
describe "Net::HTTPResponse#inspect" do
|
5
|
+
it "returns a String representation of self" do
|
6
|
+
res = Net::HTTPUnknownResponse.new("1.0", "???", "test response")
|
7
|
+
res.inspect.should == "#<Net::HTTPUnknownResponse ??? test response readbody=false>"
|
8
|
+
|
9
|
+
res = Net::HTTPUnknownResponse.new("1.0", "???", "test response")
|
10
|
+
socket = Net::BufferedIO.new(StringIO.new("test body"))
|
11
|
+
res.reading_body(socket, true) {}
|
12
|
+
res.inspect.should == "#<Net::HTTPUnknownResponse ??? test response readbody=true>"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
|
3
|
+
describe "Net::HTTPResponse#read_body" do
|
4
|
+
before(:each) do
|
5
|
+
@res = Net::HTTPUnknownResponse.new("1.0", "???", "test response")
|
6
|
+
@socket = Net::BufferedIO.new(StringIO.new("test body"))
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "when passed no arguments" do
|
10
|
+
it "returns the read body" do
|
11
|
+
@res.reading_body(@socket, true) do
|
12
|
+
@res.read_body.should == "test body"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
it "returns the previously read body if called a second time" do
|
17
|
+
@res.reading_body(@socket, true) do
|
18
|
+
@res.read_body.should equal(@res.read_body)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "when passed a buffer" do
|
24
|
+
it "reads the body to the passed buffer" do
|
25
|
+
@res.reading_body(@socket, true) do
|
26
|
+
buffer = ""
|
27
|
+
@res.read_body(buffer)
|
28
|
+
buffer.should == "test body"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
it "returns the passed buffer" do
|
33
|
+
@res.reading_body(@socket, true) do
|
34
|
+
buffer = ""
|
35
|
+
@res.read_body(buffer).should equal(buffer)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
it "raises an IOError if called a second time" do
|
40
|
+
@res.reading_body(@socket, true) do
|
41
|
+
@res.read_body("")
|
42
|
+
lambda { @res.read_body("") }.should raise_error(IOError)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe "when passed a block" do
|
48
|
+
it "reads the body and yields it to the passed block (in chunks)" do
|
49
|
+
@res.reading_body(@socket, true) do
|
50
|
+
yielded = false
|
51
|
+
|
52
|
+
buffer = ""
|
53
|
+
@res.read_body do |body|
|
54
|
+
yielded = true
|
55
|
+
buffer << body
|
56
|
+
end
|
57
|
+
|
58
|
+
yielded.should be_true
|
59
|
+
buffer.should == "test body"
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
it "returns the ReadAdapter" do
|
64
|
+
@res.reading_body(@socket, true) do
|
65
|
+
@res.read_body { nil }.should be_kind_of(Net::ReadAdapter)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
it "raises an IOError if called a second time" do
|
70
|
+
@res.reading_body(@socket, true) do
|
71
|
+
@res.read_body {}
|
72
|
+
lambda { @res.read_body {} }.should raise_error(IOError)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe "when passed buffer and block" do
|
78
|
+
it "rauses an ArgumentError" do
|
79
|
+
@res.reading_body(@socket, true) do
|
80
|
+
lambda { @res.read_body("") {} }.should raise_error(ArgumentError)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
|
3
|
+
describe "Net::HTTPResponse.read_new" do
|
4
|
+
it "creates a HTTPResponse object based on the response read from the passed socket" do
|
5
|
+
socket = Net::BufferedIO.new(StringIO.new(<<EOS))
|
6
|
+
HTTP/1.1 200 OK
|
7
|
+
Content-Type: text/html; charset=utf-8
|
8
|
+
|
9
|
+
test-body
|
10
|
+
EOS
|
11
|
+
response = Net::HTTPResponse.read_new(socket)
|
12
|
+
|
13
|
+
response.should be_kind_of(Net::HTTPOK)
|
14
|
+
response.code.should == "200"
|
15
|
+
response["Content-Type"].should == "text/html; charset=utf-8"
|
16
|
+
|
17
|
+
response.reading_body(socket, true) do
|
18
|
+
response.body.should == "test-body\n"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require "stringio"
|
3
|
+
|
4
|
+
describe "Net::HTTPResponse#reading_body" do
|
5
|
+
before(:each) do
|
6
|
+
@res = Net::HTTPUnknownResponse.new("1.0", "???", "test response")
|
7
|
+
@socket = Net::BufferedIO.new(StringIO.new("test body"))
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "when body_allowed is true" do
|
11
|
+
it "reads and returns the response body for self from the passed socket" do
|
12
|
+
@res.reading_body(@socket, true) {}.should == "test body"
|
13
|
+
@res.body.should == "test body"
|
14
|
+
end
|
15
|
+
|
16
|
+
it "yields the passed block before reading the body" do
|
17
|
+
yielded = false
|
18
|
+
|
19
|
+
@res.reading_body(@socket, true) do
|
20
|
+
@res.inspect.should == "#<Net::HTTPUnknownResponse ??? test response readbody=false>"
|
21
|
+
yielded = true
|
22
|
+
end
|
23
|
+
|
24
|
+
yielded.should be_true
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "but the response type is not allowed to have a body" do
|
28
|
+
before(:each) do
|
29
|
+
@res = Net::HTTPInformation.new("1.0", "???", "test response")
|
30
|
+
end
|
31
|
+
|
32
|
+
it "returns nil" do
|
33
|
+
@res.reading_body(@socket, false) {}.should be_nil
|
34
|
+
@res.body.should be_nil
|
35
|
+
end
|
36
|
+
|
37
|
+
it "yields the passed block" do
|
38
|
+
yielded = false
|
39
|
+
@res.reading_body(@socket, true) { yielded = true }
|
40
|
+
yielded.should be_true
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "when body_allowed is false" do
|
46
|
+
it "returns nil" do
|
47
|
+
@res.reading_body(@socket, false) {}.should be_nil
|
48
|
+
@res.body.should be_nil
|
49
|
+
end
|
50
|
+
|
51
|
+
it "yields the passed block" do
|
52
|
+
yielded = false
|
53
|
+
@res.reading_body(@socket, true) { yielded = true }
|
54
|
+
yielded.should be_true
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
describe :net_httpresponse_body, :shared => true do
|
2
|
+
before(:each) do
|
3
|
+
@res = Net::HTTPUnknownResponse.new("1.0", "???", "test response")
|
4
|
+
@socket = Net::BufferedIO.new(StringIO.new("test body"))
|
5
|
+
end
|
6
|
+
|
7
|
+
it "returns the read body" do
|
8
|
+
@res.reading_body(@socket, true) do
|
9
|
+
@res.send(@method).should == "test body"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
it "returns the previously read body if called a second time" do
|
14
|
+
@res.reading_body(@socket, true) do
|
15
|
+
@res.send(@method).should equal(@res.send(@method))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require "stringio"
|
3
|
+
|
4
|
+
ruby_version_is ''...'1.9.3' do
|
5
|
+
describe "Net::HTTPResponse#to_ary" do
|
6
|
+
before(:each) do
|
7
|
+
@res = Net::HTTPUnknownResponse.new("1.0", "???", "test response")
|
8
|
+
|
9
|
+
socket = Net::BufferedIO.new(StringIO.new("test body"))
|
10
|
+
@res.reading_body(socket, true) {}
|
11
|
+
end
|
12
|
+
|
13
|
+
it "returns an Array containing a duplicate of self and self's body" do
|
14
|
+
ary = @res.to_ary
|
15
|
+
ary.size.should == 2
|
16
|
+
|
17
|
+
ary[0].inspect.should == @res.inspect
|
18
|
+
ary[1].should == "test body"
|
19
|
+
end
|
20
|
+
|
21
|
+
it "removes #to_ary from the duplicate of self" do
|
22
|
+
@res.to_ary[0].respond_to?(:to_ary).should be_false
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
|
3
|
+
describe "Net::HTTPResponse#value" do
|
4
|
+
it "raises an HTTP error for non 2xx HTTP Responses" do
|
5
|
+
res = Net::HTTPUnknownResponse.new("1.0", "???", "test response")
|
6
|
+
lambda { res.value }.should raise_error(Net::HTTPError)
|
7
|
+
|
8
|
+
res = Net::HTTPInformation.new("1.0", "1xx", "test response")
|
9
|
+
lambda { res.value }.should raise_error(Net::HTTPError)
|
10
|
+
|
11
|
+
res = Net::HTTPSuccess.new("1.0", "2xx", "test response")
|
12
|
+
lambda { res.value }.should_not raise_error(Net::HTTPError)
|
13
|
+
|
14
|
+
res = Net::HTTPRedirection.new("1.0", "3xx", "test response")
|
15
|
+
lambda { res.value }.should raise_error(Net::HTTPRetriableError)
|
16
|
+
|
17
|
+
res = Net::HTTPClientError.new("1.0", "4xx", "test response")
|
18
|
+
lambda { res.value }.should raise_error(Net::HTTPServerException)
|
19
|
+
|
20
|
+
res = Net::HTTPServerError.new("1.0", "5xx", "test response")
|
21
|
+
lambda { res.value }.should raise_error(Net::HTTPFatalError)
|
22
|
+
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,118 +1,396 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubysl-net-http
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 1
|
10
|
-
version: 0.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Brian Shirai
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
date: 2013-08-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
22
21
|
prerelease: false
|
23
|
-
|
24
|
-
|
25
|
-
requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
26
24
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
|
30
|
-
- 1
|
31
|
-
- 0
|
32
|
-
version: "1.0"
|
33
|
-
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
36
28
|
name: rake
|
37
|
-
|
38
|
-
|
39
|
-
none: false
|
40
|
-
requirements:
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
41
31
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
segments:
|
45
|
-
- 10
|
46
|
-
- 0
|
47
|
-
version: "10.0"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
48
34
|
type: :development
|
49
|
-
version_requirements: *id002
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
name: mspec
|
52
35
|
prerelease: false
|
53
|
-
|
54
|
-
|
55
|
-
requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
56
38
|
- - ~>
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: mspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.5'
|
63
48
|
type: :development
|
64
|
-
|
65
|
-
|
66
|
-
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.5'
|
55
|
+
description: Ruby standard library net-http.
|
56
|
+
email:
|
67
57
|
- brixen@gmail.com
|
68
58
|
executables: []
|
69
|
-
|
70
59
|
extensions: []
|
71
|
-
|
72
60
|
extra_rdoc_files: []
|
73
|
-
|
74
|
-
files:
|
61
|
+
files:
|
75
62
|
- .gitignore
|
63
|
+
- .travis.yml
|
76
64
|
- Gemfile
|
77
65
|
- LICENSE
|
78
66
|
- README.md
|
79
67
|
- Rakefile
|
80
|
-
- lib/
|
81
|
-
- lib/rubysl
|
68
|
+
- lib/net/http.rb
|
69
|
+
- lib/rubysl/net/http.rb
|
70
|
+
- lib/rubysl/net/http/http.rb
|
71
|
+
- lib/rubysl/net/http/https.rb
|
72
|
+
- lib/rubysl/net/http/version.rb
|
82
73
|
- rubysl-net-http.gemspec
|
83
|
-
|
84
|
-
|
85
|
-
|
74
|
+
- spec/HTTPBadResponse_spec.rb
|
75
|
+
- spec/HTTPError_spec.rb
|
76
|
+
- spec/HTTPFatalError_spec.rb
|
77
|
+
- spec/HTTPHeaderSyntaxError_spec.rb
|
78
|
+
- spec/HTTPRetriableError_spec.rb
|
79
|
+
- spec/HTTPServerException_spec.rb
|
80
|
+
- spec/http/Proxy_spec.rb
|
81
|
+
- spec/http/active_spec.rb
|
82
|
+
- spec/http/address_spec.rb
|
83
|
+
- spec/http/close_on_empty_response_spec.rb
|
84
|
+
- spec/http/copy_spec.rb
|
85
|
+
- spec/http/default_port_spec.rb
|
86
|
+
- spec/http/delete_spec.rb
|
87
|
+
- spec/http/finish_spec.rb
|
88
|
+
- spec/http/fixtures/http_server.rb
|
89
|
+
- spec/http/get2_spec.rb
|
90
|
+
- spec/http/get_print_spec.rb
|
91
|
+
- spec/http/get_response_spec.rb
|
92
|
+
- spec/http/get_spec.rb
|
93
|
+
- spec/http/head2_spec.rb
|
94
|
+
- spec/http/head_spec.rb
|
95
|
+
- spec/http/http_default_port_spec.rb
|
96
|
+
- spec/http/https_default_port_spec.rb
|
97
|
+
- spec/http/initialize_spec.rb
|
98
|
+
- spec/http/inspect_spec.rb
|
99
|
+
- spec/http/is_version_1_1_spec.rb
|
100
|
+
- spec/http/is_version_1_2_spec.rb
|
101
|
+
- spec/http/lock_spec.rb
|
102
|
+
- spec/http/mkcol_spec.rb
|
103
|
+
- spec/http/move_spec.rb
|
104
|
+
- spec/http/new_spec.rb
|
105
|
+
- spec/http/newobj_spec.rb
|
106
|
+
- spec/http/open_timeout_spec.rb
|
107
|
+
- spec/http/options_spec.rb
|
108
|
+
- spec/http/port_spec.rb
|
109
|
+
- spec/http/post2_spec.rb
|
110
|
+
- spec/http/post_form_spec.rb
|
111
|
+
- spec/http/post_spec.rb
|
112
|
+
- spec/http/propfind_spec.rb
|
113
|
+
- spec/http/proppatch_spec.rb
|
114
|
+
- spec/http/proxy_address_spec.rb
|
115
|
+
- spec/http/proxy_class_spec.rb
|
116
|
+
- spec/http/proxy_pass_spec.rb
|
117
|
+
- spec/http/proxy_port_spec.rb
|
118
|
+
- spec/http/proxy_user_spec.rb
|
119
|
+
- spec/http/put2_spec.rb
|
120
|
+
- spec/http/put_spec.rb
|
121
|
+
- spec/http/read_timeout_spec.rb
|
122
|
+
- spec/http/request_get_spec.rb
|
123
|
+
- spec/http/request_head_spec.rb
|
124
|
+
- spec/http/request_post_spec.rb
|
125
|
+
- spec/http/request_put_spec.rb
|
126
|
+
- spec/http/request_spec.rb
|
127
|
+
- spec/http/request_types_spec.rb
|
128
|
+
- spec/http/send_request_spec.rb
|
129
|
+
- spec/http/set_debug_output_spec.rb
|
130
|
+
- spec/http/shared/request_get.rb
|
131
|
+
- spec/http/shared/request_head.rb
|
132
|
+
- spec/http/shared/request_post.rb
|
133
|
+
- spec/http/shared/request_put.rb
|
134
|
+
- spec/http/shared/started.rb
|
135
|
+
- spec/http/shared/version_1_1.rb
|
136
|
+
- spec/http/shared/version_1_2.rb
|
137
|
+
- spec/http/socket_type_spec.rb
|
138
|
+
- spec/http/start_spec.rb
|
139
|
+
- spec/http/started_spec.rb
|
140
|
+
- spec/http/trace_spec.rb
|
141
|
+
- spec/http/unlock_spec.rb
|
142
|
+
- spec/http/use_ssl_spec.rb
|
143
|
+
- spec/http/version_1_1_spec.rb
|
144
|
+
- spec/http/version_1_2_spec.rb
|
145
|
+
- spec/httpexceptions/fixtures/classes.rb
|
146
|
+
- spec/httpexceptions/initialize_spec.rb
|
147
|
+
- spec/httpexceptions/response_spec.rb
|
148
|
+
- spec/httpgenericrequest/body_exist_spec.rb
|
149
|
+
- spec/httpgenericrequest/body_spec.rb
|
150
|
+
- spec/httpgenericrequest/body_stream_spec.rb
|
151
|
+
- spec/httpgenericrequest/exec_spec.rb
|
152
|
+
- spec/httpgenericrequest/inspect_spec.rb
|
153
|
+
- spec/httpgenericrequest/method_spec.rb
|
154
|
+
- spec/httpgenericrequest/path_spec.rb
|
155
|
+
- spec/httpgenericrequest/request_body_permitted_spec.rb
|
156
|
+
- spec/httpgenericrequest/response_body_permitted_spec.rb
|
157
|
+
- spec/httpgenericrequest/set_body_internal_spec.rb
|
158
|
+
- spec/httpheader/add_field_spec.rb
|
159
|
+
- spec/httpheader/basic_auth_spec.rb
|
160
|
+
- spec/httpheader/canonical_each_spec.rb
|
161
|
+
- spec/httpheader/chunked_spec.rb
|
162
|
+
- spec/httpheader/content_length_spec.rb
|
163
|
+
- spec/httpheader/content_range_spec.rb
|
164
|
+
- spec/httpheader/content_type_spec.rb
|
165
|
+
- spec/httpheader/delete_spec.rb
|
166
|
+
- spec/httpheader/each_capitalized_name_spec.rb
|
167
|
+
- spec/httpheader/each_capitalized_spec.rb
|
168
|
+
- spec/httpheader/each_header_spec.rb
|
169
|
+
- spec/httpheader/each_key_spec.rb
|
170
|
+
- spec/httpheader/each_name_spec.rb
|
171
|
+
- spec/httpheader/each_spec.rb
|
172
|
+
- spec/httpheader/each_value_spec.rb
|
173
|
+
- spec/httpheader/element_reference_spec.rb
|
174
|
+
- spec/httpheader/element_set_spec.rb
|
175
|
+
- spec/httpheader/fetch_spec.rb
|
176
|
+
- spec/httpheader/fixtures/classes.rb
|
177
|
+
- spec/httpheader/form_data_spec.rb
|
178
|
+
- spec/httpheader/get_fields_spec.rb
|
179
|
+
- spec/httpheader/initialize_http_header_spec.rb
|
180
|
+
- spec/httpheader/key_spec.rb
|
181
|
+
- spec/httpheader/length_spec.rb
|
182
|
+
- spec/httpheader/main_type_spec.rb
|
183
|
+
- spec/httpheader/proxy_basic_auth_spec.rb
|
184
|
+
- spec/httpheader/range_length_spec.rb
|
185
|
+
- spec/httpheader/range_spec.rb
|
186
|
+
- spec/httpheader/set_content_type_spec.rb
|
187
|
+
- spec/httpheader/set_form_data_spec.rb
|
188
|
+
- spec/httpheader/set_range_spec.rb
|
189
|
+
- spec/httpheader/shared/each_capitalized.rb
|
190
|
+
- spec/httpheader/shared/each_header.rb
|
191
|
+
- spec/httpheader/shared/each_name.rb
|
192
|
+
- spec/httpheader/shared/set_content_type.rb
|
193
|
+
- spec/httpheader/shared/set_form_data.rb
|
194
|
+
- spec/httpheader/shared/set_range.rb
|
195
|
+
- spec/httpheader/shared/size.rb
|
196
|
+
- spec/httpheader/size_spec.rb
|
197
|
+
- spec/httpheader/sub_type_spec.rb
|
198
|
+
- spec/httpheader/to_hash_spec.rb
|
199
|
+
- spec/httpheader/type_params_spec.rb
|
200
|
+
- spec/httprequest/initialize_spec.rb
|
201
|
+
- spec/httpresponse/body_permitted_spec.rb
|
202
|
+
- spec/httpresponse/body_spec.rb
|
203
|
+
- spec/httpresponse/code_spec.rb
|
204
|
+
- spec/httpresponse/code_type_spec.rb
|
205
|
+
- spec/httpresponse/entity_spec.rb
|
206
|
+
- spec/httpresponse/error_spec.rb
|
207
|
+
- spec/httpresponse/error_type_spec.rb
|
208
|
+
- spec/httpresponse/exception_type_spec.rb
|
209
|
+
- spec/httpresponse/header_spec.rb
|
210
|
+
- spec/httpresponse/http_version_spec.rb
|
211
|
+
- spec/httpresponse/initialize_spec.rb
|
212
|
+
- spec/httpresponse/inspect_spec.rb
|
213
|
+
- spec/httpresponse/message_spec.rb
|
214
|
+
- spec/httpresponse/msg_spec.rb
|
215
|
+
- spec/httpresponse/read_body_spec.rb
|
216
|
+
- spec/httpresponse/read_header_spec.rb
|
217
|
+
- spec/httpresponse/read_new_spec.rb
|
218
|
+
- spec/httpresponse/reading_body_spec.rb
|
219
|
+
- spec/httpresponse/response_spec.rb
|
220
|
+
- spec/httpresponse/shared/body.rb
|
221
|
+
- spec/httpresponse/to_ary_spec.rb
|
222
|
+
- spec/httpresponse/value_spec.rb
|
223
|
+
homepage: https://github.com/rubysl/rubysl-net-http
|
224
|
+
licenses:
|
225
|
+
- BSD
|
226
|
+
metadata: {}
|
86
227
|
post_install_message:
|
87
228
|
rdoc_options: []
|
88
|
-
|
89
|
-
require_paths:
|
229
|
+
require_paths:
|
90
230
|
- lib
|
91
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
none: false
|
102
|
-
requirements:
|
103
|
-
- - ">="
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
hash: 2002549777813010636
|
106
|
-
segments:
|
107
|
-
- 0
|
108
|
-
version: "0"
|
231
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
232
|
+
requirements:
|
233
|
+
- - '>='
|
234
|
+
- !ruby/object:Gem::Version
|
235
|
+
version: '0'
|
236
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
237
|
+
requirements:
|
238
|
+
- - '>='
|
239
|
+
- !ruby/object:Gem::Version
|
240
|
+
version: '0'
|
109
241
|
requirements: []
|
110
|
-
|
111
242
|
rubyforge_project:
|
112
|
-
rubygems_version:
|
243
|
+
rubygems_version: 2.0.7
|
113
244
|
signing_key:
|
114
|
-
specification_version:
|
115
|
-
summary: Ruby
|
116
|
-
test_files:
|
117
|
-
|
118
|
-
|
245
|
+
specification_version: 4
|
246
|
+
summary: Ruby standard library net-http.
|
247
|
+
test_files:
|
248
|
+
- spec/HTTPBadResponse_spec.rb
|
249
|
+
- spec/HTTPError_spec.rb
|
250
|
+
- spec/HTTPFatalError_spec.rb
|
251
|
+
- spec/HTTPHeaderSyntaxError_spec.rb
|
252
|
+
- spec/HTTPRetriableError_spec.rb
|
253
|
+
- spec/HTTPServerException_spec.rb
|
254
|
+
- spec/http/Proxy_spec.rb
|
255
|
+
- spec/http/active_spec.rb
|
256
|
+
- spec/http/address_spec.rb
|
257
|
+
- spec/http/close_on_empty_response_spec.rb
|
258
|
+
- spec/http/copy_spec.rb
|
259
|
+
- spec/http/default_port_spec.rb
|
260
|
+
- spec/http/delete_spec.rb
|
261
|
+
- spec/http/finish_spec.rb
|
262
|
+
- spec/http/fixtures/http_server.rb
|
263
|
+
- spec/http/get2_spec.rb
|
264
|
+
- spec/http/get_print_spec.rb
|
265
|
+
- spec/http/get_response_spec.rb
|
266
|
+
- spec/http/get_spec.rb
|
267
|
+
- spec/http/head2_spec.rb
|
268
|
+
- spec/http/head_spec.rb
|
269
|
+
- spec/http/http_default_port_spec.rb
|
270
|
+
- spec/http/https_default_port_spec.rb
|
271
|
+
- spec/http/initialize_spec.rb
|
272
|
+
- spec/http/inspect_spec.rb
|
273
|
+
- spec/http/is_version_1_1_spec.rb
|
274
|
+
- spec/http/is_version_1_2_spec.rb
|
275
|
+
- spec/http/lock_spec.rb
|
276
|
+
- spec/http/mkcol_spec.rb
|
277
|
+
- spec/http/move_spec.rb
|
278
|
+
- spec/http/new_spec.rb
|
279
|
+
- spec/http/newobj_spec.rb
|
280
|
+
- spec/http/open_timeout_spec.rb
|
281
|
+
- spec/http/options_spec.rb
|
282
|
+
- spec/http/port_spec.rb
|
283
|
+
- spec/http/post2_spec.rb
|
284
|
+
- spec/http/post_form_spec.rb
|
285
|
+
- spec/http/post_spec.rb
|
286
|
+
- spec/http/propfind_spec.rb
|
287
|
+
- spec/http/proppatch_spec.rb
|
288
|
+
- spec/http/proxy_address_spec.rb
|
289
|
+
- spec/http/proxy_class_spec.rb
|
290
|
+
- spec/http/proxy_pass_spec.rb
|
291
|
+
- spec/http/proxy_port_spec.rb
|
292
|
+
- spec/http/proxy_user_spec.rb
|
293
|
+
- spec/http/put2_spec.rb
|
294
|
+
- spec/http/put_spec.rb
|
295
|
+
- spec/http/read_timeout_spec.rb
|
296
|
+
- spec/http/request_get_spec.rb
|
297
|
+
- spec/http/request_head_spec.rb
|
298
|
+
- spec/http/request_post_spec.rb
|
299
|
+
- spec/http/request_put_spec.rb
|
300
|
+
- spec/http/request_spec.rb
|
301
|
+
- spec/http/request_types_spec.rb
|
302
|
+
- spec/http/send_request_spec.rb
|
303
|
+
- spec/http/set_debug_output_spec.rb
|
304
|
+
- spec/http/shared/request_get.rb
|
305
|
+
- spec/http/shared/request_head.rb
|
306
|
+
- spec/http/shared/request_post.rb
|
307
|
+
- spec/http/shared/request_put.rb
|
308
|
+
- spec/http/shared/started.rb
|
309
|
+
- spec/http/shared/version_1_1.rb
|
310
|
+
- spec/http/shared/version_1_2.rb
|
311
|
+
- spec/http/socket_type_spec.rb
|
312
|
+
- spec/http/start_spec.rb
|
313
|
+
- spec/http/started_spec.rb
|
314
|
+
- spec/http/trace_spec.rb
|
315
|
+
- spec/http/unlock_spec.rb
|
316
|
+
- spec/http/use_ssl_spec.rb
|
317
|
+
- spec/http/version_1_1_spec.rb
|
318
|
+
- spec/http/version_1_2_spec.rb
|
319
|
+
- spec/httpexceptions/fixtures/classes.rb
|
320
|
+
- spec/httpexceptions/initialize_spec.rb
|
321
|
+
- spec/httpexceptions/response_spec.rb
|
322
|
+
- spec/httpgenericrequest/body_exist_spec.rb
|
323
|
+
- spec/httpgenericrequest/body_spec.rb
|
324
|
+
- spec/httpgenericrequest/body_stream_spec.rb
|
325
|
+
- spec/httpgenericrequest/exec_spec.rb
|
326
|
+
- spec/httpgenericrequest/inspect_spec.rb
|
327
|
+
- spec/httpgenericrequest/method_spec.rb
|
328
|
+
- spec/httpgenericrequest/path_spec.rb
|
329
|
+
- spec/httpgenericrequest/request_body_permitted_spec.rb
|
330
|
+
- spec/httpgenericrequest/response_body_permitted_spec.rb
|
331
|
+
- spec/httpgenericrequest/set_body_internal_spec.rb
|
332
|
+
- spec/httpheader/add_field_spec.rb
|
333
|
+
- spec/httpheader/basic_auth_spec.rb
|
334
|
+
- spec/httpheader/canonical_each_spec.rb
|
335
|
+
- spec/httpheader/chunked_spec.rb
|
336
|
+
- spec/httpheader/content_length_spec.rb
|
337
|
+
- spec/httpheader/content_range_spec.rb
|
338
|
+
- spec/httpheader/content_type_spec.rb
|
339
|
+
- spec/httpheader/delete_spec.rb
|
340
|
+
- spec/httpheader/each_capitalized_name_spec.rb
|
341
|
+
- spec/httpheader/each_capitalized_spec.rb
|
342
|
+
- spec/httpheader/each_header_spec.rb
|
343
|
+
- spec/httpheader/each_key_spec.rb
|
344
|
+
- spec/httpheader/each_name_spec.rb
|
345
|
+
- spec/httpheader/each_spec.rb
|
346
|
+
- spec/httpheader/each_value_spec.rb
|
347
|
+
- spec/httpheader/element_reference_spec.rb
|
348
|
+
- spec/httpheader/element_set_spec.rb
|
349
|
+
- spec/httpheader/fetch_spec.rb
|
350
|
+
- spec/httpheader/fixtures/classes.rb
|
351
|
+
- spec/httpheader/form_data_spec.rb
|
352
|
+
- spec/httpheader/get_fields_spec.rb
|
353
|
+
- spec/httpheader/initialize_http_header_spec.rb
|
354
|
+
- spec/httpheader/key_spec.rb
|
355
|
+
- spec/httpheader/length_spec.rb
|
356
|
+
- spec/httpheader/main_type_spec.rb
|
357
|
+
- spec/httpheader/proxy_basic_auth_spec.rb
|
358
|
+
- spec/httpheader/range_length_spec.rb
|
359
|
+
- spec/httpheader/range_spec.rb
|
360
|
+
- spec/httpheader/set_content_type_spec.rb
|
361
|
+
- spec/httpheader/set_form_data_spec.rb
|
362
|
+
- spec/httpheader/set_range_spec.rb
|
363
|
+
- spec/httpheader/shared/each_capitalized.rb
|
364
|
+
- spec/httpheader/shared/each_header.rb
|
365
|
+
- spec/httpheader/shared/each_name.rb
|
366
|
+
- spec/httpheader/shared/set_content_type.rb
|
367
|
+
- spec/httpheader/shared/set_form_data.rb
|
368
|
+
- spec/httpheader/shared/set_range.rb
|
369
|
+
- spec/httpheader/shared/size.rb
|
370
|
+
- spec/httpheader/size_spec.rb
|
371
|
+
- spec/httpheader/sub_type_spec.rb
|
372
|
+
- spec/httpheader/to_hash_spec.rb
|
373
|
+
- spec/httpheader/type_params_spec.rb
|
374
|
+
- spec/httprequest/initialize_spec.rb
|
375
|
+
- spec/httpresponse/body_permitted_spec.rb
|
376
|
+
- spec/httpresponse/body_spec.rb
|
377
|
+
- spec/httpresponse/code_spec.rb
|
378
|
+
- spec/httpresponse/code_type_spec.rb
|
379
|
+
- spec/httpresponse/entity_spec.rb
|
380
|
+
- spec/httpresponse/error_spec.rb
|
381
|
+
- spec/httpresponse/error_type_spec.rb
|
382
|
+
- spec/httpresponse/exception_type_spec.rb
|
383
|
+
- spec/httpresponse/header_spec.rb
|
384
|
+
- spec/httpresponse/http_version_spec.rb
|
385
|
+
- spec/httpresponse/initialize_spec.rb
|
386
|
+
- spec/httpresponse/inspect_spec.rb
|
387
|
+
- spec/httpresponse/message_spec.rb
|
388
|
+
- spec/httpresponse/msg_spec.rb
|
389
|
+
- spec/httpresponse/read_body_spec.rb
|
390
|
+
- spec/httpresponse/read_header_spec.rb
|
391
|
+
- spec/httpresponse/read_new_spec.rb
|
392
|
+
- spec/httpresponse/reading_body_spec.rb
|
393
|
+
- spec/httpresponse/response_spec.rb
|
394
|
+
- spec/httpresponse/shared/body.rb
|
395
|
+
- spec/httpresponse/to_ary_spec.rb
|
396
|
+
- spec/httpresponse/value_spec.rb
|