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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf0162d634ac9500c331947de6ff39cd506e24c5
4
- data.tar.gz: e70f25eb9171ca113b168814f731368f3c9aa8f8
3
+ metadata.gz: d6ce6cefa51a55659fe1c1cdc6c29cfa48bc04cc
4
+ data.tar.gz: 26b83b96c5b50ee44868e39a75ba7feec4ff6499
5
5
  SHA512:
6
- metadata.gz: 389305809f05730a3a5c4c2e7efd1af1dc78a3924048737a4ff17325d67ecd845ed1980adf2d48295ab38c5924ec01c2d3020847487aabef0506a9e0d09dfc60
7
- data.tar.gz: ab8b23348578760e119e741b7a0823460ad6e3de6a7d37ad4c287390a0c83100f77ec93d6a216d9c704df8c2a657b266e0a646076a73a231f686cd80e7311b0d
6
+ metadata.gz: eecedc55e5f5965e17510d9c0923c27526ded13a3da44baf81b3ceeb4dd9b5212e644671fc8f1df942bd00621dfc1a12312335f26b61c08244e32e331c1f914c
7
+ data.tar.gz: 5940de37387c79cc3f42fe38a6e3a0dc4509d3ef2ade78b2981231b229d94b3457db83ebf028f34644f15bb86f4cbc4f2b19ee7c4671b428d5cddd85c8548c9d
@@ -8,8 +8,7 @@ module Riddl
8
8
  class WrapperUtils
9
9
  def get_resource_deep(path,pres)
10
10
  #{{{
11
- path.split('/(').each do |pa|
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,finalize=false)
22
+ def rpaths(res,what='',rewhat='')
24
23
  #{{{
25
- what += what == '' ? '/' : (finalize ? '(' + res.path + ')' : res.path)
26
- ret = [[what,res.recursive]]
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 + '/',finalize)
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[0].gsub(/\{\}/,"[^/]+") + (t[1] ? '\/?' : '\/?$'))]
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,'',true)
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,'').map{|a,b| a}
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']
@@ -7,7 +7,7 @@ module Riddl
7
7
  class Description < WrapperUtils
8
8
 
9
9
  def paths(res=@resource,what='')
10
- rpaths(res,what,true)
10
+ rpaths(res,what)
11
11
  end
12
12
  def get_resource(path)
13
13
  get_resource_deep(path,@resource)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "riddl"
3
- s.version = "0.99.203"
3
+ s.version = "0.99.204"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3"
6
6
  s.summary = "restful interface description and declaration language: tools and client/server libs"
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.203
4
+ version: 0.99.204
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler