riddl 0.99.147 → 0.99.148
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/ruby/riddl/wrapper/description/resource.rb +56 -41
- data/riddl.gemspec +1 -1
- metadata +2 -2
@@ -232,58 +232,73 @@ module Riddl
|
|
232
232
|
end
|
233
233
|
private :add_to_path_and_split
|
234
234
|
|
235
|
+
def description_xml_string_analyse(messages,t,k,m)
|
236
|
+
#{{{
|
237
|
+
result = ''
|
238
|
+
if %w{get post put delete websocket}.include?(k)
|
239
|
+
result << t + "<#{k} "
|
240
|
+
else
|
241
|
+
result << t + "<request method=\"#{k}\" "
|
242
|
+
end
|
243
|
+
case m
|
244
|
+
when Riddl::Wrapper::Description::RequestInOut
|
245
|
+
messages[m.in.hash] ||= m.in
|
246
|
+
result << "in=\"#{messages[m.in.hash].name}\""
|
247
|
+
unless m.out.nil?
|
248
|
+
messages[m.out.hash] ||= m.out
|
249
|
+
result << " out=\"#{messages[m.out.hash].name}\""
|
250
|
+
end
|
251
|
+
when Riddl::Wrapper::Description::RequestStarOut
|
252
|
+
result << "in=\"*\""
|
253
|
+
unless m.out.nil?
|
254
|
+
messages[m.out.hash] ||= m.out
|
255
|
+
result << " out=\"#{messages[m.out.hash].name}\""
|
256
|
+
end
|
257
|
+
when Riddl::Wrapper::Description::RequestPass
|
258
|
+
messages[m.pass.hash] ||= m.pass
|
259
|
+
result << "pass=\"#{messages[m.pass.hash].name}\""
|
260
|
+
when Riddl::Wrapper::Description::RequestTransformation
|
261
|
+
messages[m.trans.hash] ||= m.trans
|
262
|
+
result << "transformation=\"#{messages[m.trans.hash].name}\""
|
263
|
+
end
|
264
|
+
if m.custom.length > 0
|
265
|
+
result << ">\n"
|
266
|
+
m.custom.each do |e|
|
267
|
+
result << e.dump + "\n"
|
268
|
+
end
|
269
|
+
if %w{get post put delete websocket}.include?(k)
|
270
|
+
result << t + "</#{k}>"
|
271
|
+
else
|
272
|
+
result << t + "</request>\n"
|
273
|
+
end
|
274
|
+
else
|
275
|
+
result << "/>\n"
|
276
|
+
end
|
277
|
+
result
|
278
|
+
#}}}
|
279
|
+
end
|
280
|
+
private :description_xml_string_analyse
|
281
|
+
|
235
282
|
def description_xml_string(messages,t)
|
236
283
|
#{{{
|
237
284
|
result = ''
|
238
285
|
@custom.each do |c|
|
239
286
|
result << c.dump
|
240
287
|
end
|
288
|
+
|
241
289
|
if @composition.any?
|
242
290
|
@composition.each do |k,v|
|
243
291
|
v.each do |m|
|
244
|
-
|
245
|
-
if %w{get post put delete websocket}.include?(k)
|
246
|
-
result << t + "<#{k} "
|
247
|
-
else
|
248
|
-
result << t + "<request method=\"#{k}\" "
|
249
|
-
end
|
250
|
-
case m
|
251
|
-
when Riddl::Wrapper::Description::RequestInOut
|
252
|
-
messages[m.in.hash] ||= m.in
|
253
|
-
result << "in=\"#{messages[m.in.hash].name}\""
|
254
|
-
unless m.out.nil?
|
255
|
-
messages[m.out.hash] ||= m.out
|
256
|
-
result << " out=\"#{messages[m.out.hash].name}\""
|
257
|
-
end
|
258
|
-
when Riddl::Wrapper::Description::RequestStarOut
|
259
|
-
result << "in=\"*\""
|
260
|
-
unless m.out.nil?
|
261
|
-
messages[m.out.hash] ||= m.out
|
262
|
-
result << " out=\"#{messages[m.out.hash].name}\""
|
263
|
-
end
|
264
|
-
when Riddl::Wrapper::Description::RequestPass
|
265
|
-
messages[m.pass.hash] ||= m.pass
|
266
|
-
result << "pass=\"#{messages[m.pass.hash].name}\""
|
267
|
-
when Riddl::Wrapper::Description::RequestTransformation
|
268
|
-
messages[m.trans.hash] ||= m.trans
|
269
|
-
result << "transformation=\"#{messages[m.trans.hash].name}\""
|
270
|
-
end
|
271
|
-
if m.custom.length > 0
|
272
|
-
result << ">\n"
|
273
|
-
m.custom.each do |e|
|
274
|
-
result << e.dump + "\n"
|
275
|
-
end
|
276
|
-
if %w{get post put delete websocket}.include?(k)
|
277
|
-
result << t + "</#{k}>"
|
278
|
-
else
|
279
|
-
result << t + "</request>\n"
|
280
|
-
end
|
281
|
-
else
|
282
|
-
result << "/>\n"
|
283
|
-
end
|
292
|
+
result << description_xml_string_analyse(messages,t,k,m.result)
|
284
293
|
end
|
285
294
|
end
|
286
|
-
|
295
|
+
else
|
296
|
+
@access_methods.each do |k,v|
|
297
|
+
v.first.each do |m|
|
298
|
+
result << description_xml_string_analyse(messages,t,k,m)
|
299
|
+
end
|
300
|
+
end
|
301
|
+
end
|
287
302
|
result
|
288
303
|
#}}}
|
289
304
|
end
|
data/riddl.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: riddl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.99.
|
4
|
+
version: 0.99.148
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: tools
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-05-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: xml-smart
|