ruby_odata 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. data/.gitignore +3 -2
  2. data/.travis.yml +2 -1
  3. data/.yardopts +6 -0
  4. data/CHANGELOG.md +102 -0
  5. data/Guardfile +14 -0
  6. data/README.md +285 -0
  7. data/Rakefile +0 -7
  8. data/features/basic_auth.feature +3 -2
  9. data/features/batch_request.feature +7 -6
  10. data/features/cassettes/basic_auth_protected_resource.yml +57 -0
  11. data/features/cassettes/batch_request_additions.yml +69 -0
  12. data/features/cassettes/batch_request_deletes.yml +69 -0
  13. data/features/cassettes/batch_request_updates.yml +69 -0
  14. data/features/cassettes/clean_database_for_testing.yml +46 -0
  15. data/features/cassettes/cucumber_tags/basic_auth.yml +297 -0
  16. data/features/cassettes/cucumber_tags/batch_request.yml +1459 -0
  17. data/features/cassettes/cucumber_tags/complex_types.yml +326 -0
  18. data/features/cassettes/cucumber_tags/error_handling.yml +64 -0
  19. data/features/cassettes/cucumber_tags/query_builder.yml +2025 -0
  20. data/features/cassettes/cucumber_tags/service.yml +234 -0
  21. data/features/cassettes/cucumber_tags/service_manage.yml +937 -0
  22. data/features/cassettes/cucumber_tags/service_methods.yml +647 -0
  23. data/features/cassettes/cucumber_tags/ssl.yml +203 -0
  24. data/features/cassettes/cucumber_tags/type_conversion.yml +337 -0
  25. data/features/cassettes/service_manage_additions.yml +65 -0
  26. data/features/cassettes/service_manage_deletions.yml +58 -0
  27. data/features/cassettes/service_manage_deletions_2.yml +58 -0
  28. data/features/cassettes/unsecured_metadata.yml +89 -0
  29. data/features/complex_types.feature +4 -3
  30. data/features/error_handling.feature +14 -0
  31. data/features/query_builder.feature +30 -9
  32. data/features/service.feature +4 -3
  33. data/features/service_manage.feature +6 -5
  34. data/features/service_methods.feature +3 -2
  35. data/features/ssl.feature +8 -8
  36. data/features/step_definitions/service_steps.rb +38 -24
  37. data/features/support/env.rb +1 -3
  38. data/features/support/hooks.rb +3 -2
  39. data/features/support/pickle.rb +29 -18
  40. data/features/support/vcr.rb +24 -0
  41. data/features/type_conversion.feature +16 -17
  42. data/lib/ruby_odata/association.rb +7 -6
  43. data/lib/ruby_odata/class_builder.rb +6 -7
  44. data/lib/ruby_odata/exceptions.rb +4 -0
  45. data/lib/ruby_odata/helpers.rb +11 -0
  46. data/lib/ruby_odata/operation.rb +5 -6
  47. data/lib/ruby_odata/property_metadata.rb +4 -5
  48. data/lib/ruby_odata/query_builder.rb +98 -63
  49. data/lib/ruby_odata/service.rb +118 -103
  50. data/lib/ruby_odata/version.rb +3 -1
  51. data/lib/ruby_odata.rb +20 -18
  52. data/ruby_odata.gemspec +16 -12
  53. data/spec/query_builder_spec.rb +78 -14
  54. data/spec/service_spec.rb +83 -83
  55. data/spec/support/sample_service_matcher.rb +15 -0
  56. data/test/RubyODataService/RubyODataService/App_Data/.gitkeep +0 -0
  57. data/test/blueprints.rb +15 -9
  58. data/test/usage_samples/querying.rb +5 -1
  59. data/test/usage_samples/sample_data.rb +1 -3
  60. metadata +213 -39
  61. data/CHANGELOG.rdoc +0 -88
  62. data/README.rdoc +0 -259
@@ -0,0 +1,647 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/$batch
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: ! '--batch_94f9-mlhu-308k
9
+
10
+ Content-Type: multipart/mixed;boundary=changeset_9pqe-rvka-6tyj
11
+
12
+
13
+ --changeset_9pqe-rvka-6tyj
14
+
15
+ Content-Type: application/http
16
+
17
+ Content-Transfer-Encoding: binary
18
+
19
+
20
+ POST http://win7dev:8989/SampleService/RubyOData.svc/Categories HTTP/1.1
21
+
22
+ Accept-Charset: utf-8
23
+
24
+ Content-Type: application/json;charset=utf-8
25
+
26
+
27
+ {"Name":"Category 0069","AuditFields":{"CreatedBy":"Machinist"}}
28
+
29
+ --changeset_9pqe-rvka-6tyj
30
+
31
+ Content-Type: application/http
32
+
33
+ Content-Transfer-Encoding: binary
34
+
35
+
36
+ POST http://win7dev:8989/SampleService/RubyOData.svc/Categories HTTP/1.1
37
+
38
+ Accept-Charset: utf-8
39
+
40
+ Content-Type: application/json;charset=utf-8
41
+
42
+
43
+ {"Name":"Category 0070","AuditFields":{"CreatedBy":"Machinist"}}
44
+
45
+ --changeset_9pqe-rvka-6tyj
46
+
47
+ Content-Type: application/http
48
+
49
+ Content-Transfer-Encoding: binary
50
+
51
+
52
+ POST http://win7dev:8989/SampleService/RubyOData.svc/Categories HTTP/1.1
53
+
54
+ Accept-Charset: utf-8
55
+
56
+ Content-Type: application/json;charset=utf-8
57
+
58
+
59
+ {"Name":"Category 0071","AuditFields":{"CreatedBy":"Machinist"}}
60
+
61
+
62
+
63
+ --changeset_9pqe-rvka-6tyj--
64
+
65
+ --batch_94f9-mlhu-308k--'
66
+ headers:
67
+ Accept:
68
+ - ! '*/*; q=0.5, application/xml'
69
+ Accept-Encoding:
70
+ - gzip, deflate
71
+ Content-Type:
72
+ - multipart/mixed; boundary=batch_94f9-mlhu-308k
73
+ Content-Length:
74
+ - '1040'
75
+ User-Agent:
76
+ - Ruby
77
+ response:
78
+ status:
79
+ code: 202
80
+ message: Accepted
81
+ headers:
82
+ Cache-Control:
83
+ - no-cache
84
+ Content-Length:
85
+ - '5140'
86
+ Content-Type:
87
+ - multipart/mixed; boundary=batchresponse_6b44618b-5c72-48e3-8241-a268e4ad9df3
88
+ Server:
89
+ - Microsoft-IIS/7.5
90
+ Set-Cookie:
91
+ - ASP.NET_SessionId=5udlumqwmluujxabt15s1byf; path=/; HttpOnly
92
+ X-Content-Type-Options:
93
+ - nosniff
94
+ Dataserviceversion:
95
+ - 1.0;
96
+ X-Aspnet-Version:
97
+ - 4.0.30319
98
+ X-Powered-By:
99
+ - ASP.NET
100
+ Date:
101
+ - Tue, 07 Aug 2012 19:35:42 GMT
102
+ body:
103
+ encoding: US-ASCII
104
+ string: ! "--batchresponse_6b44618b-5c72-48e3-8241-a268e4ad9df3\r\nContent-Type:
105
+ multipart/mixed; boundary=changesetresponse_2858f6fb-523f-4e9b-9876-162697cadd48\r\n\r\n--changesetresponse_2858f6fb-523f-4e9b-9876-162697cadd48\r\nContent-Type:
106
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 201
107
+ Created\r\nDataServiceVersion: 1.0;\r\nContent-Type: application/atom+xml;type=entry;charset=utf-8\r\nX-Content-Type-Options:
108
+ nosniff\r\nCache-Control: no-cache\r\nLocation: http://win7dev:8989/SampleService/RubyOData.svc/Categories(1)\r\n\r\n<?xml
109
+ version=\"1.0\" encoding=\"utf-8\"?><entry xml:base=\"http://win7dev:8989/SampleService/RubyOData.svc/\"
110
+ xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\"
111
+ xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"
112
+ xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"><id>http://win7dev:8989/SampleService/RubyOData.svc/Categories(1)</id><category
113
+ term=\"RubyODataService.Category\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\"
114
+ /><link rel=\"edit\" title=\"Category\" href=\"Categories(1)\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products\"
115
+ type=\"application/atom+xml;type=feed\" title=\"Products\" href=\"Categories(1)/Products\"
116
+ /><title /><updated>2012-08-07T19:35:42Z</updated><author><name /></author><content
117
+ type=\"application/xml\"><m:properties><d:Id m:type=\"Edm.Int32\">1</d:Id><d:Name>Category
118
+ 0069</d:Name><d:AuditFields m:type=\"RubyODataService.AuditFields\"><d:CreateDate
119
+ m:type=\"Edm.DateTime\">2012-08-07T19:35:42.078125Z</d:CreateDate><d:ModifiedDate
120
+ m:type=\"Edm.DateTime\">2012-08-07T19:35:42.078125Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>\r\n--changesetresponse_2858f6fb-523f-4e9b-9876-162697cadd48\r\nContent-Type:
121
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 201
122
+ Created\r\nDataServiceVersion: 1.0;\r\nContent-Type: application/atom+xml;type=entry;charset=utf-8\r\nX-Content-Type-Options:
123
+ nosniff\r\nCache-Control: no-cache\r\nLocation: http://win7dev:8989/SampleService/RubyOData.svc/Categories(2)\r\n\r\n<?xml
124
+ version=\"1.0\" encoding=\"utf-8\"?><entry xml:base=\"http://win7dev:8989/SampleService/RubyOData.svc/\"
125
+ xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\"
126
+ xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"
127
+ xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"><id>http://win7dev:8989/SampleService/RubyOData.svc/Categories(2)</id><category
128
+ term=\"RubyODataService.Category\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\"
129
+ /><link rel=\"edit\" title=\"Category\" href=\"Categories(2)\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products\"
130
+ type=\"application/atom+xml;type=feed\" title=\"Products\" href=\"Categories(2)/Products\"
131
+ /><title /><updated>2012-08-07T19:35:42Z</updated><author><name /></author><content
132
+ type=\"application/xml\"><m:properties><d:Id m:type=\"Edm.Int32\">2</d:Id><d:Name>Category
133
+ 0070</d:Name><d:AuditFields m:type=\"RubyODataService.AuditFields\"><d:CreateDate
134
+ m:type=\"Edm.DateTime\">2012-08-07T19:35:42.078125Z</d:CreateDate><d:ModifiedDate
135
+ m:type=\"Edm.DateTime\">2012-08-07T19:35:42.078125Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>\r\n--changesetresponse_2858f6fb-523f-4e9b-9876-162697cadd48\r\nContent-Type:
136
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 201
137
+ Created\r\nDataServiceVersion: 1.0;\r\nContent-Type: application/atom+xml;type=entry;charset=utf-8\r\nX-Content-Type-Options:
138
+ nosniff\r\nCache-Control: no-cache\r\nLocation: http://win7dev:8989/SampleService/RubyOData.svc/Categories(3)\r\n\r\n<?xml
139
+ version=\"1.0\" encoding=\"utf-8\"?><entry xml:base=\"http://win7dev:8989/SampleService/RubyOData.svc/\"
140
+ xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\"
141
+ xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"
142
+ xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"><id>http://win7dev:8989/SampleService/RubyOData.svc/Categories(3)</id><category
143
+ term=\"RubyODataService.Category\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\"
144
+ /><link rel=\"edit\" title=\"Category\" href=\"Categories(3)\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products\"
145
+ type=\"application/atom+xml;type=feed\" title=\"Products\" href=\"Categories(3)/Products\"
146
+ /><title /><updated>2012-08-07T19:35:42Z</updated><author><name /></author><content
147
+ type=\"application/xml\"><m:properties><d:Id m:type=\"Edm.Int32\">3</d:Id><d:Name>Category
148
+ 0071</d:Name><d:AuditFields m:type=\"RubyODataService.AuditFields\"><d:CreateDate
149
+ m:type=\"Edm.DateTime\">2012-08-07T19:35:42.078125Z</d:CreateDate><d:ModifiedDate
150
+ m:type=\"Edm.DateTime\">2012-08-07T19:35:42.078125Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>\r\n--changesetresponse_2858f6fb-523f-4e9b-9876-162697cadd48--\r\n--batchresponse_6b44618b-5c72-48e3-8241-a268e4ad9df3--\r\n"
151
+ http_version: !!null
152
+ recorded_at: Tue, 07 Aug 2012 19:35:43 GMT
153
+ - request:
154
+ method: get
155
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/EntityCategoryWebGet
156
+ body:
157
+ encoding: US-ASCII
158
+ string: ''
159
+ headers:
160
+ Accept:
161
+ - ! '*/*; q=0.5, application/xml'
162
+ Accept-Encoding:
163
+ - gzip, deflate
164
+ User-Agent:
165
+ - Ruby
166
+ response:
167
+ status:
168
+ code: 200
169
+ message: OK
170
+ headers:
171
+ Cache-Control:
172
+ - no-cache
173
+ Content-Length:
174
+ - '1495'
175
+ Content-Type:
176
+ - application/atom+xml;type=feed;charset=utf-8
177
+ Server:
178
+ - Microsoft-IIS/7.5
179
+ Set-Cookie:
180
+ - ASP.NET_SessionId=0xwuqacikal44x21fdh3xbaq; path=/; HttpOnly
181
+ X-Content-Type-Options:
182
+ - nosniff
183
+ Dataserviceversion:
184
+ - 1.0;
185
+ X-Aspnet-Version:
186
+ - 4.0.30319
187
+ X-Powered-By:
188
+ - ASP.NET
189
+ Date:
190
+ - Tue, 07 Aug 2012 21:21:54 GMT
191
+ body:
192
+ encoding: US-ASCII
193
+ string: <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
194
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
195
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
196
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/EntityCategoryWebGet</id><title
197
+ type="text">EntityCategoryWebGet</title><updated>2012-08-07T21:21:54Z</updated><link
198
+ rel="self" title="EntityCategoryWebGet" href="EntityCategoryWebGet" /><entry><id>http://win7dev:8989/SampleService/RubyOData.svc/Categories(1)</id><category
199
+ term="RubyODataService.Category" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
200
+ /><link rel="edit" title="Category" href="Categories(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products"
201
+ type="application/atom+xml;type=feed" title="Products" href="Categories(1)/Products"
202
+ /><title /><updated>2012-08-07T21:21:54Z</updated><author><name /></author><content
203
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Category
204
+ 0074</d:Name><d:AuditFields m:type="RubyODataService.AuditFields"><d:CreateDate
205
+ m:type="Edm.DateTime">2012-08-07T21:21:54.25</d:CreateDate><d:ModifiedDate
206
+ m:type="Edm.DateTime">2012-08-07T21:21:54.25</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry></feed>
207
+ http_version: !!null
208
+ recorded_at: Tue, 07 Aug 2012 21:21:54 GMT
209
+ - request:
210
+ method: post
211
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Categories
212
+ body:
213
+ encoding: ASCII-8BIT
214
+ string: ! '{"Name":"Category 0075","AuditFields":{"CreatedBy":"Machinist"},"Id":1}'
215
+ headers:
216
+ Accept:
217
+ - ! '*/*; q=0.5, application/xml'
218
+ Accept-Encoding:
219
+ - gzip, deflate
220
+ Content-Type:
221
+ - application/json
222
+ Content-Length:
223
+ - '71'
224
+ User-Agent:
225
+ - Ruby
226
+ response:
227
+ status:
228
+ code: 201
229
+ message: Created
230
+ headers:
231
+ Cache-Control:
232
+ - no-cache
233
+ Content-Length:
234
+ - '1245'
235
+ Content-Type:
236
+ - application/atom+xml;type=entry;charset=utf-8
237
+ Location:
238
+ - http://win7dev:8989/SampleService/RubyOData.svc/Categories(1)
239
+ Server:
240
+ - Microsoft-IIS/7.5
241
+ Set-Cookie:
242
+ - ASP.NET_SessionId=rfwve3ugldbmta44b3fgskri; path=/; HttpOnly
243
+ X-Content-Type-Options:
244
+ - nosniff
245
+ Dataserviceversion:
246
+ - 1.0;
247
+ X-Aspnet-Version:
248
+ - 4.0.30319
249
+ X-Powered-By:
250
+ - ASP.NET
251
+ Date:
252
+ - Tue, 07 Aug 2012 21:21:54 GMT
253
+ body:
254
+ encoding: US-ASCII
255
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
256
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
257
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
258
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Categories(1)</id><category
259
+ term="RubyODataService.Category" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
260
+ /><link rel="edit" title="Category" href="Categories(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products"
261
+ type="application/atom+xml;type=feed" title="Products" href="Categories(1)/Products"
262
+ /><title /><updated>2012-08-07T21:21:54Z</updated><author><name /></author><content
263
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Category
264
+ 0075</d:Name><d:AuditFields m:type="RubyODataService.AuditFields"><d:CreateDate
265
+ m:type="Edm.DateTime">2012-08-07T21:21:54.75Z</d:CreateDate><d:ModifiedDate
266
+ m:type="Edm.DateTime">2012-08-07T21:21:54.75Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
267
+ http_version: !!null
268
+ recorded_at: Tue, 07 Aug 2012 21:21:55 GMT
269
+ - request:
270
+ method: get
271
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/EntitySingleCategoryWebGet?id=1
272
+ body:
273
+ encoding: US-ASCII
274
+ string: ''
275
+ headers:
276
+ Accept:
277
+ - ! '*/*; q=0.5, application/xml'
278
+ Accept-Encoding:
279
+ - gzip, deflate
280
+ User-Agent:
281
+ - Ruby
282
+ response:
283
+ status:
284
+ code: 200
285
+ message: OK
286
+ headers:
287
+ Cache-Control:
288
+ - no-cache
289
+ Content-Length:
290
+ - '1243'
291
+ Content-Type:
292
+ - application/atom+xml;type=entry;charset=utf-8
293
+ Server:
294
+ - Microsoft-IIS/7.5
295
+ Set-Cookie:
296
+ - ASP.NET_SessionId=5m1mwedwm4edaav3j43htjfq; path=/; HttpOnly
297
+ X-Content-Type-Options:
298
+ - nosniff
299
+ Dataserviceversion:
300
+ - 1.0;
301
+ X-Aspnet-Version:
302
+ - 4.0.30319
303
+ X-Powered-By:
304
+ - ASP.NET
305
+ Date:
306
+ - Tue, 07 Aug 2012 21:21:54 GMT
307
+ body:
308
+ encoding: US-ASCII
309
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
310
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
311
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
312
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Categories(1)</id><category
313
+ term="RubyODataService.Category" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
314
+ /><link rel="edit" title="Category" href="Categories(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products"
315
+ type="application/atom+xml;type=feed" title="Products" href="Categories(1)/Products"
316
+ /><title /><updated>2012-08-07T21:21:54Z</updated><author><name /></author><content
317
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Category
318
+ 0075</d:Name><d:AuditFields m:type="RubyODataService.AuditFields"><d:CreateDate
319
+ m:type="Edm.DateTime">2012-08-07T21:21:54.75</d:CreateDate><d:ModifiedDate
320
+ m:type="Edm.DateTime">2012-08-07T21:21:54.75</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
321
+ http_version: !!null
322
+ recorded_at: Tue, 07 Aug 2012 21:21:55 GMT
323
+ - request:
324
+ method: post
325
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Categories
326
+ body:
327
+ encoding: ASCII-8BIT
328
+ string: ! '{"Name":"Cat1","AuditFields":{"CreatedBy":"Machinist"}}'
329
+ headers:
330
+ Accept:
331
+ - ! '*/*; q=0.5, application/xml'
332
+ Accept-Encoding:
333
+ - gzip, deflate
334
+ Content-Type:
335
+ - application/json
336
+ Content-Length:
337
+ - '55'
338
+ User-Agent:
339
+ - Ruby
340
+ response:
341
+ status:
342
+ code: 201
343
+ message: Created
344
+ headers:
345
+ Cache-Control:
346
+ - no-cache
347
+ Content-Length:
348
+ - '1236'
349
+ Content-Type:
350
+ - application/atom+xml;type=entry;charset=utf-8
351
+ Location:
352
+ - http://win7dev:8989/SampleService/RubyOData.svc/Categories(1)
353
+ Server:
354
+ - Microsoft-IIS/7.5
355
+ Set-Cookie:
356
+ - ASP.NET_SessionId=qpe2n5za5bzgul5iumtthvqe; path=/; HttpOnly
357
+ X-Content-Type-Options:
358
+ - nosniff
359
+ Dataserviceversion:
360
+ - 1.0;
361
+ X-Aspnet-Version:
362
+ - 4.0.30319
363
+ X-Powered-By:
364
+ - ASP.NET
365
+ Date:
366
+ - Tue, 07 Aug 2012 21:21:55 GMT
367
+ body:
368
+ encoding: US-ASCII
369
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
370
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
371
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
372
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Categories(1)</id><category
373
+ term="RubyODataService.Category" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
374
+ /><link rel="edit" title="Category" href="Categories(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products"
375
+ type="application/atom+xml;type=feed" title="Products" href="Categories(1)/Products"
376
+ /><title /><updated>2012-08-07T21:21:55Z</updated><author><name /></author><content
377
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Cat1</d:Name><d:AuditFields
378
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:21:55.25Z</d:CreateDate><d:ModifiedDate
379
+ m:type="Edm.DateTime">2012-08-07T21:21:55.25Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
380
+ http_version: !!null
381
+ recorded_at: Tue, 07 Aug 2012 21:21:55 GMT
382
+ - request:
383
+ method: post
384
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Categories
385
+ body:
386
+ encoding: ASCII-8BIT
387
+ string: ! '{"Name":"Cat2","AuditFields":{"CreatedBy":"Machinist"}}'
388
+ headers:
389
+ Accept:
390
+ - ! '*/*; q=0.5, application/xml'
391
+ Accept-Encoding:
392
+ - gzip, deflate
393
+ Content-Type:
394
+ - application/json
395
+ Content-Length:
396
+ - '55'
397
+ User-Agent:
398
+ - Ruby
399
+ response:
400
+ status:
401
+ code: 201
402
+ message: Created
403
+ headers:
404
+ Cache-Control:
405
+ - no-cache
406
+ Content-Length:
407
+ - '1240'
408
+ Content-Type:
409
+ - application/atom+xml;type=entry;charset=utf-8
410
+ Location:
411
+ - http://win7dev:8989/SampleService/RubyOData.svc/Categories(2)
412
+ Server:
413
+ - Microsoft-IIS/7.5
414
+ Set-Cookie:
415
+ - ASP.NET_SessionId=3yfzvdpeoqmxkhkn3xufrsyg; path=/; HttpOnly
416
+ X-Content-Type-Options:
417
+ - nosniff
418
+ Dataserviceversion:
419
+ - 1.0;
420
+ X-Aspnet-Version:
421
+ - 4.0.30319
422
+ X-Powered-By:
423
+ - ASP.NET
424
+ Date:
425
+ - Tue, 07 Aug 2012 21:21:55 GMT
426
+ body:
427
+ encoding: US-ASCII
428
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
429
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
430
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
431
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Categories(2)</id><category
432
+ term="RubyODataService.Category" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
433
+ /><link rel="edit" title="Category" href="Categories(2)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products"
434
+ type="application/atom+xml;type=feed" title="Products" href="Categories(2)/Products"
435
+ /><title /><updated>2012-08-07T21:21:55Z</updated><author><name /></author><content
436
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">2</d:Id><d:Name>Cat2</d:Name><d:AuditFields
437
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:21:55.5625Z</d:CreateDate><d:ModifiedDate
438
+ m:type="Edm.DateTime">2012-08-07T21:21:55.5625Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
439
+ http_version: !!null
440
+ recorded_at: Tue, 07 Aug 2012 21:21:55 GMT
441
+ - request:
442
+ method: post
443
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Categories
444
+ body:
445
+ encoding: ASCII-8BIT
446
+ string: ! '{"Name":"Cat3","AuditFields":{"CreatedBy":"Machinist"}}'
447
+ headers:
448
+ Accept:
449
+ - ! '*/*; q=0.5, application/xml'
450
+ Accept-Encoding:
451
+ - gzip, deflate
452
+ Content-Type:
453
+ - application/json
454
+ Content-Length:
455
+ - '55'
456
+ User-Agent:
457
+ - Ruby
458
+ response:
459
+ status:
460
+ code: 201
461
+ message: Created
462
+ headers:
463
+ Cache-Control:
464
+ - no-cache
465
+ Content-Length:
466
+ - '1244'
467
+ Content-Type:
468
+ - application/atom+xml;type=entry;charset=utf-8
469
+ Location:
470
+ - http://win7dev:8989/SampleService/RubyOData.svc/Categories(3)
471
+ Server:
472
+ - Microsoft-IIS/7.5
473
+ Set-Cookie:
474
+ - ASP.NET_SessionId=eypmcjpmpre10dc12fw4wxgr; path=/; HttpOnly
475
+ X-Content-Type-Options:
476
+ - nosniff
477
+ Dataserviceversion:
478
+ - 1.0;
479
+ X-Aspnet-Version:
480
+ - 4.0.30319
481
+ X-Powered-By:
482
+ - ASP.NET
483
+ Date:
484
+ - Tue, 07 Aug 2012 21:21:55 GMT
485
+ body:
486
+ encoding: US-ASCII
487
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
488
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
489
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
490
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Categories(3)</id><category
491
+ term="RubyODataService.Category" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
492
+ /><link rel="edit" title="Category" href="Categories(3)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products"
493
+ type="application/atom+xml;type=feed" title="Products" href="Categories(3)/Products"
494
+ /><title /><updated>2012-08-07T21:21:55Z</updated><author><name /></author><content
495
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">3</d:Id><d:Name>Cat3</d:Name><d:AuditFields
496
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:21:55.859375Z</d:CreateDate><d:ModifiedDate
497
+ m:type="Edm.DateTime">2012-08-07T21:21:55.859375Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
498
+ http_version: !!null
499
+ recorded_at: Tue, 07 Aug 2012 21:21:56 GMT
500
+ - request:
501
+ method: get
502
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/CategoryNames
503
+ body:
504
+ encoding: US-ASCII
505
+ string: ''
506
+ headers:
507
+ Accept:
508
+ - ! '*/*; q=0.5, application/xml'
509
+ Accept-Encoding:
510
+ - gzip, deflate
511
+ User-Agent:
512
+ - Ruby
513
+ response:
514
+ status:
515
+ code: 200
516
+ message: OK
517
+ headers:
518
+ Cache-Control:
519
+ - no-cache
520
+ Content-Length:
521
+ - '200'
522
+ Content-Type:
523
+ - application/xml;charset=utf-8
524
+ Server:
525
+ - Microsoft-IIS/7.5
526
+ Set-Cookie:
527
+ - ASP.NET_SessionId=dyonmsoc43s3amxicoox1ffx; path=/; HttpOnly
528
+ X-Content-Type-Options:
529
+ - nosniff
530
+ Dataserviceversion:
531
+ - 1.0;
532
+ X-Aspnet-Version:
533
+ - 4.0.30319
534
+ X-Powered-By:
535
+ - ASP.NET
536
+ Date:
537
+ - Tue, 07 Aug 2012 21:21:55 GMT
538
+ body:
539
+ encoding: US-ASCII
540
+ string: <?xml version="1.0" encoding="utf-8"?><CategoryNames xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices"><element>Cat1</element><element>Cat2</element><element>Cat3</element></CategoryNames>
541
+ http_version: !!null
542
+ recorded_at: Tue, 07 Aug 2012 21:21:56 GMT
543
+ - request:
544
+ method: post
545
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Categories
546
+ body:
547
+ encoding: ASCII-8BIT
548
+ string: ! '{"Name":"Category 0079","AuditFields":{"CreatedBy":"Machinist"}}'
549
+ headers:
550
+ Accept:
551
+ - ! '*/*; q=0.5, application/xml'
552
+ Accept-Encoding:
553
+ - gzip, deflate
554
+ Content-Type:
555
+ - application/json
556
+ Content-Length:
557
+ - '64'
558
+ User-Agent:
559
+ - Ruby
560
+ response:
561
+ status:
562
+ code: 201
563
+ message: Created
564
+ headers:
565
+ Cache-Control:
566
+ - no-cache
567
+ Content-Length:
568
+ - '1253'
569
+ Content-Type:
570
+ - application/atom+xml;type=entry;charset=utf-8
571
+ Location:
572
+ - http://win7dev:8989/SampleService/RubyOData.svc/Categories(1)
573
+ Server:
574
+ - Microsoft-IIS/7.5
575
+ Set-Cookie:
576
+ - ASP.NET_SessionId=fqkuibkdojob01vo3urlnas1; path=/; HttpOnly
577
+ X-Content-Type-Options:
578
+ - nosniff
579
+ Dataserviceversion:
580
+ - 1.0;
581
+ X-Aspnet-Version:
582
+ - 4.0.30319
583
+ X-Powered-By:
584
+ - ASP.NET
585
+ Date:
586
+ - Tue, 07 Aug 2012 21:21:56 GMT
587
+ body:
588
+ encoding: US-ASCII
589
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
590
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
591
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
592
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Categories(1)</id><category
593
+ term="RubyODataService.Category" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
594
+ /><link rel="edit" title="Category" href="Categories(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products"
595
+ type="application/atom+xml;type=feed" title="Products" href="Categories(1)/Products"
596
+ /><title /><updated>2012-08-07T21:21:56Z</updated><author><name /></author><content
597
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Category
598
+ 0079</d:Name><d:AuditFields m:type="RubyODataService.AuditFields"><d:CreateDate
599
+ m:type="Edm.DateTime">2012-08-07T21:21:56.359375Z</d:CreateDate><d:ModifiedDate
600
+ m:type="Edm.DateTime">2012-08-07T21:21:56.359375Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
601
+ http_version: !!null
602
+ recorded_at: Tue, 07 Aug 2012 21:21:56 GMT
603
+ - request:
604
+ method: get
605
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/FirstCategoryId
606
+ body:
607
+ encoding: US-ASCII
608
+ string: ''
609
+ headers:
610
+ Accept:
611
+ - ! '*/*; q=0.5, application/xml'
612
+ Accept-Encoding:
613
+ - gzip, deflate
614
+ User-Agent:
615
+ - Ruby
616
+ response:
617
+ status:
618
+ code: 200
619
+ message: OK
620
+ headers:
621
+ Cache-Control:
622
+ - no-cache
623
+ Content-Length:
624
+ - '234'
625
+ Content-Type:
626
+ - application/xml;charset=utf-8
627
+ Server:
628
+ - Microsoft-IIS/7.5
629
+ Set-Cookie:
630
+ - ASP.NET_SessionId=4k2jb2uhzbmvg30pbbsreqyb; path=/; HttpOnly
631
+ X-Content-Type-Options:
632
+ - nosniff
633
+ Dataserviceversion:
634
+ - 1.0;
635
+ X-Aspnet-Version:
636
+ - 4.0.30319
637
+ X-Powered-By:
638
+ - ASP.NET
639
+ Date:
640
+ - Tue, 07 Aug 2012 21:21:56 GMT
641
+ body:
642
+ encoding: US-ASCII
643
+ string: <?xml version="1.0" encoding="utf-8"?><d:FirstCategoryId xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
644
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:type="Edm.Int32">1</d:FirstCategoryId>
645
+ http_version: !!null
646
+ recorded_at: Tue, 07 Aug 2012 21:21:56 GMT
647
+ recorded_with: VCR 2.2.4