esod-client 0.2.1 → 0.3.0
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/VERSION +1 -1
- data/command_line_options.rb +3 -6
- data/esod-client.gemspec +29 -27
- data/lib/esod_client/esod_client.rb +2 -2
- data/lib/rest-client-1.4.2/README.rdoc +243 -0
- data/lib/rest-client-1.4.2/Rakefile +60 -0
- data/lib/rest-client-1.4.2/VERSION +1 -0
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/bin/restclient +0 -0
- data/lib/rest-client-1.4.2/history.md +54 -0
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/lib/rest_client.rb +0 -0
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/lib/restclient.rb +77 -21
- data/lib/rest-client-1.4.2/lib/restclient/abstract_response.rb +87 -0
- data/lib/rest-client-1.4.2/lib/restclient/exceptions.rb +146 -0
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/lib/restclient/net_http_ext.rb +0 -0
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/lib/restclient/payload.rb +15 -12
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/lib/restclient/raw_response.rb +7 -6
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/lib/restclient/request.rb +61 -89
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/lib/restclient/resource.rb +11 -10
- data/lib/rest-client-1.4.2/lib/restclient/response.rb +46 -0
- data/lib/{rest-client-1.2.0/spec/mixin/response_spec.rb → rest-client-1.4.2/spec/abstract_response_spec.rb} +3 -12
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/spec/base.rb +0 -0
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/spec/exceptions_spec.rb +23 -9
- data/lib/rest-client-1.4.2/spec/integration_spec.rb +38 -0
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/spec/master_shake.jpg +0 -0
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/spec/payload_spec.rb +20 -6
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/spec/raw_response_spec.rb +1 -1
- data/lib/rest-client-1.4.2/spec/request_spec.rb +518 -0
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/spec/resource_spec.rb +24 -0
- data/lib/rest-client-1.4.2/spec/response_spec.rb +130 -0
- data/lib/{rest-client-1.2.0 → rest-client-1.4.2}/spec/restclient_spec.rb +21 -11
- metadata +38 -29
- data/lib/rest-client-1.2.0/README.rdoc +0 -102
- data/lib/rest-client-1.2.0/Rakefile +0 -57
- data/lib/rest-client-1.2.0/VERSION +0 -1
- data/lib/rest-client-1.2.0/lib/restclient/exceptions.rb +0 -89
- data/lib/rest-client-1.2.0/lib/restclient/mixin/response.rb +0 -48
- data/lib/rest-client-1.2.0/lib/restclient/response.rb +0 -20
- data/lib/rest-client-1.2.0/spec/request_spec.rb +0 -521
- data/lib/rest-client-1.2.0/spec/response_spec.rb +0 -21
@@ -1,21 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/base'
|
2
|
-
|
3
|
-
describe RestClient::Response do
|
4
|
-
before do
|
5
|
-
@net_http_res = mock('net http response', :to_hash => {"Status" => ["200 OK"]})
|
6
|
-
@response = RestClient::Response.new('abc', @net_http_res)
|
7
|
-
end
|
8
|
-
|
9
|
-
it "behaves like string" do
|
10
|
-
@response.should == 'abc'
|
11
|
-
end
|
12
|
-
|
13
|
-
it "accepts nil strings and sets it to empty for the case of HEAD" do
|
14
|
-
RestClient::Response.new(nil, @net_http_res).should == ""
|
15
|
-
end
|
16
|
-
|
17
|
-
it "test headers and raw headers" do
|
18
|
-
@response.raw_headers["Status"][0].should == "200 OK"
|
19
|
-
@response.headers[:status].should == "200 OK"
|
20
|
-
end
|
21
|
-
end
|