riddl 0.118 → 0.119

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: f6503335672eb9a820fbc3d27497221a05a93aa52c9cf283f2aab72a7a60c0f7
4
- data.tar.gz: 17313cb3a0992cbda479bd261a9c84a82b921ae9299111a32da5726549a5a848
3
+ metadata.gz: f3dedc8b0cb28306e10d9bf69403c7a8e4c1e0101060070b5847b66d58e2b722
4
+ data.tar.gz: 4ecde45979b650bd571d79fb05a539370c6019cf2db50761f9a251a5d96f83e2
5
5
  SHA512:
6
- metadata.gz: b883778615ca086be4f95af5bd47f54ce80b97eab211b4b35bd1ecd5a1743d1383161f93a9fa15b056eff3010692bcf03f7bcba919147e1aced52667ad030824
7
- data.tar.gz: b8c1723a3f1320ba5ce758a013769eabadc05d07a02d5e7064cf3b129754e3d41077dd81698a8206d9dc8aa312a18a87b8f94ae5fcb0c12ef07d04705f8d6437
6
+ metadata.gz: 57c4af96b9857b1196f1abb9ccbee5e1b56fbfe58753554c47df13ba1e42594a8c58038fc92280365667a1b2ef12f460ac09eb9712a700036eab53c2d370d03c
7
+ data.tar.gz: 3275e26d5d59fb90c2ad1088e8d3ec79508a31ce141a117bf6a38992ad8c2bc8d9754fa640d62db118857bc0dc00e6c5bba97c5d054940d5def71320d0fd9e02
@@ -57,7 +57,7 @@ module Riddl
57
57
  block.each do |bl|
58
58
  bpath = bl.to_s.gsub(/\/+/,'/').gsub(/\/$/,'')
59
59
  bpath = (bpath == "" ? "/" : bpath)
60
- if path == bpath
60
+ if interface.sub == bpath
61
61
  res.remove_access_methods(des,bl.attributes,index)
62
62
  end
63
63
  end
@@ -67,6 +67,11 @@ module Riddl
67
67
 
68
68
  def compose!(res=@base_path)
69
69
  #{{{
70
+ # delete empty resources
71
+ res.resources.delete_if do |k,r|
72
+ r.access_methods.length == 0
73
+ end
74
+ # compose
70
75
  res.compose!
71
76
  res.resources.each do |k,r|
72
77
  compose!(r)
@@ -75,6 +75,8 @@ module Riddl
75
75
  [RequestTransformation,Riddl::Wrapper::Description::Transformation.new(des,filter['transformation'])]
76
76
  elsif filter['pass'] && filter['pass'] == '*'
77
77
  [RequestPass]
78
+ elsif filter['method'] == 'sse'
79
+ [SSE]
78
80
  end
79
81
  raise BlockError, "blocking #{filter.inspect} not possible" if freq.nil?
80
82
 
@@ -95,10 +97,19 @@ module Riddl
95
97
  true if freq[1] && freq[1].hash == req.trans.hash
96
98
  elsif req.class == RequestPass
97
99
  true
100
+ elsif req.class == SSE
101
+ true
98
102
  end
99
103
  end
100
104
  end
101
105
  end
106
+ if @access_methods[filter['method']][index].empty?
107
+ @access_methods[filter['method']].delete_at(index)
108
+ end
109
+ @access_methods[filter['method']].compact!
110
+ if @access_methods[filter['method']].length == 0
111
+ @access_methods.delete(filter['method'])
112
+ end
102
113
  #}}}
103
114
  end
104
115
 
data/riddl.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "riddl"
3
- s.version = "0.118"
3
+ s.version = "0.119"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
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.118'
4
+ version: '0.119'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen 'eTM' Mangler
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: tools
12
12
  cert_chain: []
13
- date: 2022-05-23 00:00:00.000000000 Z
13
+ date: 2022-11-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: daemonite