ruby_odata 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +11 -8
- data/README.rdoc +6 -6
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/features/support/env.rb +1 -1
- data/lib/{odata_ruby.rb → ruby_odata.rb} +5 -5
- data/lib/{odata_ruby → ruby_odata}/class_builder.rb +0 -0
- data/lib/{odata_ruby → ruby_odata}/operation.rb +0 -0
- data/lib/{odata_ruby → ruby_odata}/query_builder.rb +0 -0
- data/lib/{odata_ruby → ruby_odata}/service.rb +0 -0
- data/ruby_odata.gemspec +6 -6
- metadata +8 -8
data/CHANGELOG.rdoc
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
= ruby_odata Change Log
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
=== 0.0.1
|
4
|
+
* Basic CRUD Operations
|
5
|
+
* Query: Filters
|
6
|
+
* Query: Expands
|
7
|
+
|
8
|
+
=== 0.0.2
|
9
|
+
* Query: Order By
|
10
|
+
|
11
|
+
=== 0.0.3
|
12
|
+
* Rearranged code to match the gem name. Things were mismatched between odata_ruby and ruby_odata.
|
13
|
+
|
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
=
|
1
|
+
= ruby_odata
|
2
2
|
|
3
|
-
The <b>Open Data Protocol</b> (OData) is a fantastic way to query and update data over standard Web technologies. The
|
3
|
+
The <b>Open Data Protocol</b> (OData) is a fantastic way to query and update data over standard Web technologies. The ruby_odata library acts as a consumer of OData services.
|
4
4
|
|
5
5
|
== Usage
|
6
6
|
The API is a work in progress. Notably, changes can't be bundled (through save_changes, only the last operation before save_changes is persisted).
|
@@ -8,7 +8,7 @@ The API is a work in progress. Notably, changes can't be bundled (through save_
|
|
8
8
|
=== Adding
|
9
9
|
When you point at a service, an AddTo<EntityName> method is created for you. This method takes in the new entity to create. To commit the change, you need to call the save_changes method on the service. To add a new category for example, you would simply do the following:
|
10
10
|
|
11
|
-
require 'lib/
|
11
|
+
require 'lib/ruby_odata'
|
12
12
|
|
13
13
|
svc = OData::Service.new "http://127.0.0.1:8888/SampleService/Entities.svc"
|
14
14
|
new_category = Category.new
|
@@ -20,7 +20,7 @@ When you point at a service, an AddTo<EntityName> method is created for you. Th
|
|
20
20
|
=== Updating
|
21
21
|
To update an object, simply pass the modified object to the update_object method on the service. Updating, like adding requires you to call save_changes in order to persist the change. For example:
|
22
22
|
|
23
|
-
require 'lib/
|
23
|
+
require 'lib/ruby_odata'
|
24
24
|
|
25
25
|
svc = OData::Service.new "http://127.0.0.1:8888/SampleService/Entities.svc"
|
26
26
|
new_category = Category.new
|
@@ -37,7 +37,7 @@ To update an object, simply pass the modified object to the update_object method
|
|
37
37
|
=== Deleting
|
38
38
|
Deleting an object involves passing the tracked object to the delete_object method on the service. Deleting is another function that involves the save_changes method (to commit the change back to the server). In this example, we'll add a category and then delete it.
|
39
39
|
|
40
|
-
require 'lib/
|
40
|
+
require 'lib/ruby_odata'
|
41
41
|
|
42
42
|
svc = OData::Service.new "http://127.0.0.1:8888/SampleService/Entities.svc"
|
43
43
|
new_category = Category.new
|
@@ -53,7 +53,7 @@ Deleting an object involves passing the tracked object to the delete_object meth
|
|
53
53
|
=== Querying
|
54
54
|
Querying is easy, for example to pull all the categories from the SampleService, you simply can run:
|
55
55
|
|
56
|
-
require 'lib/
|
56
|
+
require 'lib/ruby_odata'
|
57
57
|
|
58
58
|
svc = OData::Service.new "http://127.0.0.1:8888/SampleService/Entities.svc"
|
59
59
|
svc.Categories
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/features/support/env.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
lib = File.dirname(__FILE__)
|
2
|
-
$: << lib + '/
|
2
|
+
$: << lib + '/ruby_odata/'
|
3
3
|
|
4
4
|
require 'rubygems'
|
5
5
|
require 'active_support' # Used for serializtion to JSON
|
@@ -9,7 +9,7 @@ require 'open-uri'
|
|
9
9
|
require 'rest_client'
|
10
10
|
require 'nokogiri'
|
11
11
|
|
12
|
-
require lib + '/
|
13
|
-
require lib + '/
|
14
|
-
require lib + '/
|
15
|
-
require lib + '/
|
12
|
+
require lib + '/ruby_odata/query_builder'
|
13
|
+
require lib + '/ruby_odata/class_builder'
|
14
|
+
require lib + '/ruby_odata/operation'
|
15
|
+
require lib + '/ruby_odata/service'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/ruby_odata.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ruby_odata}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Damien White"]
|
@@ -31,11 +31,11 @@ Gem::Specification.new do |s|
|
|
31
31
|
"features/step_definitions/service_steps.rb",
|
32
32
|
"features/support/env.rb",
|
33
33
|
"features/support/hooks.rb",
|
34
|
-
"lib/
|
35
|
-
"lib/
|
36
|
-
"lib/
|
37
|
-
"lib/
|
38
|
-
"lib/
|
34
|
+
"lib/ruby_odata.rb",
|
35
|
+
"lib/ruby_odata/class_builder.rb",
|
36
|
+
"lib/ruby_odata/operation.rb",
|
37
|
+
"lib/ruby_odata/query_builder.rb",
|
38
|
+
"lib/ruby_odata/service.rb",
|
39
39
|
"ruby_odata.gemspec",
|
40
40
|
"test/Cassini x64.bat",
|
41
41
|
"test/Cassini x86.bat",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_odata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Damien White
|
@@ -90,11 +90,11 @@ files:
|
|
90
90
|
- features/step_definitions/service_steps.rb
|
91
91
|
- features/support/env.rb
|
92
92
|
- features/support/hooks.rb
|
93
|
-
- lib/
|
94
|
-
- lib/
|
95
|
-
- lib/
|
96
|
-
- lib/
|
97
|
-
- lib/
|
93
|
+
- lib/ruby_odata.rb
|
94
|
+
- lib/ruby_odata/class_builder.rb
|
95
|
+
- lib/ruby_odata/operation.rb
|
96
|
+
- lib/ruby_odata/query_builder.rb
|
97
|
+
- lib/ruby_odata/service.rb
|
98
98
|
- ruby_odata.gemspec
|
99
99
|
- test/Cassini x64.bat
|
100
100
|
- test/Cassini x86.bat
|