cpee-resources 1.0.3 → 1.0.5
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.
- checksums.yaml +4 -4
- data/cpee-resources.gemspec +1 -1
- data/lib/cpee-resources/implementation.rb +221 -37
- data/lib/cpee-resources/implementation.xml +85 -14
- data/server/resources +7 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c779e7c093de8fd15fc052eb3ffc79022eb27184dd6efe13a7b5176c87be9f41
|
|
4
|
+
data.tar.gz: ce0020d0765e0453d72be9159ddbe85cc049ea296849e2900165fad7315d0b48
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2a5c8e568f3106b06e867dcd1cdac805e945bae4d18a5b7866734cc8f62de856a93f10e39f9c86e2c4486533f8e44635785cc33c240db26254d3a12f75ec53c1
|
|
7
|
+
data.tar.gz: 183855b2718a0c60bb2a7e36bf565e26c011496578b4e2eb6040bb03cb37d228f8c809b94c786dd06da6e228b87c1ea5635adfe9e94451c7404e3f95dd6eed7f
|
data/cpee-resources.gemspec
CHANGED
|
@@ -16,60 +16,183 @@
|
|
|
16
16
|
# along with CPEE-RESOURCES (file LICENSE in the main directory). If not, see
|
|
17
17
|
# <http://www.gnu.org/licenses/>.
|
|
18
18
|
|
|
19
|
-
require '
|
|
19
|
+
require 'json'
|
|
20
|
+
require 'fileutils'
|
|
20
21
|
require 'riddl/server'
|
|
21
22
|
|
|
22
23
|
module CPEE
|
|
23
24
|
module Resources
|
|
24
25
|
|
|
25
26
|
SERVER = File.expand_path(File.join(__dir__,'implementation.xml'))
|
|
27
|
+
NOT_FOUND = 'Existence really is an imperfect tense that never becomes a present. (Friedrich Nietzsche)'
|
|
26
28
|
|
|
27
|
-
class
|
|
29
|
+
class DoFile < Riddl::Implementation #{{{
|
|
28
30
|
def response
|
|
29
31
|
data = @a[1]
|
|
30
|
-
|
|
31
|
-
if
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
file = File.join(data,@a[0],*(@r[@a[2]].map{|e| Riddl::Protocols::Utils::escape(e)}))
|
|
33
|
+
if File.exist?(file)
|
|
34
|
+
Riddl::Parameter::Complex.new(@a[3],@a[4],File.read(file))
|
|
35
|
+
else
|
|
36
|
+
@status = 404
|
|
37
|
+
Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end #}}}
|
|
41
|
+
class DoPutFile < Riddl::Implementation #{{{
|
|
42
|
+
def response
|
|
43
|
+
data = @a[1]
|
|
44
|
+
name = @r[-1]
|
|
45
|
+
file = File.join(data,@a[0],Riddl::Protocols::Utils::escape(name))
|
|
46
|
+
File.open(file,'wb') do |f|
|
|
47
|
+
IO.copy_stream(@p[0].value,f)
|
|
48
|
+
end
|
|
49
|
+
nil
|
|
50
|
+
end
|
|
51
|
+
end #}}}
|
|
52
|
+
class DoPutDescription < Riddl::Implementation #{{{
|
|
53
|
+
def response
|
|
54
|
+
data = @a[1]
|
|
55
|
+
dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@r[-3]))
|
|
56
|
+
unless Dir.exist?(dir)
|
|
57
|
+
@status = 404
|
|
58
|
+
return Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
|
|
59
|
+
end
|
|
60
|
+
ddir = File.join(dir,'descriptions')
|
|
61
|
+
Dir.mkdir(ddir) unless Dir.exist?(ddir)
|
|
62
|
+
File.open(File.join(ddir,@r[-1]),'wb') do |f|
|
|
63
|
+
IO.copy_stream(@p[0].value,f)
|
|
64
|
+
end
|
|
65
|
+
nil
|
|
66
|
+
end
|
|
67
|
+
end #}}}
|
|
68
|
+
class DoPutEndpointFile < Riddl::Implementation #{{{
|
|
69
|
+
def response
|
|
70
|
+
data = @a[1]
|
|
71
|
+
dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@r[-2]))
|
|
72
|
+
file = File.join(dir,@r[-1])
|
|
73
|
+
unless Dir.exist?(dir)
|
|
74
|
+
@status = 404
|
|
75
|
+
return Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
|
|
76
|
+
end
|
|
77
|
+
if @p[0].name == 'name'
|
|
78
|
+
target = File.join('..','..',@a[2],@p[0].value)
|
|
79
|
+
unless File.exist?(File.join(dir,target))
|
|
80
|
+
@status = 404
|
|
81
|
+
return Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
|
|
38
82
|
end
|
|
83
|
+
File.unlink(file) if File.symlink?(file) || File.exist?(file)
|
|
84
|
+
File.symlink(target,file)
|
|
85
|
+
else
|
|
86
|
+
File.unlink(file) if File.symlink?(file)
|
|
87
|
+
File.open(file,'wb') do |f|
|
|
88
|
+
IO.copy_stream(@p[0].value,f)
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
nil
|
|
92
|
+
end
|
|
93
|
+
end #}}}
|
|
94
|
+
class DoDeleteFile < Riddl::Implementation #{{{
|
|
95
|
+
def response
|
|
96
|
+
data = @a[1]
|
|
97
|
+
file = File.join(data,@a[0],*(@r[@a[2]].map{|e| Riddl::Protocols::Utils::escape(e)}))
|
|
98
|
+
if File.exist?(file) || File.symlink?(file)
|
|
99
|
+
File.delete(file)
|
|
100
|
+
nil
|
|
39
101
|
else
|
|
40
102
|
@status = 404
|
|
41
|
-
Riddl::Parameter::Complex.new('exists','text/plain',
|
|
103
|
+
Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
|
|
42
104
|
end
|
|
43
105
|
end
|
|
44
106
|
end #}}}
|
|
45
|
-
class
|
|
107
|
+
class DoProperties < Riddl::Implementation #{{{
|
|
46
108
|
def response
|
|
47
109
|
data = @a[1]
|
|
48
|
-
dir = File.join(data
|
|
110
|
+
dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@r[-2]))
|
|
111
|
+
file = File.join(dir,'properties.json')
|
|
49
112
|
if Dir.exist?(dir)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
doc.root.add('condition','condition.json') if File.exist?(File.join(dir,'condition.json'))
|
|
55
|
-
doc.root.add('ui','ui.rng') if File.exist?(File.join(dir,'ui.rng'))
|
|
56
|
-
doc.to_s
|
|
57
|
-
end
|
|
113
|
+
props = File.exist?(file) ? JSON.parse(File.read(file)) : {}
|
|
114
|
+
props['global-schema'] = File.symlink?(File.join(dir,'schema.rng'))
|
|
115
|
+
props['global-symbol'] = File.symlink?(File.join(dir,'symbol.svg'))
|
|
116
|
+
Riddl::Parameter::Complex.new('json','application/json',JSON.generate(props))
|
|
58
117
|
else
|
|
59
118
|
@status = 404
|
|
60
|
-
Riddl::Parameter::Complex.new('exists','text/plain',
|
|
119
|
+
Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
|
|
61
120
|
end
|
|
62
121
|
end
|
|
63
122
|
end #}}}
|
|
64
|
-
class
|
|
123
|
+
class DoGetProperty < Riddl::Implementation #{{{
|
|
65
124
|
def response
|
|
66
125
|
data = @a[1]
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
126
|
+
dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@r[-3]))
|
|
127
|
+
file = File.join(dir,'properties.json')
|
|
128
|
+
key = @r[-1]
|
|
129
|
+
props = File.exist?(file) ? JSON.parse(File.read(file)) : {}
|
|
130
|
+
props['global-schema'] = File.symlink?(File.join(dir,'schema.rng'))
|
|
131
|
+
props['global-symbol'] = File.symlink?(File.join(dir,'symbol.svg'))
|
|
132
|
+
if Dir.exist?(dir) && props.key?(key)
|
|
133
|
+
Riddl::Parameter::Complex.new('value','text/plain',props[key].to_s)
|
|
70
134
|
else
|
|
71
135
|
@status = 404
|
|
72
|
-
Riddl::Parameter::Complex.new('exists','text/plain',
|
|
136
|
+
Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end #}}}
|
|
140
|
+
class DoPutProperty < Riddl::Implementation #{{{
|
|
141
|
+
def response
|
|
142
|
+
data = @a[1]
|
|
143
|
+
dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@r[-3]))
|
|
144
|
+
file = File.join(dir,'properties.json')
|
|
145
|
+
key = @r[-1]
|
|
146
|
+
unless Dir.exist?(dir)
|
|
147
|
+
@status = 404
|
|
148
|
+
return Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
|
|
149
|
+
end
|
|
150
|
+
props = File.exist?(file) && !File.read(file).strip.empty? ? JSON.parse(File.read(file)) : {}
|
|
151
|
+
props[key] = @p[0].value
|
|
152
|
+
File.write(file,JSON.pretty_generate(props))
|
|
153
|
+
nil
|
|
154
|
+
end
|
|
155
|
+
end #}}}
|
|
156
|
+
class DoDeleteProperty < Riddl::Implementation #{{{
|
|
157
|
+
def response
|
|
158
|
+
data = @a[1]
|
|
159
|
+
dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@r[-3]))
|
|
160
|
+
file = File.join(dir,'properties.json')
|
|
161
|
+
key = @r[-1]
|
|
162
|
+
props = File.exist?(file) ? JSON.parse(File.read(file)) : {}
|
|
163
|
+
if props.key?(key)
|
|
164
|
+
props.delete(key)
|
|
165
|
+
File.write(file,JSON.pretty_generate(props))
|
|
166
|
+
nil
|
|
167
|
+
else
|
|
168
|
+
@status = 404
|
|
169
|
+
Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
end #}}}
|
|
173
|
+
class DoNewEndpoint < Riddl::Implementation #{{{
|
|
174
|
+
def response
|
|
175
|
+
data = @a[1]
|
|
176
|
+
dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@p[0].value))
|
|
177
|
+
Dir.mkdir(dir)
|
|
178
|
+
File.write(File.join(dir,'properties.json'),'{}')
|
|
179
|
+
@status = 201
|
|
180
|
+
nil
|
|
181
|
+
rescue Errno::EEXIST
|
|
182
|
+
@status = 409
|
|
183
|
+
Riddl::Parameter::Complex.new('exists','text/plain','Endpoint already exists.')
|
|
184
|
+
end
|
|
185
|
+
end #}}}
|
|
186
|
+
class DoDeleteEndpoint < Riddl::Implementation #{{{
|
|
187
|
+
def response
|
|
188
|
+
data = @a[1]
|
|
189
|
+
dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@r[-1]))
|
|
190
|
+
if Dir.exist?(dir)
|
|
191
|
+
FileUtils.rm_r(dir)
|
|
192
|
+
nil
|
|
193
|
+
else
|
|
194
|
+
@status = 404
|
|
195
|
+
Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
|
|
73
196
|
end
|
|
74
197
|
end
|
|
75
198
|
end #}}}
|
|
@@ -78,21 +201,36 @@ module CPEE
|
|
|
78
201
|
data = @a[1]
|
|
79
202
|
@a[2] ||= 0...0
|
|
80
203
|
dir = File.join(data,@a[0],*(@r[@a[2]].map{|e| Riddl::Protocols::Utils::escape(e)}))
|
|
204
|
+
if @a[3] && !Dir.exist?(dir)
|
|
205
|
+
@status = 404
|
|
206
|
+
return Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
|
|
207
|
+
end
|
|
81
208
|
return Riddl::Parameter::Complex.new('list','text/xml') do
|
|
82
209
|
doc = XML::Smart::string('<resources/>')
|
|
83
|
-
Dir.glob(File.join(dir,'*')).
|
|
84
|
-
|
|
210
|
+
names = Dir.glob(File.join(dir,'*')).map{ |f| File.basename(f) } | (@a[5] || [])
|
|
211
|
+
names.sort.each do |n|
|
|
212
|
+
next if @a[4] && !@a[4].include?(n)
|
|
213
|
+
doc.root.add('resource',n)
|
|
85
214
|
end
|
|
86
215
|
doc.to_s
|
|
87
216
|
end
|
|
88
217
|
end
|
|
89
218
|
end #}}}
|
|
90
|
-
|
|
91
|
-
class DoFile < Riddl::Implementation #{{{
|
|
219
|
+
class DoDescList < Riddl::Implementation #{{{
|
|
92
220
|
def response
|
|
93
221
|
data = @a[1]
|
|
94
|
-
|
|
95
|
-
File.
|
|
222
|
+
@a[2] ||= 0...0
|
|
223
|
+
dir = File.join(data,@a[0],*(@r[@a[2]].map{|e| Riddl::Protocols::Utils::escape(e)}))
|
|
224
|
+
return Riddl::Parameter::Complex.new('list','text/xml') do
|
|
225
|
+
doc = XML::Smart::string('<resources/>')
|
|
226
|
+
Dir.glob(File.join(dir,'*','descriptions')).each do |f|
|
|
227
|
+
n = doc.root.add('resource', 'endpoint' => File.basename(File.dirname(f)))
|
|
228
|
+
n.add('endpoint', File.read(File.join(f,'endpoint.md'))) if File.exist?(File.join(f,'endpoint.md'))
|
|
229
|
+
n.add('functionality', File.read(File.join(f,'functionality.md'))) if File.exist?(File.join(f,'functionality.md'))
|
|
230
|
+
n.add('output', File.read(File.join(f,'output.md'))) if File.exist?(File.join(f,'output.md'))
|
|
231
|
+
end
|
|
232
|
+
doc.to_s
|
|
233
|
+
end
|
|
96
234
|
end
|
|
97
235
|
end #}}}
|
|
98
236
|
|
|
@@ -101,12 +239,13 @@ module CPEE
|
|
|
101
239
|
|
|
102
240
|
Proc.new do
|
|
103
241
|
on resource do
|
|
242
|
+
run DoList, '', opts[:data_dir] if get
|
|
104
243
|
on resource 'modifiers' do
|
|
105
244
|
run DoList, 'modifiers', opts[:data_dir] if get
|
|
106
245
|
on resource do
|
|
107
246
|
run DoList, 'modifiers', opts[:data_dir], (-1..-1) if get
|
|
108
247
|
on resource do
|
|
109
|
-
run
|
|
248
|
+
run DoList, 'modifiers', opts[:data_dir], (-2..-1), true, %w{patch.xml unpatch.xml condition.json ui.rng} if get
|
|
110
249
|
on resource 'patch.xml' do
|
|
111
250
|
run DoFile, 'modifiers', opts[:data_dir], (-3..-1), 'testset', 'text/xml' if get
|
|
112
251
|
end
|
|
@@ -122,19 +261,64 @@ module CPEE
|
|
|
122
261
|
end
|
|
123
262
|
end
|
|
124
263
|
end
|
|
264
|
+
on resource 'symbols' do
|
|
265
|
+
run DoList, 'symbols', opts[:data_dir] if get
|
|
266
|
+
on resource '[a-z][a-zA-Z0-9_-]*\.svg' do
|
|
267
|
+
run DoFile, 'symbols', opts[:data_dir], (-1..-1), 'svg', 'image/svg+xml' if get
|
|
268
|
+
run DoPutFile, 'symbols', opts[:data_dir] if put 'symbol'
|
|
269
|
+
run DoDeleteFile, 'symbols', opts[:data_dir], (-1..-1) if delete
|
|
270
|
+
end
|
|
271
|
+
end
|
|
272
|
+
on resource 'schemas' do
|
|
273
|
+
run DoList, 'schemas', opts[:data_dir] if get
|
|
274
|
+
on resource '[a-z][a-zA-Z0-9_-]*\.rng' do
|
|
275
|
+
run DoFile, 'schemas', opts[:data_dir], (-1..-1), 'rng', 'text/xml' if get
|
|
276
|
+
run DoPutFile, 'schemas', opts[:data_dir] if put 'schema'
|
|
277
|
+
run DoDeleteFile, 'schemas', opts[:data_dir], (-1..-1) if delete
|
|
278
|
+
end
|
|
279
|
+
end
|
|
125
280
|
on resource 'endpoints' do
|
|
281
|
+
run DoDescList, 'endpoints', opts[:data_dir] if get 'dfilter'
|
|
126
282
|
run DoList, 'endpoints', opts[:data_dir] if get
|
|
283
|
+
run DoNewEndpoint, 'endpoints', opts[:data_dir] if post 'endpoint'
|
|
127
284
|
on resource do
|
|
128
|
-
run
|
|
285
|
+
run DoList, 'endpoints', opts[:data_dir], (-1..-1), true, %w{schema.rng symbol.svg properties.json descriptions}, %w{properties.json} if get
|
|
286
|
+
run DoDeleteEndpoint, 'endpoints', opts[:data_dir] if delete
|
|
129
287
|
on resource 'symbol.svg' do
|
|
130
288
|
run DoFile, 'endpoints', opts[:data_dir], (-2..-1), 'svg', 'image/svg+xml' if get
|
|
289
|
+
run DoPutEndpointFile, 'endpoints', opts[:data_dir], 'symbols' if put 'endpoint-symbol'
|
|
290
|
+
run DoDeleteFile, 'endpoints', opts[:data_dir], (-2..-1) if delete
|
|
131
291
|
end
|
|
132
292
|
on resource 'schema.rng' do
|
|
133
293
|
run DoFile, 'endpoints', opts[:data_dir], (-2..-1), 'rng', 'text/xml' if get
|
|
134
|
-
run
|
|
294
|
+
run DoPutEndpointFile, 'endpoints', opts[:data_dir], 'schemas' if put 'endpoint-schema'
|
|
295
|
+
run DoDeleteFile, 'endpoints', opts[:data_dir], (-2..-1) if delete
|
|
135
296
|
end
|
|
136
297
|
on resource 'properties.json' do
|
|
137
|
-
run
|
|
298
|
+
run DoProperties, 'endpoints', opts[:data_dir] if get
|
|
299
|
+
on resource do
|
|
300
|
+
run DoGetProperty, 'endpoints', opts[:data_dir] if get
|
|
301
|
+
run DoPutProperty, 'endpoints', opts[:data_dir] if put 'property'
|
|
302
|
+
run DoDeleteProperty, 'endpoints', opts[:data_dir] if delete
|
|
303
|
+
end
|
|
304
|
+
end
|
|
305
|
+
on resource 'descriptions' do
|
|
306
|
+
run DoList, 'endpoints', opts[:data_dir], (-2..-1), true, %w{functionality.md output.md endpoint.md} if get
|
|
307
|
+
on resource 'functionality.md' do
|
|
308
|
+
run DoFile, 'endpoints', opts[:data_dir], (-3..-1), 'markdown', 'text/markdown' if get
|
|
309
|
+
run DoPutDescription, 'endpoints', opts[:data_dir] if put 'description-file'
|
|
310
|
+
run DoDeleteFile, 'endpoints', opts[:data_dir], (-3..-1) if delete
|
|
311
|
+
end
|
|
312
|
+
on resource 'output.md' do
|
|
313
|
+
run DoFile, 'endpoints', opts[:data_dir], (-3..-1), 'markdown', 'text/markdown' if get
|
|
314
|
+
run DoPutDescription, 'endpoints', opts[:data_dir] if put 'description-file'
|
|
315
|
+
run DoDeleteFile, 'endpoints', opts[:data_dir], (-3..-1) if delete
|
|
316
|
+
end
|
|
317
|
+
on resource 'endpoint.md' do
|
|
318
|
+
run DoFile, 'endpoints', opts[:data_dir], (-3..-1), 'markdown', 'text/markdown' if get
|
|
319
|
+
run DoPutDescription, 'endpoints', opts[:data_dir] if put 'description-file'
|
|
320
|
+
run DoDeleteFile, 'endpoints', opts[:data_dir], (-3..-1) if delete
|
|
321
|
+
end
|
|
138
322
|
end
|
|
139
323
|
end
|
|
140
324
|
end
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
-->
|
|
18
18
|
|
|
19
19
|
<description xmlns="http://riddl.org/ns/description/1.0" xmlns:ann="http://riddl.org/ns/annotation/1.0" xmlns:xi="http://www.w3.org/2001/XInclude" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
20
|
+
<message name="dfilter">
|
|
21
|
+
<parameter name="description" type="string"/>
|
|
22
|
+
</message>
|
|
20
23
|
<message name="list">
|
|
21
24
|
<parameter name="list" mimetype="*/xml"/>
|
|
22
25
|
</message>
|
|
23
|
-
<message name="
|
|
24
|
-
<
|
|
25
|
-
<parameter name="exists" mimetype="*/xml"/>
|
|
26
|
-
<parameter name="exists" mimetype="text/plain"/>
|
|
27
|
-
</choice>
|
|
26
|
+
<message name="endpoint">
|
|
27
|
+
<parameter name="name" type="string"/>
|
|
28
28
|
</message>
|
|
29
29
|
<message name="testset">
|
|
30
30
|
<choice>
|
|
@@ -33,15 +33,25 @@
|
|
|
33
33
|
</choice>
|
|
34
34
|
</message>
|
|
35
35
|
<message name="symbol">
|
|
36
|
+
<parameter name="*" mimetype="image/svg+xml"/>
|
|
37
|
+
</message>
|
|
38
|
+
<message name="schema">
|
|
39
|
+
<parameter name="*" mimetype="*/xml"/>
|
|
40
|
+
</message>
|
|
41
|
+
<message name="endpoint-symbol">
|
|
36
42
|
<choice>
|
|
37
|
-
<parameter name="
|
|
38
|
-
<parameter name="
|
|
43
|
+
<parameter name="file" mimetype="image/svg+xml"/>
|
|
44
|
+
<parameter name="name" type="string">
|
|
45
|
+
<param name="pattern">[a-z][a-zA-Z0-9_-]*\.svg</param>
|
|
46
|
+
</parameter>
|
|
39
47
|
</choice>
|
|
40
48
|
</message>
|
|
41
|
-
<message name="schema">
|
|
49
|
+
<message name="endpoint-schema">
|
|
42
50
|
<choice>
|
|
43
|
-
<parameter name="
|
|
44
|
-
<parameter name="
|
|
51
|
+
<parameter name="file" mimetype="*/xml"/>
|
|
52
|
+
<parameter name="name" type="string">
|
|
53
|
+
<param name="pattern">[a-z][a-zA-Z0-9_-]*\.rng</param>
|
|
54
|
+
</parameter>
|
|
45
55
|
</choice>
|
|
46
56
|
</message>
|
|
47
57
|
<message name="json">
|
|
@@ -50,14 +60,30 @@
|
|
|
50
60
|
<parameter name="exists" mimetype="text/plain"/>
|
|
51
61
|
</choice>
|
|
52
62
|
</message>
|
|
63
|
+
<message name="property">
|
|
64
|
+
<parameter name="value" type="string"/>
|
|
65
|
+
</message>
|
|
66
|
+
<message name="property-value">
|
|
67
|
+
<parameter name="value" mimetype="text/plain"/>
|
|
68
|
+
</message>
|
|
69
|
+
<message name="markdown">
|
|
70
|
+
<choice>
|
|
71
|
+
<parameter name="markdown" mimetype="text/markdown"/>
|
|
72
|
+
<parameter name="exists" mimetype="text/plain"/>
|
|
73
|
+
</choice>
|
|
74
|
+
</message>
|
|
75
|
+
<message name="description-file">
|
|
76
|
+
<parameter name="*" mimetype="text/markdown"/>
|
|
77
|
+
</message>
|
|
53
78
|
|
|
54
79
|
<resource>
|
|
80
|
+
<get out="list"/>
|
|
55
81
|
<resource relative='modifiers'> <!--{{{-->
|
|
56
82
|
<get out="list"/>
|
|
57
83
|
<resource>
|
|
58
84
|
<get out="list"/>
|
|
59
85
|
<resource>
|
|
60
|
-
<get out="
|
|
86
|
+
<get out="list"/>
|
|
61
87
|
<resource relative="patch.xml">
|
|
62
88
|
<get out="testset"/>
|
|
63
89
|
</resource>
|
|
@@ -73,19 +99,64 @@
|
|
|
73
99
|
</resource>
|
|
74
100
|
</resource>
|
|
75
101
|
</resource> <!--}}}-->
|
|
76
|
-
<resource relative='
|
|
102
|
+
<resource relative='symbols'>
|
|
103
|
+
<get out="list"/>
|
|
104
|
+
<resource relative="[a-z][a-zA-Z0-9_-]*\.svg">
|
|
105
|
+
<get out="symbol"/>
|
|
106
|
+
<put in="symbol"/>
|
|
107
|
+
<delete/>
|
|
108
|
+
</resource>
|
|
109
|
+
</resource>
|
|
110
|
+
<resource relative='schemas'>
|
|
77
111
|
<get out="list"/>
|
|
112
|
+
<resource relative="[a-z][a-zA-Z0-9_-]*\.rng">
|
|
113
|
+
<get out="schema"/>
|
|
114
|
+
<put in="schema"/>
|
|
115
|
+
<delete/>
|
|
116
|
+
</resource>
|
|
117
|
+
</resource>
|
|
118
|
+
<resource relative='endpoints'>
|
|
119
|
+
<get in="dfilter" out="list"/>
|
|
120
|
+
<get in="*" out="list"/>
|
|
121
|
+
<post in="endpoint"/>
|
|
78
122
|
<resource>
|
|
79
|
-
<get out="
|
|
123
|
+
<get out="list"/>
|
|
124
|
+
<delete/>
|
|
80
125
|
<resource relative="symbol.svg">
|
|
81
126
|
<get out="symbol"/>
|
|
127
|
+
<put in="endpoint-symbol"/>
|
|
128
|
+
<delete/>
|
|
82
129
|
</resource>
|
|
83
130
|
<resource relative="schema.rng">
|
|
84
131
|
<get out="schema"/>
|
|
85
|
-
<put in="schema"/>
|
|
132
|
+
<put in="endpoint-schema"/>
|
|
133
|
+
<delete/>
|
|
86
134
|
</resource>
|
|
87
135
|
<resource relative="properties.json">
|
|
88
136
|
<get out="json"/>
|
|
137
|
+
<resource>
|
|
138
|
+
<get out="property-value"/>
|
|
139
|
+
<put in="property"/>
|
|
140
|
+
<delete/>
|
|
141
|
+
</resource>
|
|
142
|
+
</resource>
|
|
143
|
+
<resource relative="descriptions">
|
|
144
|
+
<get out="list"/>
|
|
145
|
+
<resource relative="functionality.md">
|
|
146
|
+
<get out="markdown"/>
|
|
147
|
+
<put in="description-file"/>
|
|
148
|
+
<delete/>
|
|
149
|
+
</resource>
|
|
150
|
+
<resource relative="output.md">
|
|
151
|
+
<get out="markdown"/>
|
|
152
|
+
<put in="description-file"/>
|
|
153
|
+
<delete/>
|
|
154
|
+
</resource>
|
|
155
|
+
<resource relative="endpoint.md">
|
|
156
|
+
<get out="markdown"/>
|
|
157
|
+
<put in="description-file"/>
|
|
158
|
+
<delete/>
|
|
159
|
+
</resource>
|
|
89
160
|
</resource>
|
|
90
161
|
</resource>
|
|
91
162
|
</resource>
|
data/server/resources
CHANGED
|
@@ -16,8 +16,13 @@
|
|
|
16
16
|
# along with CPEE-RESOURCES (file LICENSE in the main directory). If not, see
|
|
17
17
|
# <http://www.gnu.org/licenses/>.
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
if File.exist?(File.join(__dir__,'..','lib','cpee-resources','implementation.rb'))
|
|
20
|
+
require_relative File.join(__dir__,'..','lib','cpee-resources','implementation')
|
|
21
|
+
elsif File.exist?(File.join(Dir.home,'Projects','cpee-resources','lib','cpee-resources','implementation.rb'))
|
|
22
|
+
require_relative File.join(Dir.home, 'Projects','cpee-resources','lib','cpee-resources','implementation')
|
|
23
|
+
else
|
|
24
|
+
require 'cpee-resources/implementation'
|
|
25
|
+
end
|
|
21
26
|
|
|
22
27
|
options = {
|
|
23
28
|
:host => 'localhost',
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cpee-resources
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juergen eTM Mangler
|
|
8
8
|
- Ralph Vigne
|
|
9
9
|
bindir: tools
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: riddl
|
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
145
145
|
- !ruby/object:Gem::Version
|
|
146
146
|
version: '0'
|
|
147
147
|
requirements: []
|
|
148
|
-
rubygems_version: 3.6.
|
|
148
|
+
rubygems_version: 3.6.9
|
|
149
149
|
specification_version: 4
|
|
150
150
|
summary: Resources list for the cloud process execution engine (cpee.org)
|
|
151
151
|
test_files: []
|