riddl 0.99.203 → 0.99.204
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/lib/ruby/riddl/wrapper.rb +7 -7
- data/lib/ruby/riddl/wrapper/declaration.rb +2 -2
- data/lib/ruby/riddl/wrapper/description.rb +1 -1
- data/riddl.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6ce6cefa51a55659fe1c1cdc6c29cfa48bc04cc
|
4
|
+
data.tar.gz: 26b83b96c5b50ee44868e39a75ba7feec4ff6499
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eecedc55e5f5965e17510d9c0923c27526ded13a3da44baf81b3ceeb4dd9b5212e644671fc8f1df942bd00621dfc1a12312335f26b61c08244e32e331c1f914c
|
7
|
+
data.tar.gz: 5940de37387c79cc3f42fe38a6e3a0dc4509d3ef2ade78b2981231b229d94b3457db83ebf028f34644f15bb86f4cbc4f2b19ee7c4671b428d5cddd85c8548c9d
|
data/lib/ruby/riddl/wrapper.rb
CHANGED
@@ -8,8 +8,7 @@ module Riddl
|
|
8
8
|
class WrapperUtils
|
9
9
|
def get_resource_deep(path,pres)
|
10
10
|
#{{{
|
11
|
-
path.split('/
|
12
|
-
pa.chop!
|
11
|
+
path.split('/').each do |pa|
|
13
12
|
next if pa == ""
|
14
13
|
if pres.resources.has_key?(pa)
|
15
14
|
pres = pres.resources[pa]
|
@@ -20,12 +19,13 @@ module Riddl
|
|
20
19
|
pres
|
21
20
|
#}}}
|
22
21
|
end
|
23
|
-
def rpaths(res,what,
|
22
|
+
def rpaths(res,what='',rewhat='')
|
24
23
|
#{{{
|
25
|
-
what += what == '' ? '/' :
|
26
|
-
|
24
|
+
what += what == '' ? '/' : res.path
|
25
|
+
rewhat += rewhat == '' ? '/' : '(' + res.path + ')'
|
26
|
+
ret = [[what,rewhat,res.recursive]]
|
27
27
|
res.resources.each do |name,r|
|
28
|
-
ret += rpaths(r,what == '/' ? what : what + '/',
|
28
|
+
ret += rpaths(r,what == '/' ? what : what + '/',rewhat == '/' ? rewhat : rewhat + '/')
|
29
29
|
end
|
30
30
|
ret.sort!
|
31
31
|
ret
|
@@ -270,7 +270,7 @@ module Riddl
|
|
270
270
|
tmp = @description.paths if @is_description
|
271
271
|
tmp = @declaration.paths if @is_declaration
|
272
272
|
tmp.map do |t|
|
273
|
-
[t[0],Regexp.new("^" + t[
|
273
|
+
[t[0],Regexp.new("^" + t[1].gsub(/\{\}/,"[^/]+") + (t[2] ? '\/?' : '\/?$'))]
|
274
274
|
end
|
275
275
|
#}}}
|
276
276
|
end
|
@@ -11,7 +11,7 @@ module Riddl
|
|
11
11
|
get_resource_deep(path,@facade.resource)
|
12
12
|
end
|
13
13
|
def paths
|
14
|
-
rpaths(@facade.resource
|
14
|
+
rpaths(@facade.resource)
|
15
15
|
end
|
16
16
|
|
17
17
|
def description_xml
|
@@ -81,7 +81,7 @@ module Riddl
|
|
81
81
|
desres = des.find("des:resource").first
|
82
82
|
if everywhere
|
83
83
|
@tiles.map do |til| # extract all currently existing paths for all tiles
|
84
|
-
rpaths(til.resource
|
84
|
+
rpaths(til.resource).map{|a,b| a}
|
85
85
|
end.flatten.uniq.each do |path| # apply current to all paths
|
86
86
|
int = Interface.new(lname,path,lpath,"/",des)
|
87
87
|
rec = desres.attributes['recursive']
|
data/riddl.gemspec
CHANGED