ruby_odata 0.1.6 → 0.2.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +2 -0
- data/Guardfile +1 -1
- data/features/basic_auth.feature +13 -13
- data/features/cassettes/basic_auth_protected_resource.yml +22 -20
- data/features/cassettes/batch_request_additions.yml +26 -26
- data/features/cassettes/batch_request_deletes.yml +27 -27
- data/features/cassettes/batch_request_updates.yml +26 -26
- data/features/cassettes/clean_database_for_testing.yml +10 -10
- data/features/cassettes/cucumber_tags/basic_auth.yml +54 -163
- data/features/cassettes/cucumber_tags/batch_request.yml +229 -1118
- data/features/cassettes/cucumber_tags/complex_types.yml +81 -191
- data/features/cassettes/cucumber_tags/error_handling.yml +45 -33
- data/features/cassettes/cucumber_tags/query_builder.yml +555 -1248
- data/features/cassettes/cucumber_tags/service_manage.yml +216 -591
- data/features/cassettes/cucumber_tags/service_methods.yml +137 -412
- data/features/cassettes/cucumber_tags/ssl.yml +121 -117
- data/features/cassettes/cucumber_tags/type_conversion.yml +104 -170
- data/features/cassettes/service_manage_additions.yml +26 -28
- data/features/cassettes/service_manage_deletions.yml +21 -21
- data/features/cassettes/service_manage_deletions_2.yml +21 -21
- data/features/cassettes/unsecured_metadata.yml +14 -14
- data/features/service.feature +37 -37
- data/features/service_methods.feature +38 -38
- data/features/step_definitions/pickle_steps.rb +5 -5
- data/features/step_definitions/service_steps.rb +26 -26
- data/features/support/hooks.rb +3 -2
- data/features/support/vcr.rb +13 -13
- data/lib/ruby_odata.rb +4 -1
- data/lib/ruby_odata/association.rb +15 -8
- data/lib/ruby_odata/class_builder.rb +5 -1
- data/lib/ruby_odata/query_builder.rb +171 -173
- data/lib/ruby_odata/resource.rb +153 -0
- data/lib/ruby_odata/service.rb +30 -30
- data/lib/ruby_odata/version.rb +1 -1
- data/ruby_odata.gemspec +48 -43
- data/spec/association_spec.rb +15 -11
- data/spec/fixtures/decimal/metadata.xml +1 -0
- data/spec/fixtures/v4/edmx_metadata.xml +145 -0
- data/spec/fixtures/v4/result_categories.xml +0 -0
- data/spec/revised_service_spec.rb +16 -11
- data/spec/service_spec.rb +149 -114
- data/spec/service_v4_spec.rb +102 -0
- data/spec/spec_helper.rb +6 -1
- metadata +109 -32
- data/features/cassettes/cucumber_tags/service.yml +0 -234
@@ -1,234 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: http://win7dev:8989/SampleService/RubyOData.svc/Categories
|
6
|
-
body:
|
7
|
-
encoding: ASCII-8BIT
|
8
|
-
string: ! '{"Name":"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
|
-
- '64'
|
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
|
-
- '1249'
|
29
|
-
Content-Type:
|
30
|
-
- application/atom+xml;type=entry;charset=utf-8
|
31
|
-
Location:
|
32
|
-
- http://win7dev:8989/SampleService/RubyOData.svc/Categories(1)
|
33
|
-
Server:
|
34
|
-
- Microsoft-IIS/7.5
|
35
|
-
Set-Cookie:
|
36
|
-
- ASP.NET_SessionId=ga1wgtwnw3be1stztnho25m2; 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:48 GMT
|
47
|
-
body:
|
48
|
-
encoding: US-ASCII
|
49
|
-
string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/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>http://win7dev:8989/SampleService/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:48Z</updated><author><name /></author><content
|
57
|
-
type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Test
|
58
|
-
Category</d:Name><d:AuditFields m:type="RubyODataService.AuditFields"><d:CreateDate
|
59
|
-
m:type="Edm.DateTime">2012-08-07T21:21:48.5625Z</d:CreateDate><d:ModifiedDate
|
60
|
-
m:type="Edm.DateTime">2012-08-07T21:21:48.5625Z</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:48 GMT
|
63
|
-
- request:
|
64
|
-
method: get
|
65
|
-
uri: http://win7dev:8989/SampleService/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
|
-
- '1245'
|
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=gylpmoalyq35y504lhqo0bei; 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:48 GMT
|
101
|
-
body:
|
102
|
-
encoding: US-ASCII
|
103
|
-
string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/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>http://win7dev:8989/SampleService/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:48Z</updated><author><name /></author><content
|
111
|
-
type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Test
|
112
|
-
Category</d:Name><d:AuditFields m:type="RubyODataService.AuditFields"><d:CreateDate
|
113
|
-
m:type="Edm.DateTime">2012-08-07T21:21:48.563</d:CreateDate><d:ModifiedDate
|
114
|
-
m:type="Edm.DateTime">2012-08-07T21:21:48.563</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:48 GMT
|
117
|
-
- request:
|
118
|
-
method: post
|
119
|
-
uri: http://win7dev:8989/SampleService/RubyOData.svc/Products
|
120
|
-
body:
|
121
|
-
encoding: ASCII-8BIT
|
122
|
-
string: ! '{"Name":"Widget 0060","Description":"Test Widget","Price":"10.25","Category":{"Name":"Category
|
123
|
-
0062","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}'
|
124
|
-
headers:
|
125
|
-
Accept:
|
126
|
-
- ! '*/*; q=0.5, application/xml'
|
127
|
-
Accept-Encoding:
|
128
|
-
- gzip, deflate
|
129
|
-
Content-Type:
|
130
|
-
- application/json
|
131
|
-
Content-Length:
|
132
|
-
- '182'
|
133
|
-
User-Agent:
|
134
|
-
- Ruby
|
135
|
-
response:
|
136
|
-
status:
|
137
|
-
code: 201
|
138
|
-
message: Created
|
139
|
-
headers:
|
140
|
-
Cache-Control:
|
141
|
-
- no-cache
|
142
|
-
Content-Length:
|
143
|
-
- '1436'
|
144
|
-
Content-Type:
|
145
|
-
- application/atom+xml;type=entry;charset=utf-8
|
146
|
-
Location:
|
147
|
-
- http://win7dev:8989/SampleService/RubyOData.svc/Products(1)
|
148
|
-
Server:
|
149
|
-
- Microsoft-IIS/7.5
|
150
|
-
Set-Cookie:
|
151
|
-
- ASP.NET_SessionId=2h2ktex1otob3k3ccc2phazs; path=/; HttpOnly
|
152
|
-
X-Content-Type-Options:
|
153
|
-
- nosniff
|
154
|
-
Dataserviceversion:
|
155
|
-
- 1.0;
|
156
|
-
X-Aspnet-Version:
|
157
|
-
- 4.0.30319
|
158
|
-
X-Powered-By:
|
159
|
-
- ASP.NET
|
160
|
-
Date:
|
161
|
-
- Tue, 07 Aug 2012 21:21:48 GMT
|
162
|
-
body:
|
163
|
-
encoding: US-ASCII
|
164
|
-
string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
|
165
|
-
xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
|
166
|
-
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
|
167
|
-
xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
|
168
|
-
term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
|
169
|
-
/><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
|
170
|
-
type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
|
171
|
-
/><title /><updated>2012-08-07T21:21:48Z</updated><author><name /></author><content
|
172
|
-
type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Widget
|
173
|
-
0060</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">10.25</d:Price><d:DiscontinuedDate
|
174
|
-
m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
|
175
|
-
m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:21:48.96875Z</d:CreateDate><d:ModifiedDate
|
176
|
-
m:type="Edm.DateTime">2012-08-07T21:21:48.96875Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
|
177
|
-
http_version: !!null
|
178
|
-
recorded_at: Tue, 07 Aug 2012 21:21:49 GMT
|
179
|
-
- request:
|
180
|
-
method: get
|
181
|
-
uri: http://win7dev:8989/SampleService/RubyOData.svc/Products(1)
|
182
|
-
body:
|
183
|
-
encoding: US-ASCII
|
184
|
-
string: ''
|
185
|
-
headers:
|
186
|
-
Accept:
|
187
|
-
- ! '*/*; q=0.5, application/xml'
|
188
|
-
Accept-Encoding:
|
189
|
-
- gzip, deflate
|
190
|
-
User-Agent:
|
191
|
-
- Ruby
|
192
|
-
response:
|
193
|
-
status:
|
194
|
-
code: 200
|
195
|
-
message: OK
|
196
|
-
headers:
|
197
|
-
Cache-Control:
|
198
|
-
- no-cache
|
199
|
-
Content-Length:
|
200
|
-
- '1430'
|
201
|
-
Content-Type:
|
202
|
-
- application/atom+xml;type=entry;charset=utf-8
|
203
|
-
Server:
|
204
|
-
- Microsoft-IIS/7.5
|
205
|
-
Set-Cookie:
|
206
|
-
- ASP.NET_SessionId=nzeip31l14cdhu5tw5g5imsc; path=/; HttpOnly
|
207
|
-
X-Content-Type-Options:
|
208
|
-
- nosniff
|
209
|
-
Dataserviceversion:
|
210
|
-
- 1.0;
|
211
|
-
X-Aspnet-Version:
|
212
|
-
- 4.0.30319
|
213
|
-
X-Powered-By:
|
214
|
-
- ASP.NET
|
215
|
-
Date:
|
216
|
-
- Tue, 07 Aug 2012 21:21:48 GMT
|
217
|
-
body:
|
218
|
-
encoding: US-ASCII
|
219
|
-
string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
|
220
|
-
xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
|
221
|
-
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
|
222
|
-
xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
|
223
|
-
term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
|
224
|
-
/><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
|
225
|
-
type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
|
226
|
-
/><title /><updated>2012-08-07T21:21:49Z</updated><author><name /></author><content
|
227
|
-
type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Widget
|
228
|
-
0060</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">10.25</d:Price><d:DiscontinuedDate
|
229
|
-
m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
|
230
|
-
m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:21:48.967</d:CreateDate><d:ModifiedDate
|
231
|
-
m:type="Edm.DateTime">2012-08-07T21:21:48.967</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
|
232
|
-
http_version: !!null
|
233
|
-
recorded_at: Tue, 07 Aug 2012 21:21:49 GMT
|
234
|
-
recorded_with: VCR 2.2.4
|