riddl 0.117 → 0.119
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3dedc8b0cb28306e10d9bf69403c7a8e4c1e0101060070b5847b66d58e2b722
|
4
|
+
data.tar.gz: 4ecde45979b650bd571d79fb05a539370c6019cf2db50761f9a251a5d96f83e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57c4af96b9857b1196f1abb9ccbee5e1b56fbfe58753554c47df13ba1e42594a8c58038fc92280365667a1b2ef12f460ac09eb9712a700036eab53c2d370d03c
|
7
|
+
data.tar.gz: 3275e26d5d59fb90c2ad1088e8d3ec79508a31ce141a117bf6a38992ad8c2bc8d9754fa640d62db118857bc0dc00e6c5bba97c5d054940d5def71320d0fd9e02
|
@@ -19,9 +19,13 @@ module Riddl
|
|
19
19
|
elsif @params.is_a?(Array) && @params.length > 1
|
20
20
|
multipart(mode)
|
21
21
|
else
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
if mode == :output
|
23
|
+
@headers['Content-Type'] = 'text/plain'
|
24
|
+
StringIO.new('','r+b')
|
25
|
+
else
|
26
|
+
StringIO.new('','r+b')
|
27
|
+
end
|
28
|
+
end
|
25
29
|
end
|
26
30
|
|
27
31
|
def body(r,mode)
|
@@ -46,7 +50,7 @@ module Riddl
|
|
46
50
|
@headers['Content-ID'] = r.name
|
47
51
|
else
|
48
52
|
@headers['Content-Disposition'] = "riddl-data; name=\"#{r.name}\"; filename=\"#{r.filename}\""
|
49
|
-
end
|
53
|
+
end
|
50
54
|
end
|
51
55
|
tmp.flush
|
52
56
|
tmp.rewind
|
@@ -63,7 +67,7 @@ module Riddl
|
|
63
67
|
scount += 1
|
64
68
|
when Riddl::Parameter::Complex
|
65
69
|
ccount += 1
|
66
|
-
end
|
70
|
+
end
|
67
71
|
end
|
68
72
|
if scount > 0 && ccount == 0
|
69
73
|
@headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
@@ -72,7 +76,7 @@ module Riddl
|
|
72
76
|
case r
|
73
77
|
when Riddl::Parameter::Simple
|
74
78
|
res << Riddl::Protocols::Utils::escape(r.name) + '=' + Riddl::Protocols::Utils::escape(r.value)
|
75
|
-
end
|
79
|
+
end
|
76
80
|
end
|
77
81
|
tmp.write res.join('&')
|
78
82
|
else
|
@@ -97,7 +101,7 @@ module Riddl
|
|
97
101
|
tmp.write EOL
|
98
102
|
tmp.write(r.value.respond_to?(:read) ? r.value.read : r.value)
|
99
103
|
tmp.write EOL
|
100
|
-
end
|
104
|
+
end
|
101
105
|
end
|
102
106
|
tmp.write "--" + BOUNDARY + EOL
|
103
107
|
end
|
@@ -107,8 +111,8 @@ module Riddl
|
|
107
111
|
tmp
|
108
112
|
end
|
109
113
|
private :multipart
|
110
|
-
|
114
|
+
|
111
115
|
end
|
112
116
|
end
|
113
117
|
end
|
114
|
-
end
|
118
|
+
end
|
@@ -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
|
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
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.
|
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:
|
13
|
+
date: 2022-11-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: daemonite
|
@@ -548,7 +548,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
548
548
|
- !ruby/object:Gem::Version
|
549
549
|
version: '0'
|
550
550
|
requirements: []
|
551
|
-
rubygems_version: 3.
|
551
|
+
rubygems_version: 3.3.7
|
552
552
|
signing_key:
|
553
553
|
specification_version: 4
|
554
554
|
summary: 'restful interface description and declaration language: tools and client/server
|