rivendell-api 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rivendell/api/cart.rb +11 -0
- data/lib/rivendell/api/version.rb +1 -1
- data/lib/rivendell/api/xport.rb +7 -2
- data/rivendell-api.gemspec +1 -1
- data/spec/fixtures/rdxport_list_carts.xml +1248 -0
- data/spec/rivendell/api/xport_spec.rb +22 -0
- data/spec/spec_helper.rb +2 -0
- data/tasks/rdoc.rake +8 -1
- metadata +7 -5
@@ -94,4 +94,26 @@ describe Rivendell::API::Xport do
|
|
94
94
|
|
95
95
|
end
|
96
96
|
|
97
|
+
describe "list_carts" do
|
98
|
+
|
99
|
+
before(:each) do
|
100
|
+
FakeWeb.register_uri(:post, "http://localhost/rd-bin/rdxport.cgi", :body => fixture_content("rdxport_list_carts.xml"))
|
101
|
+
end
|
102
|
+
|
103
|
+
it "should use COMMAND 6" do
|
104
|
+
subject.list_carts
|
105
|
+
FakeWeb.last_request["COMMAND"] == "6"
|
106
|
+
end
|
107
|
+
|
108
|
+
it "should return Casts" do
|
109
|
+
subject.list_carts.map(&:title).should include("Rivendell 1", "Rivendell 2", "Rivendell 3")
|
110
|
+
end
|
111
|
+
|
112
|
+
it "should use group as group_name" do
|
113
|
+
subject.list_carts :group => "TEST"
|
114
|
+
FakeWeb.last_request["GROUP_NAME"] == "TEST"
|
115
|
+
end
|
116
|
+
|
117
|
+
end
|
118
|
+
|
97
119
|
end
|
data/spec/spec_helper.rb
CHANGED
data/tasks/rdoc.rake
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rivendell-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httmultiparty
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
31
|
+
name: activesupport
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
@@ -181,6 +181,7 @@ files:
|
|
181
181
|
- spec/fixtures/rdxport_add_cart.xml
|
182
182
|
- spec/fixtures/rdxport_add_cut.xml
|
183
183
|
- spec/fixtures/rdxport_import.xml
|
184
|
+
- spec/fixtures/rdxport_list_carts.xml
|
184
185
|
- spec/fixtures/rdxport_list_groups.xml
|
185
186
|
- spec/rivendell/api/xport_spec.rb
|
186
187
|
- spec/spec_helper.rb
|
@@ -201,7 +202,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
201
202
|
version: '0'
|
202
203
|
segments:
|
203
204
|
- 0
|
204
|
-
hash: -
|
205
|
+
hash: -4338672299131379254
|
205
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
207
|
none: false
|
207
208
|
requirements:
|
@@ -210,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
210
211
|
version: '0'
|
211
212
|
segments:
|
212
213
|
- 0
|
213
|
-
hash: -
|
214
|
+
hash: -4338672299131379254
|
214
215
|
requirements: []
|
215
216
|
rubyforge_project:
|
216
217
|
rubygems_version: 1.8.23
|
@@ -222,6 +223,7 @@ test_files:
|
|
222
223
|
- spec/fixtures/rdxport_add_cart.xml
|
223
224
|
- spec/fixtures/rdxport_add_cut.xml
|
224
225
|
- spec/fixtures/rdxport_import.xml
|
226
|
+
- spec/fixtures/rdxport_list_carts.xml
|
225
227
|
- spec/fixtures/rdxport_list_groups.xml
|
226
228
|
- spec/rivendell/api/xport_spec.rb
|
227
229
|
- spec/spec_helper.rb
|