riddl 0.118 → 0.120

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f6503335672eb9a820fbc3d27497221a05a93aa52c9cf283f2aab72a7a60c0f7
4
- data.tar.gz: 17313cb3a0992cbda479bd261a9c84a82b921ae9299111a32da5726549a5a848
3
+ metadata.gz: 6d8ef3594eaf104a6b3104c97b5ee6d9558b556bb40ee0f19a0ad280407e3b1f
4
+ data.tar.gz: babddb7a7568e2a792ef7397e2a5f4f7ffadab8f501d5ef69d2b704b51811e50
5
5
  SHA512:
6
- metadata.gz: b883778615ca086be4f95af5bd47f54ce80b97eab211b4b35bd1ecd5a1743d1383161f93a9fa15b056eff3010692bcf03f7bcba919147e1aced52667ad030824
7
- data.tar.gz: b8c1723a3f1320ba5ce758a013769eabadc05d07a02d5e7064cf3b129754e3d41077dd81698a8206d9dc8aa312a18a87b8f94ae5fcb0c12ef07d04705f8d6437
6
+ metadata.gz: 5112ff926d29379b35c566259c777e3fc6e21c23aca7410e626083a6647714f53de0036b7e4c76943cfb13692237ddb46b2ed0161def7611e1413c95d16cbf20
7
+ data.tar.gz: b7a159c7a46d1589729c015cc9bb987553320507c19c89dfd3d08f8a337aebd735124308f01babb75da708f616c649b97e5a872efda7e2c7211e8d4b69bb9941
@@ -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,12 @@ module Riddl
67
67
 
68
68
  def compose!(res=@base_path)
69
69
  #{{{
70
+ # delete empty resources
71
+ # THIS is a stupid idea, just not show it in the resulting xml! TODO
72
+ # res.resources.delete_if do |k,r|
73
+ # r.access_methods.length == 0
74
+ # end
75
+ # compose
70
76
  res.compose!
71
77
  res.resources.each do |k,r|
72
78
  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.120"
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.120'
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-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: daemonite