wrest 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. data/README.rdoc +24 -17
  2. data/Rakefile +5 -4
  3. data/VERSION.yml +1 -1
  4. data/examples/delicious.rb +7 -3
  5. data/examples/redirection.rb +27 -0
  6. data/examples/twitter.rb +78 -0
  7. data/{spec/wrest/http/request_spec.rb → examples/twitter_public_timeline.rb} +15 -12
  8. data/examples/wow_realm_status.rb +7 -3
  9. data/lib/wrest/components/attributes_container/alias_accessors.rb +66 -0
  10. data/lib/wrest/components/attributes_container/typecaster.rb +44 -38
  11. data/lib/wrest/components/attributes_container.rb +23 -5
  12. data/lib/wrest/components/mutators/base.rb +1 -1
  13. data/lib/wrest/components/translators.rb +1 -1
  14. data/lib/wrest/core_ext/string/conversions.rb +1 -1
  15. data/lib/wrest/exceptions.rb +14 -2
  16. data/lib/wrest/http/get.rb +2 -0
  17. data/lib/wrest/http/redirection.rb +35 -0
  18. data/lib/wrest/http/request.rb +37 -13
  19. data/lib/wrest/http/response.rb +17 -0
  20. data/lib/wrest/http.rb +1 -0
  21. data/lib/wrest/resource/base.rb +1 -2
  22. data/lib/wrest/uri.rb +2 -0
  23. data/lib/wrest/version.rb +1 -1
  24. data/spec/functional/sample_rails_app/README +3 -0
  25. data/spec/functional/sample_rails_app/Rakefile +10 -0
  26. data/spec/functional/sample_rails_app/app/controllers/application_controller.rb +10 -0
  27. data/spec/functional/sample_rails_app/app/controllers/lead_bottles_controller.rb +7 -0
  28. data/spec/functional/sample_rails_app/app/helpers/application_helper.rb +3 -0
  29. data/spec/functional/sample_rails_app/app/models/bottle.rb +3 -0
  30. data/spec/functional/sample_rails_app/app/models/glass_bottle.rb +3 -0
  31. data/spec/functional/sample_rails_app/app/models/lead_bottle.rb +3 -0
  32. data/spec/functional/sample_rails_app/config/boot.rb +110 -0
  33. data/spec/functional/sample_rails_app/config/database.yml +16 -0
  34. data/spec/functional/sample_rails_app/config/environment.rb +42 -0
  35. data/spec/functional/sample_rails_app/config/environments/development.rb +17 -0
  36. data/spec/functional/sample_rails_app/config/environments/production.rb +28 -0
  37. data/spec/functional/sample_rails_app/config/environments/test.rb +28 -0
  38. data/spec/functional/sample_rails_app/config/initializers/backtrace_silencers.rb +7 -0
  39. data/spec/functional/sample_rails_app/config/initializers/inflections.rb +10 -0
  40. data/spec/functional/sample_rails_app/config/initializers/mime_types.rb +5 -0
  41. data/spec/functional/sample_rails_app/config/initializers/new_rails_defaults.rb +19 -0
  42. data/spec/functional/sample_rails_app/config/initializers/session_store.rb +15 -0
  43. data/spec/functional/sample_rails_app/config/locales/en.yml +5 -0
  44. data/spec/functional/sample_rails_app/config/routes.rb +3 -0
  45. data/spec/functional/sample_rails_app/db/development.sqlite3 +0 -0
  46. data/spec/functional/sample_rails_app/db/migrate/20090319115628_create_bottle.rb +13 -0
  47. data/spec/functional/sample_rails_app/db/schema.rb +20 -0
  48. data/spec/functional/sample_rails_app/db/test.sqlite3 +0 -0
  49. data/spec/functional/sample_rails_app/log/development.log +1 -0
  50. data/spec/functional/sample_rails_app/public/404.html +30 -0
  51. data/spec/functional/sample_rails_app/public/422.html +30 -0
  52. data/spec/functional/sample_rails_app/public/500.html +30 -0
  53. data/spec/functional/sample_rails_app/public/favicon.ico +0 -0
  54. data/spec/functional/sample_rails_app/public/images/rails.png +0 -0
  55. data/spec/functional/sample_rails_app/public/index.html +275 -0
  56. data/spec/functional/sample_rails_app/public/robots.txt +5 -0
  57. data/spec/functional/sample_rails_app/script/about +4 -0
  58. data/spec/functional/sample_rails_app/script/autospec +6 -0
  59. data/spec/functional/sample_rails_app/script/console +3 -0
  60. data/spec/functional/sample_rails_app/script/dbconsole +3 -0
  61. data/spec/functional/sample_rails_app/script/destroy +3 -0
  62. data/spec/functional/sample_rails_app/script/generate +3 -0
  63. data/spec/functional/sample_rails_app/script/performance/benchmarker +3 -0
  64. data/spec/functional/sample_rails_app/script/performance/profiler +3 -0
  65. data/spec/functional/sample_rails_app/script/plugin +3 -0
  66. data/spec/functional/sample_rails_app/script/runner +3 -0
  67. data/spec/functional/sample_rails_app/script/server +3 -0
  68. data/spec/functional/sample_rails_app/script/spec +10 -0
  69. data/spec/functional/sample_rails_app/script/spec_server +9 -0
  70. data/spec/functional/sample_rails_app/test/performance/browsing_test.rb +9 -0
  71. data/spec/functional/sample_rails_app/test/test_helper.rb +38 -0
  72. data/spec/functional/sample_rails_app/tmtags +2559 -0
  73. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/MIT-LICENSE +20 -0
  74. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/README.rdoc +100 -0
  75. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/Rakefile +18 -0
  76. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/init.rb +5 -0
  77. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/install.rb +1 -0
  78. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/base.rb +140 -0
  79. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/resources.rb +16 -0
  80. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/resources_controller.rb +26 -0
  81. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/routes_controller.rb +16 -0
  82. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/api.rb +26 -0
  83. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/exception.rb +23 -0
  84. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/from_json.rb +15 -0
  85. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/dispatch.rb +235 -0
  86. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/models/resourced_route.rb +84 -0
  87. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/query.rb +337 -0
  88. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/html.rb +50 -0
  89. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/json.rb +75 -0
  90. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/xml.rb +65 -0
  91. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render.rb +63 -0
  92. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/retrieve.rb +74 -0
  93. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/version.rb +9 -0
  94. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full.rb +14 -0
  95. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/base_spec.rb +88 -0
  96. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/controllers/resources_spec.rb +29 -0
  97. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/dispatch_spec.rb +262 -0
  98. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/models/resourced_route_spec.rb +62 -0
  99. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/query/parameter_spec.rb +57 -0
  100. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/query_spec.rb +462 -0
  101. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/html_spec.rb +4 -0
  102. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/json_spec.rb +107 -0
  103. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/xml_spec.rb +98 -0
  104. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render_spec.rb +5 -0
  105. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/retrieve_spec.rb +173 -0
  106. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/spec_helper.rb +98 -0
  107. data/spec/functional/sample_rails_app/vendor/plugins/resource_full/uninstall.rb +1 -0
  108. data/spec/functional/spec_helper.rb +0 -0
  109. data/spec/{spec_helper.rb → unit/spec_helper.rb} +2 -2
  110. data/spec/unit/wrest/components/attributes_container/alias_accessors_spec.rb +49 -0
  111. data/spec/{wrest → unit/wrest}/components/attributes_container/typecaster_spec.rb +28 -8
  112. data/spec/{wrest → unit/wrest}/components/attributes_container_spec.rb +42 -15
  113. data/spec/{wrest → unit/wrest}/components/mutators/base_spec.rb +1 -1
  114. data/spec/{wrest → unit/wrest}/components/mutators/camel_to_snake_spec.rb +0 -0
  115. data/spec/{wrest → unit/wrest}/components/mutators/xml_mini_type_caster_spec.rb +0 -0
  116. data/spec/{wrest → unit/wrest}/components/mutators/xml_simple_type_caster_spec.rb +0 -0
  117. data/spec/{wrest → unit/wrest}/components/mutators_spec.rb +0 -0
  118. data/spec/{wrest → unit/wrest}/components/translators/xml_spec.rb +0 -0
  119. data/spec/{wrest → unit/wrest}/components/translators_spec.rb +1 -1
  120. data/spec/{wrest → unit/wrest}/core_ext/hash/conversions_spec.rb +0 -0
  121. data/spec/{wrest → unit/wrest}/core_ext/string/conversions_spec.rb +14 -0
  122. data/spec/unit/wrest/http/redirection_spec.rb +42 -0
  123. data/spec/unit/wrest/http/request_spec.rb +70 -0
  124. data/spec/unit/wrest/http/response_spec.rb +45 -0
  125. data/spec/{wrest → unit/wrest}/resource/base_spec.rb +5 -4
  126. data/spec/{wrest → unit/wrest}/uri_spec.rb +68 -67
  127. data/spec/{wrest → unit/wrest}/uri_template_spec.rb +0 -0
  128. metadata +187 -38
  129. data/lib/wrest/exceptions/method_not_overridden_exception.rb +0 -17
  130. data/lib/wrest/exceptions/unsupported_content_type_exception.rb +0 -17
  131. data/spec/wrest/http/response_spec.rb +0 -21
@@ -0,0 +1,70 @@
1
+ # Copyright 2009 Sidu Ponnappa
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ # Unless required by applicable law or agreed to in writing, software distributed under the License
7
+ # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
+ # See the License for the specific language governing permissions and limitations under the License.
9
+
10
+ require File.dirname(__FILE__) + '/../../spec_helper'
11
+
12
+ describe Wrest::Http::Request do
13
+ it "should convert all symbols in header keys to strings" do
14
+ Wrest::Http::Request.new(
15
+ 'http://localhost/foo'.to_uri, Net::HTTP::Get, {},
16
+ nil, 'Content-Type' => 'application/xml', :per_page => '10'
17
+ ).headers.should == {
18
+ 'Content-Type' => 'application/xml',
19
+ 'per_page' => '10'
20
+ }
21
+ end
22
+
23
+ it "should default the 'follow_redirects' option to true for a Get" do
24
+ Wrest::Http::Get.new('http://localhost/foo'.to_uri).follow_redirects.should be_true
25
+ end
26
+
27
+ it "should default the 'follow_redirects_count' option to 0" do
28
+ Wrest::Http::Get.new('http://localhost/foo'.to_uri).follow_redirects_count.should == 0
29
+ end
30
+
31
+ it "should default the 'follow_redirects_limit' option to 5" do
32
+ Wrest::Http::Get.new('http://localhost/foo'.to_uri).follow_redirects_limit.should == 5
33
+ end
34
+
35
+ it "should allow Gets to disable redirect follows" do
36
+ Wrest::Http::Get.new('http://localhost/foo'.to_uri, {}, {}, {:follow_redirects => false}).follow_redirects.should be_false
37
+ end
38
+
39
+ it "should increment the follow_redirects_count for every redirect leving the count unaffected in previous requests" do
40
+ request = Wrest::Http::Get.new('http://localhost/foo'.to_uri)
41
+ redirect_location = 'http://coathangers.com'
42
+ redirected_request = mock('Request to http://coathangers.com')
43
+
44
+ mock_connection = mock('Http Connection')
45
+ request.stub!(:create_connection).and_return(mock_connection)
46
+
47
+ raw_response = mock(Net::HTTPRedirection)
48
+ raw_response.stub!(:code).and_return('301')
49
+ raw_response.stub!(:message).and_return('')
50
+ raw_response.stub!(:body).and_return('')
51
+ raw_response.stub!(:[]).with('location').and_return(redirect_location)
52
+
53
+ response = Wrest::Http::Redirection.new(raw_response)
54
+
55
+ mock_connection.should_receive(:request).and_return(raw_response)
56
+
57
+ Wrest::Http::Response.should_receive(:new).and_return(response)
58
+ redirected_request.stub!(:get)
59
+ redirect_location.should_receive(:to_uri).with(hash_including(:follow_redirects_count=>1)).and_return(redirected_request)
60
+
61
+ request.invoke
62
+ request.follow_redirects_count.should == 0
63
+ end
64
+
65
+ it "should default the 'follow_redirects' option to false for a Post, Put or Delete" do
66
+ Wrest::Http::Post.new('http://localhost/foo'.to_uri).follow_redirects.should_not be_true
67
+ Wrest::Http::Put.new('http://localhost/foo'.to_uri).follow_redirects.should_not be_true
68
+ Wrest::Http::Delete.new('http://localhost/foo'.to_uri).follow_redirects.should_not be_true
69
+ end
70
+ end
@@ -0,0 +1,45 @@
1
+ require File.dirname(__FILE__) + '/../../spec_helper'
2
+
3
+ module Wrest
4
+ describe Http::Response do
5
+ it "should build a Redirection instead of a normal response if the code is 3xx" do
6
+ http_response = mock(Net::HTTPRedirection)
7
+ http_response.stub!(:code).and_return('301')
8
+
9
+ Http::Response.new(http_response).class.should == Wrest::Http::Redirection
10
+ end
11
+
12
+ it "should build a normal Response for non 3xx codes" do
13
+ http_response = mock(Net::HTTPResponse)
14
+ http_response.stub!(:code).and_return('200')
15
+
16
+ Http::Response.new(http_response).class.should == Wrest::Http::Response
17
+ end
18
+
19
+ it "should know how to delegate to a translator" do
20
+ http_response = mock('response')
21
+ http_response.stub!(:code).and_return('200')
22
+ Components::Translators::Xml.should_receive(:deserialise).with(http_response)
23
+ Http::Response.new(http_response).deserialise_using(Components::Translators::Xml)
24
+ end
25
+
26
+ it "should know how to load a translator based on content type" do
27
+ http_response = mock('response')
28
+ http_response.stub!(:code).and_return('422')
29
+ http_response.should_receive(:content_type).and_return('application/xml')
30
+
31
+ response = Http::Response.new(http_response)
32
+ response.should_receive(:deserialise_using).with(Components::Translators::Xml)
33
+
34
+ response.deserialise
35
+ end
36
+
37
+ it "should simply return itself when asked to follow (null object behaviour - see MovedPermanently for more context)" do
38
+ http_response = mock('response')
39
+ http_response.stub!(:code).and_return('422')
40
+
41
+ response = Http::Response.new(http_response)
42
+ response.follow.equal?(response).should be_true
43
+ end
44
+ end
45
+ end
@@ -22,9 +22,9 @@ module Wrest
22
22
 
23
23
  describe 'subclasses' do
24
24
  before(:each) do
25
- @BottledUniverse = Class.new(Resource::Base)
25
+ @BottledUniverse = Class.new(Wrest::Resource::Base)
26
26
  @BottledUniverse.class_eval do
27
- set_resource_name 'BottledUniverse'
27
+ set_resource_name 'BottledUniverse'
28
28
  end
29
29
  end
30
30
 
@@ -188,6 +188,7 @@ module Wrest
188
188
  it "should know how to create a new resource" do
189
189
  uri = mock(Uri)
190
190
  mock_http_response = mock(Net::HTTPResponse)
191
+ mock_http_response.stub!(:code).and_return('201')
191
192
  mock_http_response.stub!(:content_type).and_return('application/xml')
192
193
  mock_http_response.stub!(:body).and_return("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<bottled-universe>\n <name>Woot</name>\n <id>1</id>\n </bottled-universe>\n")
193
194
 
@@ -247,9 +248,9 @@ module Wrest
247
248
  universe.should_not respond_to(:theronic=)
248
249
  end
249
250
 
250
- it "should fail when query methods for attributes that don't exist are invoked" do
251
+ it "should return false when query methods for attributes that don't exist are invoked" do
251
252
  universe = Glassware.new(:owner => 'Kai Wren', :guardian => 'Lung Shan')
252
- lambda{ universe.ooga? }.should raise_error(NoMethodError)
253
+ universe.ooga?.should be_false
253
254
  end
254
255
 
255
256
  it "should provide query methods for attributes" do
@@ -105,13 +105,19 @@ module Wrest
105
105
  end
106
106
  end
107
107
 
108
- describe 'Get' do
108
+ describe 'HTTP actions' do
109
+ def setup_http
110
+ returning mock(Net::HTTP) do |http|
111
+ Net::HTTP.should_receive(:new).with('localhost', 3000).and_return(http)
112
+ http.should_receive(:read_timeout=).with(60)
113
+ end
114
+ end
115
+
109
116
  it "should know how to get" do
110
117
  uri = "http://localhost:3000/glassware".to_uri
111
118
  uri.should_not be_https
112
119
 
113
- http = mock(Net::HTTP)
114
- Net::HTTP.should_receive(:new).with('localhost', 3000).and_return(http)
120
+ http = setup_http
115
121
 
116
122
  request = Net::HTTP::Get.new('/glassware', {})
117
123
  Net::HTTP::Get.should_receive(:new).with('/glassware', {}).and_return(request)
@@ -125,9 +131,8 @@ module Wrest
125
131
  uri = "http://localhost:3000/glassware".to_uri
126
132
  uri.should_not be_https
127
133
 
128
- http = mock(Net::HTTP)
129
- Net::HTTP.should_receive(:new).with('localhost', 3000).and_return(http)
130
-
134
+ http = setup_http
135
+
131
136
  request = Net::HTTP::Get.new('/glassware?owner=Kai&type=bottle', {'page' => '2', 'per_page' => '5'})
132
137
  Net::HTTP::Get.should_receive(:new).with('/glassware?owner=Kai&type=bottle', {'page' => '2', 'per_page' => '5'}).and_return(request)
133
138
 
@@ -140,9 +145,8 @@ module Wrest
140
145
  uri = "http://localhost:3000/glassware".to_uri
141
146
  uri.should_not be_https
142
147
 
143
- http = mock(Net::HTTP)
144
- Net::HTTP.should_receive(:new).with('localhost', 3000).and_return(http)
145
-
148
+ http = setup_http
149
+
146
150
  request = Net::HTTP::Get.new('/glassware?owner=Kai&type=bottle', {})
147
151
  Net::HTTP::Get.should_receive(:new).with('/glassware?owner=Kai&type=bottle', {}).and_return(request)
148
152
 
@@ -150,86 +154,83 @@ module Wrest
150
154
 
151
155
  uri.get(:owner => 'Kai', :type => 'bottle')
152
156
  end
153
- end
154
157
 
155
- it "should know how to post" do
156
- uri = "http://localhost:3000/glassware".to_uri
157
- uri.should_not be_https
158
-
159
- http = mock(Net::HTTP)
160
- Net::HTTP.should_receive(:new).with('localhost', 3000).and_return(http)
158
+ it "should know how to post" do
159
+ uri = "http://localhost:3000/glassware".to_uri
160
+ uri.should_not be_https
161
161
 
162
- request = Net::HTTP::Post.new('/glassware', {'page' => '2', 'per_page' => '5'})
163
- Net::HTTP::Post.should_receive(:new).with('/glassware', {'page' => '2', 'per_page' => '5'}).and_return(request)
162
+ http = setup_http
164
163
 
165
- http.should_receive(:request).with(request, '<ooga>Booga</ooga>').and_return(build_ok_response)
164
+ request = Net::HTTP::Post.new('/glassware', {'page' => '2', 'per_page' => '5'})
165
+ Net::HTTP::Post.should_receive(:new).with('/glassware', {'page' => '2', 'per_page' => '5'}).and_return(request)
166
+
167
+ http.should_receive(:request).with(request, '<ooga>Booga</ooga>').and_return(build_ok_response)
166
168
 
167
- uri.post '<ooga>Booga</ooga>', :page => '2', :per_page => '5'
168
- end
169
+ uri.post '<ooga>Booga</ooga>', :page => '2', :per_page => '5'
170
+ end
169
171
 
170
- it "should know how to put" do
171
- uri = "http://localhost:3000/glassware".to_uri
172
- uri.should_not be_https
172
+ it "should know how to put" do
173
+ uri = "http://localhost:3000/glassware".to_uri
174
+ uri.should_not be_https
173
175
 
174
- http = mock(Net::HTTP)
175
- Net::HTTP.should_receive(:new).with('localhost', 3000).and_return(http)
176
-
177
- request = Net::HTTP::Put.new('/glassware', {'page' => '2', 'per_page' => '5'})
178
- Net::HTTP::Put.should_receive(:new).with('/glassware', {'page' => '2', 'per_page' => '5'}).and_return(request)
176
+ http = setup_http
177
+
178
+ request = Net::HTTP::Put.new('/glassware', {'page' => '2', 'per_page' => '5'})
179
+ Net::HTTP::Put.should_receive(:new).with('/glassware', {'page' => '2', 'per_page' => '5'}).and_return(request)
179
180
 
180
- http.should_receive(:request).with(request, '<ooga>Booga</ooga>').and_return(build_ok_response)
181
+ http.should_receive(:request).with(request, '<ooga>Booga</ooga>').and_return(build_ok_response)
181
182
 
182
- uri.put '<ooga>Booga</ooga>', :page => '2', :per_page => '5'
183
- end
183
+ uri.put '<ooga>Booga</ooga>', :page => '2', :per_page => '5'
184
+ end
184
185
 
185
- it "should know how to delete" do
186
- uri = "http://localhost:3000/glassware".to_uri
187
- uri.should_not be_https
186
+ it "should know how to delete" do
187
+ uri = "http://localhost:3000/glassware".to_uri
188
+ uri.should_not be_https
188
189
 
189
- http = mock(Net::HTTP)
190
- Net::HTTP.should_receive(:new).with('localhost', 3000).and_return(http)
190
+ http = setup_http
191
191
 
192
- request = Net::HTTP::Delete.new('/glassware?owner=Kai&type=bottle', {'page' => '2', 'per_page' => '5'})
193
- Net::HTTP::Delete.should_receive(:new).with('/glassware?owner=Kai&type=bottle', {'page' => '2', 'per_page' => '5'}).and_return(request)
192
+ request = Net::HTTP::Delete.new('/glassware?owner=Kai&type=bottle', {'page' => '2', 'per_page' => '5'})
193
+ Net::HTTP::Delete.should_receive(:new).with('/glassware?owner=Kai&type=bottle', {'page' => '2', 'per_page' => '5'}).and_return(request)
194
194
 
195
- http.should_receive(:request).with(request, nil).and_return(build_ok_response(nil))
195
+ http.should_receive(:request).with(request, nil).and_return(build_ok_response(nil))
196
196
 
197
- uri.delete({:owner => 'Kai', :type => 'bottle'}, :page => '2', :per_page => '5')
198
- end
197
+ uri.delete({:owner => 'Kai', :type => 'bottle'}, :page => '2', :per_page => '5')
198
+ end
199
199
 
200
- it "should know how to ask for options on a URI" do
201
- uri = "http://localhost:3000/glassware".to_uri
202
- uri.should_not be_https
200
+ it "should know how to ask for options on a URI" do
201
+ uri = "http://localhost:3000/glassware".to_uri
202
+ uri.should_not be_https
203
203
 
204
- http = mock(Net::HTTP)
205
- Net::HTTP.should_receive(:new).with('localhost', 3000).and_return(http)
204
+ http = setup_http
206
205
 
207
- request = Net::HTTP::Options.new('/glassware')
208
- Net::HTTP::Options.should_receive(:new).with('/glassware', {}).and_return(request)
206
+ request = Net::HTTP::Options.new('/glassware')
207
+ Net::HTTP::Options.should_receive(:new).with('/glassware', {}).and_return(request)
209
208
 
210
- http.should_receive(:request).with(request, nil).and_return(build_ok_response(nil))
211
-
212
- uri.options
213
- end
209
+ http.should_receive(:request).with(request, nil).and_return(build_ok_response(nil))
214
210
 
215
- it "should not mutate state of the uri across requests" do
216
- uri = "http://localhost:3000/glassware".to_uri
217
- uri.should_not be_https
211
+ uri.options
212
+ end
218
213
 
219
- http = mock(Net::HTTP)
220
- Net::HTTP.should_receive(:new).with('localhost', 3000).any_number_of_times.and_return(http)
214
+ it "should not mutate state of the uri across requests" do
215
+ uri = "http://localhost:3000/glassware".to_uri
216
+ uri.should_not be_https
221
217
 
222
- request_get = Net::HTTP::Get.new('/glassware?owner=Kai&type=bottle', {'page' => '2', 'per_page' => '5'})
223
- Net::HTTP::Get.should_receive(:new).with('/glassware?owner=Kai&type=bottle', {'page' => '2', 'per_page' => '5'}).and_return(request_get)
218
+ http = mock(Net::HTTP)
219
+ Net::HTTP.should_receive(:new).with('localhost', 3000).any_number_of_times.and_return(http)
220
+ http.should_receive(:read_timeout=).any_number_of_times.with(60)
224
221
 
225
- request_post = Net::HTTP::Post.new('/glassware', {'page' => '2', 'per_page' => '5'})
226
- Net::HTTP::Post.should_receive(:new).with('/glassware', {'page' => '2', 'per_page' => '5'}).and_return(request_post)
222
+ request_get = Net::HTTP::Get.new('/glassware?owner=Kai&type=bottle', {'page' => '2', 'per_page' => '5'})
223
+ Net::HTTP::Get.should_receive(:new).with('/glassware?owner=Kai&type=bottle', {'page' => '2', 'per_page' => '5'}).and_return(request_get)
227
224
 
228
- http.should_receive(:request).with(request_get, nil).and_return(build_ok_response)
229
- http.should_receive(:request).with(request_post, '<ooga>Booga</ooga>').and_return(build_ok_response)
225
+ request_post = Net::HTTP::Post.new('/glassware', {'page' => '2', 'per_page' => '5'})
226
+ Net::HTTP::Post.should_receive(:new).with('/glassware', {'page' => '2', 'per_page' => '5'}).and_return(request_post)
227
+
228
+ http.should_receive(:request).with(request_get, nil).and_return(build_ok_response)
229
+ http.should_receive(:request).with(request_post, '<ooga>Booga</ooga>').and_return(build_ok_response)
230
230
 
231
- uri.get({:owner => 'Kai', :type => 'bottle'}, :page => '2', :per_page => '5')
232
- uri.post '<ooga>Booga</ooga>', :page => '2', :per_page => '5'
233
- end
231
+ uri.get({:owner => 'Kai', :type => 'bottle'}, :page => '2', :per_page => '5')
232
+ uri.post '<ooga>Booga</ooga>', :page => '2', :per_page => '5'
233
+ end
234
+ end
234
235
  end
235
236
  end
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wrest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sidu Ponnappa
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-13 00:00:00 +05:30
12
+ date: 2009-09-09 00:00:00 +05:30
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -49,10 +49,14 @@ files:
49
49
  - bin/wrest
50
50
  - bin/wrest_shell.rb
51
51
  - examples/delicious.rb
52
+ - examples/redirection.rb
53
+ - examples/twitter.rb
54
+ - examples/twitter_public_timeline.rb
52
55
  - examples/wow_realm_status.rb
53
56
  - lib/wrest.rb
54
57
  - lib/wrest/components.rb
55
58
  - lib/wrest/components/attributes_container.rb
59
+ - lib/wrest/components/attributes_container/alias_accessors.rb
56
60
  - lib/wrest/components/attributes_container/typecaster.rb
57
61
  - lib/wrest/components/mutators.rb
58
62
  - lib/wrest/components/mutators/base.rb
@@ -68,14 +72,13 @@ files:
68
72
  - lib/wrest/core_ext/string.rb
69
73
  - lib/wrest/core_ext/string/conversions.rb
70
74
  - lib/wrest/exceptions.rb
71
- - lib/wrest/exceptions/method_not_overridden_exception.rb
72
- - lib/wrest/exceptions/unsupported_content_type_exception.rb
73
75
  - lib/wrest/http.rb
74
76
  - lib/wrest/http/delete.rb
75
77
  - lib/wrest/http/get.rb
76
78
  - lib/wrest/http/options.rb
77
79
  - lib/wrest/http/post.rb
78
80
  - lib/wrest/http/put.rb
81
+ - lib/wrest/http/redirection.rb
79
82
  - lib/wrest/http/request.rb
80
83
  - lib/wrest/http/response.rb
81
84
  - lib/wrest/resource.rb
@@ -86,25 +89,112 @@ files:
86
89
  - lib/wrest/uri_template.rb
87
90
  - lib/wrest/version.rb
88
91
  - spec/custom_matchers/custom_matchers.rb
92
+ - spec/functional/sample_rails_app/README
93
+ - spec/functional/sample_rails_app/Rakefile
94
+ - spec/functional/sample_rails_app/app/controllers/application_controller.rb
95
+ - spec/functional/sample_rails_app/app/controllers/lead_bottles_controller.rb
96
+ - spec/functional/sample_rails_app/app/helpers/application_helper.rb
97
+ - spec/functional/sample_rails_app/app/models/bottle.rb
98
+ - spec/functional/sample_rails_app/app/models/glass_bottle.rb
99
+ - spec/functional/sample_rails_app/app/models/lead_bottle.rb
100
+ - spec/functional/sample_rails_app/config/boot.rb
101
+ - spec/functional/sample_rails_app/config/database.yml
102
+ - spec/functional/sample_rails_app/config/environment.rb
103
+ - spec/functional/sample_rails_app/config/environments/development.rb
104
+ - spec/functional/sample_rails_app/config/environments/production.rb
105
+ - spec/functional/sample_rails_app/config/environments/test.rb
106
+ - spec/functional/sample_rails_app/config/initializers/backtrace_silencers.rb
107
+ - spec/functional/sample_rails_app/config/initializers/inflections.rb
108
+ - spec/functional/sample_rails_app/config/initializers/mime_types.rb
109
+ - spec/functional/sample_rails_app/config/initializers/new_rails_defaults.rb
110
+ - spec/functional/sample_rails_app/config/initializers/session_store.rb
111
+ - spec/functional/sample_rails_app/config/locales/en.yml
112
+ - spec/functional/sample_rails_app/config/routes.rb
113
+ - spec/functional/sample_rails_app/db/development.sqlite3
114
+ - spec/functional/sample_rails_app/db/migrate/20090319115628_create_bottle.rb
115
+ - spec/functional/sample_rails_app/db/schema.rb
116
+ - spec/functional/sample_rails_app/db/test.sqlite3
117
+ - spec/functional/sample_rails_app/log/development.log
118
+ - spec/functional/sample_rails_app/public/404.html
119
+ - spec/functional/sample_rails_app/public/422.html
120
+ - spec/functional/sample_rails_app/public/500.html
121
+ - spec/functional/sample_rails_app/public/favicon.ico
122
+ - spec/functional/sample_rails_app/public/images/rails.png
123
+ - spec/functional/sample_rails_app/public/index.html
124
+ - spec/functional/sample_rails_app/public/robots.txt
125
+ - spec/functional/sample_rails_app/script/about
126
+ - spec/functional/sample_rails_app/script/autospec
127
+ - spec/functional/sample_rails_app/script/console
128
+ - spec/functional/sample_rails_app/script/dbconsole
129
+ - spec/functional/sample_rails_app/script/destroy
130
+ - spec/functional/sample_rails_app/script/generate
131
+ - spec/functional/sample_rails_app/script/performance/benchmarker
132
+ - spec/functional/sample_rails_app/script/performance/profiler
133
+ - spec/functional/sample_rails_app/script/plugin
134
+ - spec/functional/sample_rails_app/script/runner
135
+ - spec/functional/sample_rails_app/script/server
136
+ - spec/functional/sample_rails_app/script/spec
137
+ - spec/functional/sample_rails_app/script/spec_server
138
+ - spec/functional/sample_rails_app/test/performance/browsing_test.rb
139
+ - spec/functional/sample_rails_app/test/test_helper.rb
140
+ - spec/functional/sample_rails_app/tmtags
141
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/MIT-LICENSE
142
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/README.rdoc
143
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/Rakefile
144
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/init.rb
145
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/install.rb
146
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full.rb
147
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/base.rb
148
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/resources.rb
149
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/resources_controller.rb
150
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/routes_controller.rb
151
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/api.rb
152
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/exception.rb
153
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/from_json.rb
154
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/dispatch.rb
155
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/models/resourced_route.rb
156
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/query.rb
157
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render.rb
158
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/html.rb
159
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/json.rb
160
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/xml.rb
161
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/retrieve.rb
162
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/version.rb
163
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/base_spec.rb
164
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/controllers/resources_spec.rb
165
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/dispatch_spec.rb
166
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/models/resourced_route_spec.rb
167
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/query/parameter_spec.rb
168
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/query_spec.rb
169
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/html_spec.rb
170
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/json_spec.rb
171
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/xml_spec.rb
172
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render_spec.rb
173
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/retrieve_spec.rb
174
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/spec_helper.rb
175
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/uninstall.rb
176
+ - spec/functional/spec_helper.rb
89
177
  - spec/rcov.opts
90
178
  - spec/spec.opts
91
- - spec/spec_helper.rb
92
- - spec/wrest/components/attributes_container/typecaster_spec.rb
93
- - spec/wrest/components/attributes_container_spec.rb
94
- - spec/wrest/components/mutators/base_spec.rb
95
- - spec/wrest/components/mutators/camel_to_snake_spec.rb
96
- - spec/wrest/components/mutators/xml_mini_type_caster_spec.rb
97
- - spec/wrest/components/mutators/xml_simple_type_caster_spec.rb
98
- - spec/wrest/components/mutators_spec.rb
99
- - spec/wrest/components/translators/xml_spec.rb
100
- - spec/wrest/components/translators_spec.rb
101
- - spec/wrest/core_ext/hash/conversions_spec.rb
102
- - spec/wrest/core_ext/string/conversions_spec.rb
103
- - spec/wrest/http/request_spec.rb
104
- - spec/wrest/http/response_spec.rb
105
- - spec/wrest/resource/base_spec.rb
106
- - spec/wrest/uri_spec.rb
107
- - spec/wrest/uri_template_spec.rb
179
+ - spec/unit/spec_helper.rb
180
+ - spec/unit/wrest/components/attributes_container/alias_accessors_spec.rb
181
+ - spec/unit/wrest/components/attributes_container/typecaster_spec.rb
182
+ - spec/unit/wrest/components/attributes_container_spec.rb
183
+ - spec/unit/wrest/components/mutators/base_spec.rb
184
+ - spec/unit/wrest/components/mutators/camel_to_snake_spec.rb
185
+ - spec/unit/wrest/components/mutators/xml_mini_type_caster_spec.rb
186
+ - spec/unit/wrest/components/mutators/xml_simple_type_caster_spec.rb
187
+ - spec/unit/wrest/components/mutators_spec.rb
188
+ - spec/unit/wrest/components/translators/xml_spec.rb
189
+ - spec/unit/wrest/components/translators_spec.rb
190
+ - spec/unit/wrest/core_ext/hash/conversions_spec.rb
191
+ - spec/unit/wrest/core_ext/string/conversions_spec.rb
192
+ - spec/unit/wrest/http/redirection_spec.rb
193
+ - spec/unit/wrest/http/request_spec.rb
194
+ - spec/unit/wrest/http/response_spec.rb
195
+ - spec/unit/wrest/resource/base_spec.rb
196
+ - spec/unit/wrest/uri_spec.rb
197
+ - spec/unit/wrest/uri_template_spec.rb
108
198
  has_rdoc: true
109
199
  homepage: http://github.com/kaiwren/wrest
110
200
  licenses: []
@@ -135,22 +225,81 @@ specification_version: 3
135
225
  summary: REST client library for Ruby.
136
226
  test_files:
137
227
  - spec/custom_matchers/custom_matchers.rb
138
- - spec/spec_helper.rb
139
- - spec/wrest/components/attributes_container/typecaster_spec.rb
140
- - spec/wrest/components/attributes_container_spec.rb
141
- - spec/wrest/components/mutators/base_spec.rb
142
- - spec/wrest/components/mutators/camel_to_snake_spec.rb
143
- - spec/wrest/components/mutators/xml_mini_type_caster_spec.rb
144
- - spec/wrest/components/mutators/xml_simple_type_caster_spec.rb
145
- - spec/wrest/components/mutators_spec.rb
146
- - spec/wrest/components/translators/xml_spec.rb
147
- - spec/wrest/components/translators_spec.rb
148
- - spec/wrest/core_ext/hash/conversions_spec.rb
149
- - spec/wrest/core_ext/string/conversions_spec.rb
150
- - spec/wrest/http/request_spec.rb
151
- - spec/wrest/http/response_spec.rb
152
- - spec/wrest/resource/base_spec.rb
153
- - spec/wrest/uri_spec.rb
154
- - spec/wrest/uri_template_spec.rb
228
+ - spec/functional/sample_rails_app/app/controllers/application_controller.rb
229
+ - spec/functional/sample_rails_app/app/controllers/lead_bottles_controller.rb
230
+ - spec/functional/sample_rails_app/app/helpers/application_helper.rb
231
+ - spec/functional/sample_rails_app/app/models/bottle.rb
232
+ - spec/functional/sample_rails_app/app/models/glass_bottle.rb
233
+ - spec/functional/sample_rails_app/app/models/lead_bottle.rb
234
+ - spec/functional/sample_rails_app/config/boot.rb
235
+ - spec/functional/sample_rails_app/config/environment.rb
236
+ - spec/functional/sample_rails_app/config/environments/development.rb
237
+ - spec/functional/sample_rails_app/config/environments/production.rb
238
+ - spec/functional/sample_rails_app/config/environments/test.rb
239
+ - spec/functional/sample_rails_app/config/initializers/backtrace_silencers.rb
240
+ - spec/functional/sample_rails_app/config/initializers/inflections.rb
241
+ - spec/functional/sample_rails_app/config/initializers/mime_types.rb
242
+ - spec/functional/sample_rails_app/config/initializers/new_rails_defaults.rb
243
+ - spec/functional/sample_rails_app/config/initializers/session_store.rb
244
+ - spec/functional/sample_rails_app/config/routes.rb
245
+ - spec/functional/sample_rails_app/db/migrate/20090319115628_create_bottle.rb
246
+ - spec/functional/sample_rails_app/db/schema.rb
247
+ - spec/functional/sample_rails_app/test/performance/browsing_test.rb
248
+ - spec/functional/sample_rails_app/test/test_helper.rb
249
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/init.rb
250
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/install.rb
251
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/base.rb
252
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/resources.rb
253
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/resources_controller.rb
254
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/routes_controller.rb
255
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/api.rb
256
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/exception.rb
257
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/from_json.rb
258
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/dispatch.rb
259
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/models/resourced_route.rb
260
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/query.rb
261
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/html.rb
262
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/json.rb
263
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/xml.rb
264
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render.rb
265
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/retrieve.rb
266
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/version.rb
267
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full.rb
268
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/base_spec.rb
269
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/controllers/resources_spec.rb
270
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/dispatch_spec.rb
271
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/models/resourced_route_spec.rb
272
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/query/parameter_spec.rb
273
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/query_spec.rb
274
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/html_spec.rb
275
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/json_spec.rb
276
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/xml_spec.rb
277
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render_spec.rb
278
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/retrieve_spec.rb
279
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/spec_helper.rb
280
+ - spec/functional/sample_rails_app/vendor/plugins/resource_full/uninstall.rb
281
+ - spec/functional/spec_helper.rb
282
+ - spec/unit/spec_helper.rb
283
+ - spec/unit/wrest/components/attributes_container/alias_accessors_spec.rb
284
+ - spec/unit/wrest/components/attributes_container/typecaster_spec.rb
285
+ - spec/unit/wrest/components/attributes_container_spec.rb
286
+ - spec/unit/wrest/components/mutators/base_spec.rb
287
+ - spec/unit/wrest/components/mutators/camel_to_snake_spec.rb
288
+ - spec/unit/wrest/components/mutators/xml_mini_type_caster_spec.rb
289
+ - spec/unit/wrest/components/mutators/xml_simple_type_caster_spec.rb
290
+ - spec/unit/wrest/components/mutators_spec.rb
291
+ - spec/unit/wrest/components/translators/xml_spec.rb
292
+ - spec/unit/wrest/components/translators_spec.rb
293
+ - spec/unit/wrest/core_ext/hash/conversions_spec.rb
294
+ - spec/unit/wrest/core_ext/string/conversions_spec.rb
295
+ - spec/unit/wrest/http/redirection_spec.rb
296
+ - spec/unit/wrest/http/request_spec.rb
297
+ - spec/unit/wrest/http/response_spec.rb
298
+ - spec/unit/wrest/resource/base_spec.rb
299
+ - spec/unit/wrest/uri_spec.rb
300
+ - spec/unit/wrest/uri_template_spec.rb
155
301
  - examples/delicious.rb
302
+ - examples/redirection.rb
303
+ - examples/twitter.rb
304
+ - examples/twitter_public_timeline.rb
156
305
  - examples/wow_realm_status.rb