nakamura 0.8 → 0.9
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/lib/nakamura/test.rb +13 -6
- metadata +10 -5
data/lib/nakamura/test.rb
CHANGED
@@ -91,20 +91,27 @@ module SlingTest
|
|
91
91
|
|
92
92
|
def wait_for_indexer()
|
93
93
|
magic_content = "#{uniqueness()}_#{rand(1000).to_s}"
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
94
|
+
path = "~admin/private/wait_for_indexer_#{magic_content}"
|
95
|
+
urlpath = @s.url_for(path)
|
96
|
+
res = @s.execute_post(urlpath, {
|
97
|
+
"sling:resourceType" => "sakai/widget-data",
|
98
|
+
"sakai:indexed-fields" => "foo",
|
99
|
+
"foo" => magic_content
|
100
|
+
})
|
101
|
+
assert(res.code.to_i >= 200 && res.code.to_i < 300, "Expected to be able to create node #{res.body}")
|
99
102
|
# Give the indexer up to 20 seconds to catch up, but stop waiting early if
|
100
103
|
# we find our test item has landed in the index.
|
101
104
|
20.times do
|
102
|
-
res = @s.execute_get(@s.url_for("/var/search/
|
105
|
+
res = @s.execute_get(@s.url_for("/var/search/pool/all.json?q=#{magic_content}"))
|
103
106
|
if JSON.parse(res.body)["total"] != 0
|
104
107
|
break
|
105
108
|
end
|
106
109
|
sleep(1)
|
107
110
|
end
|
111
|
+
res = @s.execute_post(urlpath, {
|
112
|
+
":operation" => "delete"
|
113
|
+
})
|
114
|
+
assert(res.code.to_i >= 200 && res.code.to_i < 300, "Expected to be able to delete node #{res.body}")
|
108
115
|
end
|
109
116
|
|
110
117
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nakamura
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.9'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,12 @@ dependencies:
|
|
21
21
|
version: 1.6.3
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.6.3
|
25
30
|
description: Ruby library for interacting with Sakai Nakamura. Provides convenience
|
26
31
|
methods for adding users and groups and other similar tasks.
|
27
32
|
email: oae-dev@collab.sakaiproject.org
|
@@ -60,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
65
|
requirements:
|
61
66
|
- none
|
62
67
|
rubyforge_project:
|
63
|
-
rubygems_version: 1.8.
|
68
|
+
rubygems_version: 1.8.21
|
64
69
|
signing_key:
|
65
70
|
specification_version: 3
|
66
71
|
summary: Ruby library for interacting with Sakai Nakamura.
|