cpee-resources 1.0.3 → 1.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4b15a42bbfec373265af8072b83039a159c0f2da3cb2a61ed25e755f95d878f
4
- data.tar.gz: 8fe2ff417e1ed3e6b8010d28418f714232bbdb29d36e09bce328a661d5c69d48
3
+ metadata.gz: c8bdbb327f22bad0692cac431a470706786274b71d0adf951eef431943baf086
4
+ data.tar.gz: 92e6e1db36d873ba1ea0d73311ec938a3e59f4b01b994310be2f114b09683db0
5
5
  SHA512:
6
- metadata.gz: 52dfd64c30e4866075d4fd218d9bec439d0c02a44b028870472788cb9099e96dba95d71fa6a5ff8ce46af0e13eac09b18632624158aca4c6f8cd2fc8c48b4e77
7
- data.tar.gz: b86a6b97054fe9d19f1e78ef0e5cd22bee8efa3e19c1d4ae91374ad319c440c1ad11c33ba31b8c0597a3f837983e08b043d3023c0a2981debee8e1742e77f48d
6
+ metadata.gz: 62ccf144e75434cf153209fde94e34483690d1a6f103e04b06c7e01c9805b294d94b15f8d6a4d453be985de8bbae73cafd60a5529a1411b519a95a7bae94d551
7
+ data.tar.gz: 55bf1bd602615f1dd360062ce6b54a72bc00b3688a6e99c7e7f0ec05280d4312da461e44d737d170c039aa38c82d62d0fe9498c872dd13dd7acbe980f24e7e60
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee-resources"
3
- s.version = "1.0.3"
3
+ s.version = "1.0.4"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0-or-later"
6
6
  s.summary = "Resources list for the cloud process execution engine (cpee.org)"
@@ -16,83 +16,207 @@
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 'rubygems'
19
+ require 'json'
20
20
  require 'riddl/server'
21
21
 
22
22
  module CPEE
23
23
  module Resources
24
24
 
25
25
  SERVER = File.expand_path(File.join(__dir__,'implementation.xml'))
26
+ NOT_FOUND = 'Existence really is an imperfect tense that never becomes a present. (Friedrich Nietzsche)'
26
27
 
27
- class DoExists < Riddl::Implementation #{{{
28
+ class DoFile < Riddl::Implementation #{{{
28
29
  def response
29
30
  data = @a[1]
30
- dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@r[-1]))
31
- if Dir.exist?(dir)
32
- return Riddl::Parameter::Complex.new('exists','text/xml') do
33
- doc = XML::Smart::string('<resource/>')
34
- doc.root.add('schema','schema.rng') if File.exist?(File.join(dir,'schema.rng'))
35
- doc.root.add('symbol','symbol.svg') if File.exist?(File.join(dir,'symbol.svg'))
36
- doc.root.add('properties','properties.json') if File.exist?(File.join(dir,'properties.json'))
37
- doc.to_s
31
+ file = File.join(data,@a[0],*(@r[@a[2]].map{|e| Riddl::Protocols::Utils::escape(e)}))
32
+ if File.exist?(file)
33
+ Riddl::Parameter::Complex.new(@a[3],@a[4],File.read(file))
34
+ else
35
+ @status = 404
36
+ Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
37
+ end
38
+ end
39
+ end #}}}
40
+ class DoPutFile < Riddl::Implementation #{{{
41
+ def response
42
+ data = @a[1]
43
+ name = @r[-1]
44
+ file = File.join(data,@a[0],Riddl::Protocols::Utils::escape(name))
45
+ File.open(file,'wb') do |f|
46
+ IO.copy_stream(@p[0].value,f)
47
+ end
48
+ nil
49
+ end
50
+ end #}}}
51
+ class DoPutDescription < Riddl::Implementation #{{{
52
+ def response
53
+ data = @a[1]
54
+ dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@r[-3]))
55
+ unless Dir.exist?(dir)
56
+ @status = 404
57
+ return Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
58
+ end
59
+ ddir = File.join(dir,'descriptions')
60
+ Dir.mkdir(ddir) unless Dir.exist?(ddir)
61
+ File.open(File.join(ddir,@r[-1]),'wb') do |f|
62
+ IO.copy_stream(@p[0].value,f)
63
+ end
64
+ nil
65
+ end
66
+ end #}}}
67
+ class DoPutEndpointFile < Riddl::Implementation #{{{
68
+ def response
69
+ data = @a[1]
70
+ dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@r[-2]))
71
+ file = File.join(dir,@r[-1])
72
+ unless Dir.exist?(dir)
73
+ @status = 404
74
+ return Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
75
+ end
76
+ if @p[0].name == 'name'
77
+ target = File.join('..','..',@a[2],@p[0].value)
78
+ unless File.exist?(File.join(dir,target))
79
+ @status = 404
80
+ return Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
38
81
  end
82
+ File.unlink(file) if File.symlink?(file) || File.exist?(file)
83
+ File.symlink(target,file)
84
+ else
85
+ File.unlink(file) if File.symlink?(file)
86
+ File.open(file,'wb') do |f|
87
+ IO.copy_stream(@p[0].value,f)
88
+ end
89
+ end
90
+ nil
91
+ end
92
+ end #}}}
93
+ class DoDeleteFile < Riddl::Implementation #{{{
94
+ def response
95
+ data = @a[1]
96
+ file = File.join(data,@a[0],*(@r[@a[2]].map{|e| Riddl::Protocols::Utils::escape(e)}))
97
+ if File.exist?(file) || File.symlink?(file)
98
+ File.delete(file)
99
+ nil
39
100
  else
40
101
  @status = 404
41
- Riddl::Parameter::Complex.new('exists','text/plain','Existence really is an imperfect tense that never becomes a present. (Friedrich Nietzsche)')
102
+ Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
42
103
  end
43
104
  end
44
105
  end #}}}
45
- class DoModExists < Riddl::Implementation #{{{
106
+ class DoProperties < Riddl::Implementation #{{{
46
107
  def response
47
108
  data = @a[1]
48
- dir = File.join(data,'modifiers',Riddl::Protocols::Utils::escape(@r[-2]),Riddl::Protocols::Utils::escape(@r[-1]))
109
+ dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@r[-2]))
110
+ file = File.join(dir,'properties.json')
49
111
  if Dir.exist?(dir)
50
- Riddl::Parameter::Complex.new('exists','text/xml') do
51
- doc = XML::Smart::string('<resource/>')
52
- doc.root.add('patch','patch.xml') if File.exist?(File.join(dir,'patch.xml'))
53
- doc.root.add('unpatch','unpatch.xml') if File.exist?(File.join(dir,'unpatch.xml'))
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
112
+ props = File.exist?(file) ? JSON.parse(File.read(file)) : {}
113
+ props['global-schema'] = File.symlink?(File.join(dir,'schema.rng'))
114
+ props['global-symbol'] = File.symlink?(File.join(dir,'symbol.svg'))
115
+ Riddl::Parameter::Complex.new('json','application/json',JSON.generate(props))
58
116
  else
59
117
  @status = 404
60
- Riddl::Parameter::Complex.new('exists','text/plain','Existence really is an imperfect tense that never becomes a present. (Friedrich Nietzsche)')
118
+ Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
61
119
  end
62
120
  end
63
121
  end #}}}
64
- class DoFile < Riddl::Implementation #{{{
122
+ class DoGetProperty < Riddl::Implementation #{{{
65
123
  def response
66
124
  data = @a[1]
67
- file = File.join(data,@a[0],*(@r[@a[2]].map{|e| Riddl::Protocols::Utils::escape(e)}))
68
- if File.exist?(file)
69
- Riddl::Parameter::Complex.new(@a[3],@a[4],File.read(file))
125
+ dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@r[-3]))
126
+ file = File.join(dir,'properties.json')
127
+ key = @r[-1]
128
+ props = File.exist?(file) ? JSON.parse(File.read(file)) : {}
129
+ props['global-schema'] = File.symlink?(File.join(dir,'schema.rng'))
130
+ props['global-symbol'] = File.symlink?(File.join(dir,'symbol.svg'))
131
+ if Dir.exist?(dir) && props.key?(key)
132
+ Riddl::Parameter::Complex.new('value','text/plain',props[key].to_s)
70
133
  else
71
134
  @status = 404
72
- Riddl::Parameter::Complex.new('exists','text/plain','Existence really is an imperfect tense that never becomes a present. (Friedrich Nietzsche)')
135
+ Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
73
136
  end
74
137
  end
75
138
  end #}}}
139
+ class DoPutProperty < Riddl::Implementation #{{{
140
+ def response
141
+ data = @a[1]
142
+ dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@r[-3]))
143
+ file = File.join(dir,'properties.json')
144
+ key = @r[-1]
145
+ unless Dir.exist?(dir)
146
+ @status = 404
147
+ return Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
148
+ end
149
+ props = File.exist?(file) && !File.read(file).strip.empty? ? JSON.parse(File.read(file)) : {}
150
+ props[key] = @p[0].value
151
+ File.write(file,JSON.pretty_generate(props))
152
+ nil
153
+ end
154
+ end #}}}
155
+ class DoDeleteProperty < Riddl::Implementation #{{{
156
+ def response
157
+ data = @a[1]
158
+ dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@r[-3]))
159
+ file = File.join(dir,'properties.json')
160
+ key = @r[-1]
161
+ props = File.exist?(file) ? JSON.parse(File.read(file)) : {}
162
+ if props.key?(key)
163
+ props.delete(key)
164
+ File.write(file,JSON.pretty_generate(props))
165
+ nil
166
+ else
167
+ @status = 404
168
+ Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
169
+ end
170
+ end
171
+ end #}}}
172
+ class DoNewEndpoint < Riddl::Implementation #{{{
173
+ def response
174
+ data = @a[1]
175
+ dir = File.join(data,@a[0],Riddl::Protocols::Utils::escape(@p[0].value))
176
+ Dir.mkdir(dir)
177
+ File.write(File.join(dir,'properties.json'),'{}')
178
+ @status = 201
179
+ nil
180
+ rescue Errno::EEXIST
181
+ @status = 409
182
+ Riddl::Parameter::Complex.new('exists','text/plain','Endpoint already exists.')
183
+ end
184
+ end #}}}
76
185
  class DoList < Riddl::Implementation #{{{
77
186
  def response
78
187
  data = @a[1]
79
188
  @a[2] ||= 0...0
80
189
  dir = File.join(data,@a[0],*(@r[@a[2]].map{|e| Riddl::Protocols::Utils::escape(e)}))
190
+ if @a[3] && !Dir.exist?(dir)
191
+ @status = 404
192
+ return Riddl::Parameter::Complex.new('exists','text/plain',NOT_FOUND)
193
+ end
81
194
  return Riddl::Parameter::Complex.new('list','text/xml') do
82
195
  doc = XML::Smart::string('<resources/>')
83
- Dir.glob(File.join(dir,'*')).sort.each do |f|
84
- doc.root.add('resource',File.basename(f))
196
+ names = Dir.glob(File.join(dir,'*')).map{ |f| File.basename(f) } | (@a[5] || [])
197
+ names.sort.each do |n|
198
+ next if @a[4] && !@a[4].include?(n)
199
+ doc.root.add('resource',n)
85
200
  end
86
201
  doc.to_s
87
202
  end
88
203
  end
89
204
  end #}}}
90
-
91
- class DoFile < Riddl::Implementation #{{{
205
+ class DoDescList < Riddl::Implementation #{{{
92
206
  def response
93
207
  data = @a[1]
94
- file = File.join(data,@a[0],*(@r[@a[2]].map{|e| Riddl::Protocols::Utils::escape(e)}))
95
- File.write(file,@p[0])
208
+ @a[2] ||= 0...0
209
+ dir = File.join(data,@a[0],*(@r[@a[2]].map{|e| Riddl::Protocols::Utils::escape(e)}))
210
+ return Riddl::Parameter::Complex.new('list','text/xml') do
211
+ doc = XML::Smart::string('<resources/>')
212
+ Dir.glob(File.join(dir,'*','descriptions')).each do |f|
213
+ n = doc.root.add('resource', 'endpoint' => File.basename(File.dirname(f)))
214
+ n.add('endpoint', File.read(File.join(f,'endpoint.md'))) if File.exist?(File.join(f,'endpoint.md'))
215
+ n.add('functionality', File.read(File.join(f,'functionality.md'))) if File.exist?(File.join(f,'functionality.md'))
216
+ n.add('output', File.read(File.join(f,'output.md'))) if File.exist?(File.join(f,'output.md'))
217
+ end
218
+ doc.to_s
219
+ end
96
220
  end
97
221
  end #}}}
98
222
 
@@ -101,12 +225,13 @@ module CPEE
101
225
 
102
226
  Proc.new do
103
227
  on resource do
228
+ run DoList, '', opts[:data_dir] if get
104
229
  on resource 'modifiers' do
105
230
  run DoList, 'modifiers', opts[:data_dir] if get
106
231
  on resource do
107
232
  run DoList, 'modifiers', opts[:data_dir], (-1..-1) if get
108
233
  on resource do
109
- run DoModExists, 'modifiers', opts[:data_dir] if get
234
+ run DoList, 'modifiers', opts[:data_dir], (-2..-1), true, %w{patch.xml unpatch.xml condition.json ui.rng} if get
110
235
  on resource 'patch.xml' do
111
236
  run DoFile, 'modifiers', opts[:data_dir], (-3..-1), 'testset', 'text/xml' if get
112
237
  end
@@ -122,19 +247,63 @@ module CPEE
122
247
  end
123
248
  end
124
249
  end
250
+ on resource 'symbols' do
251
+ run DoList, 'symbols', opts[:data_dir] if get
252
+ on resource '[a-z][a-zA-Z0-9_-]*\.svg' do
253
+ run DoFile, 'symbols', opts[:data_dir], (-1..-1), 'svg', 'image/svg+xml' if get
254
+ run DoPutFile, 'symbols', opts[:data_dir] if put 'symbol'
255
+ run DoDeleteFile, 'symbols', opts[:data_dir], (-1..-1) if delete
256
+ end
257
+ end
258
+ on resource 'schemas' do
259
+ run DoList, 'schemas', opts[:data_dir] if get
260
+ on resource '[a-z][a-zA-Z0-9_-]*\.rng' do
261
+ run DoFile, 'schemas', opts[:data_dir], (-1..-1), 'rng', 'text/xml' if get
262
+ run DoPutFile, 'schemas', opts[:data_dir] if put 'schema'
263
+ run DoDeleteFile, 'schemas', opts[:data_dir], (-1..-1) if delete
264
+ end
265
+ end
125
266
  on resource 'endpoints' do
267
+ run DoDescList, 'endpoints', opts[:data_dir] if get 'dfilter'
126
268
  run DoList, 'endpoints', opts[:data_dir] if get
269
+ run DoNewEndpoint, 'endpoints', opts[:data_dir] if post 'endpoint'
127
270
  on resource do
128
- run DoExists, 'endpoints', opts[:data_dir] if get
271
+ run DoList, 'endpoints', opts[:data_dir], (-1..-1), true, %w{schema.rng symbol.svg properties.json descriptions}, %w{properties.json} if get
129
272
  on resource 'symbol.svg' do
130
273
  run DoFile, 'endpoints', opts[:data_dir], (-2..-1), 'svg', 'image/svg+xml' if get
274
+ run DoPutEndpointFile, 'endpoints', opts[:data_dir], 'symbols' if put 'endpoint-symbol'
275
+ run DoDeleteFile, 'endpoints', opts[:data_dir], (-2..-1) if delete
131
276
  end
132
277
  on resource 'schema.rng' do
133
278
  run DoFile, 'endpoints', opts[:data_dir], (-2..-1), 'rng', 'text/xml' if get
134
- run SaveFile, 'endpoints', opts[:data_dir], (-2..-1), 'rng', 'text/xml' if put 'schema'
279
+ run DoPutEndpointFile, 'endpoints', opts[:data_dir], 'schemas' if put 'endpoint-schema'
280
+ run DoDeleteFile, 'endpoints', opts[:data_dir], (-2..-1) if delete
135
281
  end
136
282
  on resource 'properties.json' do
137
- run DoFile, 'endpoints', opts[:data_dir], (-2..-1), 'json', 'application/json' if get
283
+ run DoProperties, 'endpoints', opts[:data_dir] if get
284
+ on resource do
285
+ run DoGetProperty, 'endpoints', opts[:data_dir] if get
286
+ run DoPutProperty, 'endpoints', opts[:data_dir] if put 'property'
287
+ run DoDeleteProperty, 'endpoints', opts[:data_dir] if delete
288
+ end
289
+ end
290
+ on resource 'descriptions' do
291
+ run DoList, 'endpoints', opts[:data_dir], (-2..-1), true, %w{functionality.md output.md endpoint.md} if get
292
+ on resource 'functionality.md' do
293
+ run DoFile, 'endpoints', opts[:data_dir], (-3..-1), 'markdown', 'text/markdown' if get
294
+ run DoPutDescription, 'endpoints', opts[:data_dir] if put 'description-file'
295
+ run DoDeleteFile, 'endpoints', opts[:data_dir], (-3..-1) if delete
296
+ end
297
+ on resource 'output.md' do
298
+ run DoFile, 'endpoints', opts[:data_dir], (-3..-1), 'markdown', 'text/markdown' if get
299
+ run DoPutDescription, 'endpoints', opts[:data_dir] if put 'description-file'
300
+ run DoDeleteFile, 'endpoints', opts[:data_dir], (-3..-1) if delete
301
+ end
302
+ on resource 'endpoint.md' do
303
+ run DoFile, 'endpoints', opts[:data_dir], (-3..-1), 'markdown', 'text/markdown' if get
304
+ run DoPutDescription, 'endpoints', opts[:data_dir] if put 'description-file'
305
+ run DoDeleteFile, 'endpoints', opts[:data_dir], (-3..-1) if delete
306
+ end
138
307
  end
139
308
  end
140
309
  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="exists">
24
- <choice>
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="svg" mimetype="image/svg+xml"/>
38
- <parameter name="exists" mimetype="text/plain"/>
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="rng" mimetype="*/xml"/>
44
- <parameter name="exists" mimetype="text/plain"/>
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="exists"/>
86
+ <get out="list"/>
61
87
  <resource relative="patch.xml">
62
88
  <get out="testset"/>
63
89
  </resource>
@@ -73,19 +99,63 @@
73
99
  </resource>
74
100
  </resource>
75
101
  </resource> <!--}}}-->
76
- <resource relative='endpoints'>
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="exists"/>
123
+ <get out="list"/>
80
124
  <resource relative="symbol.svg">
81
125
  <get out="symbol"/>
126
+ <put in="endpoint-symbol"/>
127
+ <delete/>
82
128
  </resource>
83
129
  <resource relative="schema.rng">
84
130
  <get out="schema"/>
85
- <put in="schema"/>
131
+ <put in="endpoint-schema"/>
132
+ <delete/>
86
133
  </resource>
87
134
  <resource relative="properties.json">
88
135
  <get out="json"/>
136
+ <resource>
137
+ <get out="property-value"/>
138
+ <put in="property"/>
139
+ <delete/>
140
+ </resource>
141
+ </resource>
142
+ <resource relative="descriptions">
143
+ <get out="list"/>
144
+ <resource relative="functionality.md">
145
+ <get out="markdown"/>
146
+ <put in="description-file"/>
147
+ <delete/>
148
+ </resource>
149
+ <resource relative="output.md">
150
+ <get out="markdown"/>
151
+ <put in="description-file"/>
152
+ <delete/>
153
+ </resource>
154
+ <resource relative="endpoint.md">
155
+ <get out="markdown"/>
156
+ <put in="description-file"/>
157
+ <delete/>
158
+ </resource>
89
159
  </resource>
90
160
  </resource>
91
161
  </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
- require 'rubygems'
20
- require 'cpee-resources/implementation'
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.3
4
+ version: 1.0.4
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: 2025-05-18 00:00:00.000000000 Z
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.2
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: []