ruby_odata 0.1.0 → 0.1.1

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.
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,203 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://admin:passwd@win7dev:44300/SampleService/BasicAuth/RubyOData.svc/Categories
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: ! '{"Name":"Auth Test Category","AuditFields":{"CreatedBy":"Machinist"}}'
9
+ headers:
10
+ Accept:
11
+ - ! '*/*; q=0.5, application/xml'
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Content-Type:
15
+ - application/json
16
+ Content-Length:
17
+ - '69'
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ Cache-Control:
26
+ - no-cache
27
+ Content-Length:
28
+ - '1282'
29
+ Content-Type:
30
+ - application/atom+xml;type=entry;charset=utf-8
31
+ Location:
32
+ - https://win7dev:44300/SampleService/BasicAuth/RubyOData.svc/Categories(1)
33
+ Server:
34
+ - Microsoft-IIS/7.5
35
+ Set-Cookie:
36
+ - ASP.NET_SessionId=o5sznpaa1cviza5dsdjbbrgx; path=/; HttpOnly
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Dataserviceversion:
40
+ - 1.0;
41
+ X-Aspnet-Version:
42
+ - 4.0.30319
43
+ X-Powered-By:
44
+ - ASP.NET
45
+ Date:
46
+ - Tue, 07 Aug 2012 21:21:56 GMT
47
+ body:
48
+ encoding: US-ASCII
49
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="https://win7dev:44300/SampleService/BasicAuth/RubyOData.svc/"
50
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
51
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
52
+ xmlns:gml="http://www.opengis.net/gml"><id>https://win7dev:44300/SampleService/BasicAuth/RubyOData.svc/Categories(1)</id><category
53
+ term="RubyODataService.Category" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
54
+ /><link rel="edit" title="Category" href="Categories(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products"
55
+ type="application/atom+xml;type=feed" title="Products" href="Categories(1)/Products"
56
+ /><title /><updated>2012-08-07T21:21:56Z</updated><author><name /></author><content
57
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Auth
58
+ Test Category</d:Name><d:AuditFields m:type="RubyODataService.AuditFields"><d:CreateDate
59
+ m:type="Edm.DateTime">2012-08-07T21:21:56.953125Z</d:CreateDate><d:ModifiedDate
60
+ m:type="Edm.DateTime">2012-08-07T21:21:56.953125Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
61
+ http_version: !!null
62
+ recorded_at: Tue, 07 Aug 2012 21:21:57 GMT
63
+ - request:
64
+ method: get
65
+ uri: https://admin:passwd@win7dev:44300/SampleService/BasicAuth/RubyOData.svc/Categories(1)
66
+ body:
67
+ encoding: US-ASCII
68
+ string: ''
69
+ headers:
70
+ Accept:
71
+ - ! '*/*; q=0.5, application/xml'
72
+ Accept-Encoding:
73
+ - gzip, deflate
74
+ User-Agent:
75
+ - Ruby
76
+ response:
77
+ status:
78
+ code: 200
79
+ message: OK
80
+ headers:
81
+ Cache-Control:
82
+ - no-cache
83
+ Content-Length:
84
+ - '1274'
85
+ Content-Type:
86
+ - application/atom+xml;type=entry;charset=utf-8
87
+ Server:
88
+ - Microsoft-IIS/7.5
89
+ Set-Cookie:
90
+ - ASP.NET_SessionId=xa4wqiktizqq2hfjeibtjacv; path=/; HttpOnly
91
+ X-Content-Type-Options:
92
+ - nosniff
93
+ Dataserviceversion:
94
+ - 1.0;
95
+ X-Aspnet-Version:
96
+ - 4.0.30319
97
+ X-Powered-By:
98
+ - ASP.NET
99
+ Date:
100
+ - Tue, 07 Aug 2012 21:21:56 GMT
101
+ body:
102
+ encoding: US-ASCII
103
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="https://win7dev:44300/SampleService/BasicAuth/RubyOData.svc/"
104
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
105
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
106
+ xmlns:gml="http://www.opengis.net/gml"><id>https://win7dev:44300/SampleService/BasicAuth/RubyOData.svc/Categories(1)</id><category
107
+ term="RubyODataService.Category" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
108
+ /><link rel="edit" title="Category" href="Categories(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products"
109
+ type="application/atom+xml;type=feed" title="Products" href="Categories(1)/Products"
110
+ /><title /><updated>2012-08-07T21:21:57Z</updated><author><name /></author><content
111
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Auth
112
+ Test Category</d:Name><d:AuditFields m:type="RubyODataService.AuditFields"><d:CreateDate
113
+ m:type="Edm.DateTime">2012-08-07T21:21:56.953</d:CreateDate><d:ModifiedDate
114
+ m:type="Edm.DateTime">2012-08-07T21:21:56.953</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
115
+ http_version: !!null
116
+ recorded_at: Tue, 07 Aug 2012 21:21:57 GMT
117
+ - request:
118
+ method: get
119
+ uri: https://admin:passwd@win7dev:44300/SampleService/BasicAuth/RubyOData.svc/$metadata
120
+ body:
121
+ encoding: US-ASCII
122
+ string: ''
123
+ headers:
124
+ Accept:
125
+ - ! '*/*; q=0.5, application/xml'
126
+ Accept-Encoding:
127
+ - gzip, deflate
128
+ User-Agent:
129
+ - Ruby
130
+ response:
131
+ status:
132
+ code: 200
133
+ message: OK
134
+ headers:
135
+ Cache-Control:
136
+ - no-cache
137
+ Content-Length:
138
+ - '4055'
139
+ Content-Type:
140
+ - application/xml;charset=utf-8
141
+ Server:
142
+ - Microsoft-IIS/7.5
143
+ Set-Cookie:
144
+ - ASP.NET_SessionId=nqu2cmw2lsdcdow1tflssuqz; path=/; HttpOnly
145
+ X-Content-Type-Options:
146
+ - nosniff
147
+ Dataserviceversion:
148
+ - 1.0;
149
+ X-Aspnet-Version:
150
+ - 4.0.30319
151
+ X-Powered-By:
152
+ - ASP.NET
153
+ Date:
154
+ - Tue, 07 Aug 2012 21:21:56 GMT
155
+ body:
156
+ encoding: US-ASCII
157
+ string: <?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"><edmx:DataServices
158
+ m:DataServiceVersion="1.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><Schema
159
+ Namespace="RubyODataService" xmlns="http://schemas.microsoft.com/ado/2008/09/edm"><EntityType
160
+ Name="Product"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32"
161
+ Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation"
162
+ /><Property Name="Name" Type="Edm.String" MaxLength="4000" FixedLength="false"
163
+ Unicode="true" /><Property Name="Description" Type="Edm.String" MaxLength="4000"
164
+ FixedLength="false" Unicode="true" /><Property Name="Price" Type="Edm.Decimal"
165
+ Nullable="false" Precision="18" Scale="2" /><Property Name="DiscontinuedDate"
166
+ Type="Edm.DateTime" /><Property Name="CategoryId" Type="Edm.Int32" Nullable="false"
167
+ /><Property Name="AuditFields" Type="RubyODataService.AuditFields" Nullable="false"
168
+ /><NavigationProperty Name="Category" Relationship="RubyODataService.Category_Products"
169
+ ToRole="Category_Products_Source" FromRole="Category_Products_Target" /></EntityType><ComplexType
170
+ Name="AuditFields"><Property Name="CreateDate" Type="Edm.DateTime" Nullable="false"
171
+ /><Property Name="ModifiedDate" Type="Edm.DateTime" Nullable="false" /><Property
172
+ Name="CreatedBy" Type="Edm.String" MaxLength="4000" FixedLength="false" Unicode="true"
173
+ /></ComplexType><EntityType Name="Category"><Key><PropertyRef Name="Id" /></Key><Property
174
+ Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity"
175
+ xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property
176
+ Name="Name" Type="Edm.String" MaxLength="4000" FixedLength="false" Unicode="true"
177
+ /><Property Name="AuditFields" Type="RubyODataService.AuditFields" Nullable="false"
178
+ /><NavigationProperty Name="Products" Relationship="RubyODataService.Category_Products"
179
+ ToRole="Category_Products_Target" FromRole="Category_Products_Source" /></EntityType><EntityType
180
+ Name="EdmMetadata"><Key><PropertyRef Name="Id" /></Key><Property Name="Id"
181
+ Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation"
182
+ /><Property Name="ModelHash" Type="Edm.String" MaxLength="4000" FixedLength="false"
183
+ Unicode="true" /></EntityType><Association Name="Category_Products"><End Type="RubyODataService.Product"
184
+ Role="Category_Products_Target" Multiplicity="*" /><End Type="RubyODataService.Category"
185
+ Role="Category_Products_Source" Multiplicity="1"><OnDelete Action="Cascade"
186
+ /></End><ReferentialConstraint><Principal Role="Category_Products_Source"><PropertyRef
187
+ Name="Id" /></Principal><Dependent Role="Category_Products_Target"><PropertyRef
188
+ Name="CategoryId" /></Dependent></ReferentialConstraint></Association><EntityContainer
189
+ Name="RubyODataContext" m:IsDefaultEntityContainer="true"><EntitySet Name="Products"
190
+ EntityType="RubyODataService.Product" /><EntitySet Name="Categories" EntityType="RubyODataService.Category"
191
+ /><EntitySet Name="EdmMetadatas" EntityType="RubyODataService.EdmMetadata"
192
+ /><AssociationSet Name="Category_Products" Association="RubyODataService.Category_Products"><End
193
+ Role="Category_Products_Target" EntitySet="Products" /><End Role="Category_Products_Source"
194
+ EntitySet="Categories" /></AssociationSet><FunctionImport Name="CleanDatabaseForTesting"
195
+ m:HttpMethod="POST" /><FunctionImport Name="EntityCategoryWebGet" ReturnType="Collection(RubyODataService.Category)"
196
+ EntitySet="Categories" m:HttpMethod="GET" /><FunctionImport Name="CategoryNames"
197
+ ReturnType="Collection(Edm.String)" m:HttpMethod="GET" /><FunctionImport Name="FirstCategoryId"
198
+ ReturnType="Edm.Int32" m:HttpMethod="GET" /><FunctionImport Name="EntitySingleCategoryWebGet"
199
+ ReturnType="RubyODataService.Category" EntitySet="Categories" m:HttpMethod="GET"><Parameter
200
+ Name="id" Type="Edm.Int32" /></FunctionImport></EntityContainer></Schema></edmx:DataServices></edmx:Edmx>
201
+ http_version: !!null
202
+ recorded_at: Tue, 07 Aug 2012 21:21:57 GMT
203
+ recorded_with: VCR 2.2.4
@@ -0,0 +1,337 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Products
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: ! '{"Name":"Test Product","Description":"Test Widget","Price":"10.25","Category":{"Name":"Category
9
+ 0084","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}'
10
+ headers:
11
+ Accept:
12
+ - ! '*/*; q=0.5, application/xml'
13
+ Accept-Encoding:
14
+ - gzip, deflate
15
+ Content-Type:
16
+ - application/json
17
+ Content-Length:
18
+ - '183'
19
+ User-Agent:
20
+ - Ruby
21
+ response:
22
+ status:
23
+ code: 201
24
+ message: Created
25
+ headers:
26
+ Cache-Control:
27
+ - no-cache
28
+ Content-Length:
29
+ - '1437'
30
+ Content-Type:
31
+ - application/atom+xml;type=entry;charset=utf-8
32
+ Location:
33
+ - http://win7dev:8989/SampleService/RubyOData.svc/Products(1)
34
+ Server:
35
+ - Microsoft-IIS/7.5
36
+ Set-Cookie:
37
+ - ASP.NET_SessionId=hdlcnddo32dwqhvdtaly2a4a; path=/; HttpOnly
38
+ X-Content-Type-Options:
39
+ - nosniff
40
+ Dataserviceversion:
41
+ - 1.0;
42
+ X-Aspnet-Version:
43
+ - 4.0.30319
44
+ X-Powered-By:
45
+ - ASP.NET
46
+ Date:
47
+ - Tue, 07 Aug 2012 21:21:58 GMT
48
+ body:
49
+ encoding: US-ASCII
50
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
51
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
52
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
53
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
54
+ term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
55
+ /><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
56
+ type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
57
+ /><title /><updated>2012-08-07T21:21:58Z</updated><author><name /></author><content
58
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Test
59
+ Product</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">10.25</d:Price><d:DiscontinuedDate
60
+ m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
61
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:21:58.65625Z</d:CreateDate><d:ModifiedDate
62
+ m:type="Edm.DateTime">2012-08-07T21:21:58.65625Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
63
+ http_version: !!null
64
+ recorded_at: Tue, 07 Aug 2012 21:21:58 GMT
65
+ - request:
66
+ method: get
67
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Products(1)
68
+ body:
69
+ encoding: US-ASCII
70
+ string: ''
71
+ headers:
72
+ Accept:
73
+ - ! '*/*; q=0.5, application/xml'
74
+ Accept-Encoding:
75
+ - gzip, deflate
76
+ User-Agent:
77
+ - Ruby
78
+ response:
79
+ status:
80
+ code: 200
81
+ message: OK
82
+ headers:
83
+ Cache-Control:
84
+ - no-cache
85
+ Content-Length:
86
+ - '1431'
87
+ Content-Type:
88
+ - application/atom+xml;type=entry;charset=utf-8
89
+ Server:
90
+ - Microsoft-IIS/7.5
91
+ Set-Cookie:
92
+ - ASP.NET_SessionId=gxzuyuit2vnegno5zndhuyhc; path=/; HttpOnly
93
+ X-Content-Type-Options:
94
+ - nosniff
95
+ Dataserviceversion:
96
+ - 1.0;
97
+ X-Aspnet-Version:
98
+ - 4.0.30319
99
+ X-Powered-By:
100
+ - ASP.NET
101
+ Date:
102
+ - Tue, 07 Aug 2012 21:21:58 GMT
103
+ body:
104
+ encoding: US-ASCII
105
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
106
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
107
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
108
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
109
+ term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
110
+ /><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
111
+ type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
112
+ /><title /><updated>2012-08-07T21:21:58Z</updated><author><name /></author><content
113
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Test
114
+ Product</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">10.25</d:Price><d:DiscontinuedDate
115
+ m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
116
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:21:58.657</d:CreateDate><d:ModifiedDate
117
+ m:type="Edm.DateTime">2012-08-07T21:21:58.657</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
118
+ http_version: !!null
119
+ recorded_at: Tue, 07 Aug 2012 21:21:58 GMT
120
+ - request:
121
+ method: put
122
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Products(1)
123
+ body:
124
+ encoding: ASCII-8BIT
125
+ string: ! '{"Name":"Changed Test Product","Description":"Test Widget","Price":"10.25","AuditFields":{"CreatedBy":"Machinist","CreateDate":"2012-08-07T21:21:58.657","ModifiedDate":"2012-08-07T21:21:58.657"},"__metadata":{"uri":"http://win7dev:8989/SampleService/RubyOData.svc/Products(1)"},"Id":1,"DiscontinuedDate":null,"CategoryId":1}'
126
+ headers:
127
+ Accept:
128
+ - ! '*/*; q=0.5, application/xml'
129
+ Accept-Encoding:
130
+ - gzip, deflate
131
+ Content-Type:
132
+ - application/json
133
+ Content-Length:
134
+ - '324'
135
+ User-Agent:
136
+ - Ruby
137
+ response:
138
+ status:
139
+ code: 204
140
+ message: No Content
141
+ headers:
142
+ Cache-Control:
143
+ - no-cache
144
+ Server:
145
+ - Microsoft-IIS/7.5
146
+ Set-Cookie:
147
+ - ASP.NET_SessionId=0mtbr44ryrx4om4emoipupwb; path=/; HttpOnly
148
+ X-Content-Type-Options:
149
+ - nosniff
150
+ Dataserviceversion:
151
+ - 1.0;
152
+ X-Aspnet-Version:
153
+ - 4.0.30319
154
+ X-Powered-By:
155
+ - ASP.NET
156
+ Date:
157
+ - Tue, 07 Aug 2012 21:21:58 GMT
158
+ body:
159
+ encoding: US-ASCII
160
+ string: ''
161
+ http_version: !!null
162
+ recorded_at: Tue, 07 Aug 2012 21:21:59 GMT
163
+ - request:
164
+ method: get
165
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Products(1)
166
+ body:
167
+ encoding: US-ASCII
168
+ string: ''
169
+ headers:
170
+ Accept:
171
+ - ! '*/*; q=0.5, application/xml'
172
+ Accept-Encoding:
173
+ - gzip, deflate
174
+ User-Agent:
175
+ - Ruby
176
+ response:
177
+ status:
178
+ code: 200
179
+ message: OK
180
+ headers:
181
+ Cache-Control:
182
+ - no-cache
183
+ Content-Length:
184
+ - '1439'
185
+ Content-Type:
186
+ - application/atom+xml;type=entry;charset=utf-8
187
+ Server:
188
+ - Microsoft-IIS/7.5
189
+ Set-Cookie:
190
+ - ASP.NET_SessionId=cslezwh3sdww02x0qcf1suh1; path=/; HttpOnly
191
+ X-Content-Type-Options:
192
+ - nosniff
193
+ Dataserviceversion:
194
+ - 1.0;
195
+ X-Aspnet-Version:
196
+ - 4.0.30319
197
+ X-Powered-By:
198
+ - ASP.NET
199
+ Date:
200
+ - Tue, 07 Aug 2012 21:21:58 GMT
201
+ body:
202
+ encoding: US-ASCII
203
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
204
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
205
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
206
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
207
+ term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
208
+ /><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
209
+ type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
210
+ /><title /><updated>2012-08-07T21:21:58Z</updated><author><name /></author><content
211
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Changed
212
+ Test Product</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">10.25</d:Price><d:DiscontinuedDate
213
+ m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
214
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:21:58.657</d:CreateDate><d:ModifiedDate
215
+ m:type="Edm.DateTime">2012-08-07T21:21:58.657</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
216
+ http_version: !!null
217
+ recorded_at: Tue, 07 Aug 2012 21:21:59 GMT
218
+ - request:
219
+ method: post
220
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Products
221
+ body:
222
+ encoding: ASCII-8BIT
223
+ string: ! '{"Name":"Widget 0073","Description":"Test Widget","Price":"100.00","Category":{"Name":"Category
224
+ 0085","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}'
225
+ headers:
226
+ Accept:
227
+ - ! '*/*; q=0.5, application/xml'
228
+ Accept-Encoding:
229
+ - gzip, deflate
230
+ Content-Type:
231
+ - application/json
232
+ Content-Length:
233
+ - '183'
234
+ User-Agent:
235
+ - Ruby
236
+ response:
237
+ status:
238
+ code: 201
239
+ message: Created
240
+ headers:
241
+ Cache-Control:
242
+ - no-cache
243
+ Content-Length:
244
+ - '1439'
245
+ Content-Type:
246
+ - application/atom+xml;type=entry;charset=utf-8
247
+ Location:
248
+ - http://win7dev:8989/SampleService/RubyOData.svc/Products(1)
249
+ Server:
250
+ - Microsoft-IIS/7.5
251
+ Set-Cookie:
252
+ - ASP.NET_SessionId=a5r2goobthww5j3fdaal1cdo; path=/; HttpOnly
253
+ X-Content-Type-Options:
254
+ - nosniff
255
+ Dataserviceversion:
256
+ - 1.0;
257
+ X-Aspnet-Version:
258
+ - 4.0.30319
259
+ X-Powered-By:
260
+ - ASP.NET
261
+ Date:
262
+ - Tue, 07 Aug 2012 21:21:58 GMT
263
+ body:
264
+ encoding: US-ASCII
265
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
266
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
267
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
268
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
269
+ term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
270
+ /><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
271
+ type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
272
+ /><title /><updated>2012-08-07T21:21:59Z</updated><author><name /></author><content
273
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Widget
274
+ 0073</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">100.00</d:Price><d:DiscontinuedDate
275
+ m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
276
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:21:59.359375Z</d:CreateDate><d:ModifiedDate
277
+ m:type="Edm.DateTime">2012-08-07T21:21:59.359375Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
278
+ http_version: !!null
279
+ recorded_at: Tue, 07 Aug 2012 21:21:59 GMT
280
+ - request:
281
+ method: get
282
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Products
283
+ body:
284
+ encoding: US-ASCII
285
+ string: ''
286
+ headers:
287
+ Accept:
288
+ - ! '*/*; q=0.5, application/xml'
289
+ Accept-Encoding:
290
+ - gzip, deflate
291
+ User-Agent:
292
+ - Ruby
293
+ response:
294
+ status:
295
+ code: 200
296
+ message: OK
297
+ headers:
298
+ Cache-Control:
299
+ - no-cache
300
+ Content-Length:
301
+ - '1633'
302
+ Content-Type:
303
+ - application/atom+xml;type=feed;charset=utf-8
304
+ Server:
305
+ - Microsoft-IIS/7.5
306
+ Set-Cookie:
307
+ - ASP.NET_SessionId=t1uyr25xdhviiv0ai4id0ru5; path=/; HttpOnly
308
+ X-Content-Type-Options:
309
+ - nosniff
310
+ Dataserviceversion:
311
+ - 1.0;
312
+ X-Aspnet-Version:
313
+ - 4.0.30319
314
+ X-Powered-By:
315
+ - ASP.NET
316
+ Date:
317
+ - Tue, 07 Aug 2012 21:21:58 GMT
318
+ body:
319
+ encoding: US-ASCII
320
+ string: <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
321
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
322
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
323
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products</id><title
324
+ type="text">Products</title><updated>2012-08-07T21:21:59Z</updated><link rel="self"
325
+ title="Products" href="Products" /><entry><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
326
+ term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
327
+ /><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
328
+ type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
329
+ /><title /><updated>2012-08-07T21:21:59Z</updated><author><name /></author><content
330
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Widget
331
+ 0073</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">100.00</d:Price><d:DiscontinuedDate
332
+ m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
333
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:21:59.36</d:CreateDate><d:ModifiedDate
334
+ m:type="Edm.DateTime">2012-08-07T21:21:59.36</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry></feed>
335
+ http_version: !!null
336
+ recorded_at: Tue, 07 Aug 2012 21:21:59 GMT
337
+ recorded_with: VCR 2.2.4
@@ -0,0 +1,65 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Products
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: ! '{"Name":"Sample Product","Description":"Test Widget","Price":"10.25","Category":{"Name":"Category
9
+ 0001","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}'
10
+ headers:
11
+ Accept:
12
+ - ! '*/*; q=0.5, application/xml'
13
+ Accept-Encoding:
14
+ - gzip, deflate
15
+ Content-Type:
16
+ - application/json
17
+ Content-Length:
18
+ - '185'
19
+ User-Agent:
20
+ - Ruby
21
+ response:
22
+ status:
23
+ code: 201
24
+ message: Created
25
+ headers:
26
+ Cache-Control:
27
+ - no-cache
28
+ Content-Length:
29
+ - '1441'
30
+ Content-Type:
31
+ - application/atom+xml;type=entry;charset=utf-8
32
+ Location:
33
+ - http://win7dev:8989/SampleService/RubyOData.svc/Products(1)
34
+ Server:
35
+ - Microsoft-IIS/7.5
36
+ Set-Cookie:
37
+ - ASP.NET_SessionId=3gkn5afndwqci0z3nznzu0bm; path=/; HttpOnly
38
+ X-Content-Type-Options:
39
+ - nosniff
40
+ Dataserviceversion:
41
+ - 1.0;
42
+ X-Aspnet-Version:
43
+ - 4.0.30319
44
+ X-Powered-By:
45
+ - ASP.NET
46
+ Date:
47
+ - Tue, 07 Aug 2012 21:47:36 GMT
48
+ body:
49
+ encoding: US-ASCII
50
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
51
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
52
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
53
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
54
+ term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
55
+ /><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
56
+ type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
57
+ /><title /><updated>2012-08-07T21:47:37Z</updated><author><name /></author><content
58
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Sample
59
+ Product</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">10.25</d:Price><d:DiscontinuedDate
60
+ m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
61
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:47:37.171875Z</d:CreateDate><d:ModifiedDate
62
+ m:type="Edm.DateTime">2012-08-07T21:47:37.171875Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
63
+ http_version: !!null
64
+ recorded_at: Tue, 07 Aug 2012 21:47:37 GMT
65
+ recorded_with: VCR 2.2.4