riddl 0.101.16 → 0.101.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruby/riddl/implementation.rb +3 -3
- data/lib/ruby/riddl/ns/common-patterns/notifications-consumer/2.0/consumer.xml +52 -0
- data/lib/ruby/riddl/ns/common-patterns/notifications-producer/2.0/producer.xml +1 -21
- data/lib/ruby/riddl/server.rb +2 -2
- data/lib/ruby/riddl/utils/properties.rb +1 -1
- data/lib/ruby/riddl/wrapper.rb +1 -1
- data/lib/ruby/riddl/wrapper/messageparser.rb +1 -0
- data/ns/common-patterns/notifications-consumer/2.0/consumer.xml +52 -0
- data/ns/common-patterns/notifications-producer/2.0/producer.xml +1 -21
- data/riddl.gemspec +2 -3
- metadata +12 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8146e33ab4394adfcca6eb52a85976fcabe760c92d1fe6ed427896cf8d57851
|
4
|
+
data.tar.gz: e5bc04599b3ab8d652d215844236e025c6a12f3db32e5e08182bc05554f39ca5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2d6c172ebefae37bec3811baa828e6f58c2306920752a0ddd7ef614641a205609f40cf7310157e47785797dff4c6560d9b54595f765fd83fe490d2253ae3967
|
7
|
+
data.tar.gz: 37f5ff14b5263614f184d803b0eb613208d7f8d1eafd4c9bde080c9946017a19f9719832f1218921745a85d894ca5c92e76370e9f818b8be3ebe6de73f28237b
|
@@ -40,10 +40,10 @@ module Riddl
|
|
40
40
|
def onerror(err);end
|
41
41
|
|
42
42
|
def send(data)
|
43
|
-
|
43
|
+
@ws[:io].send_with_id 'data', data
|
44
44
|
end
|
45
45
|
def send_with_id(id,data)
|
46
|
-
|
46
|
+
@ws[:io].send_with_id id, data
|
47
47
|
end
|
48
48
|
|
49
49
|
def io=(connection)
|
@@ -77,7 +77,7 @@ module Riddl
|
|
77
77
|
def onerror(err);end
|
78
78
|
|
79
79
|
def send(data)
|
80
|
-
|
80
|
+
@ws[:io].send data
|
81
81
|
end
|
82
82
|
|
83
83
|
def io=(connection)
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<description datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://riddl.org/ns/description/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
2
|
+
|
3
|
+
<message name="event">
|
4
|
+
<parameter name="type" fixed="event"/>
|
5
|
+
<parameter name="topic" type="string">
|
6
|
+
<param name="pattern">[\w_/]+</param>
|
7
|
+
</parameter>
|
8
|
+
<parameter name="event" type="string">
|
9
|
+
<param name="pattern">[\w_]+</param>
|
10
|
+
</parameter>
|
11
|
+
<choice>
|
12
|
+
<parameter name="notification" type="string"/>
|
13
|
+
<parameter name="notification" mimetype="application/json"/>
|
14
|
+
</choice>
|
15
|
+
</message>
|
16
|
+
|
17
|
+
<message name="vote">
|
18
|
+
<parameter name="type" fixed="vote"/>
|
19
|
+
<parameter name="topic" type="string">
|
20
|
+
<param name="pattern">[\w_/]+</param>
|
21
|
+
</parameter>
|
22
|
+
<parameter name="vote" type="string">
|
23
|
+
<param name="pattern">[\w_]+</param>
|
24
|
+
</parameter>
|
25
|
+
<parameter name="callback" type="string"/>
|
26
|
+
<choice>
|
27
|
+
<parameter name="notification" type="string"/>
|
28
|
+
<parameter name="notification" mimetype="application/json"/>
|
29
|
+
</choice>
|
30
|
+
</message>
|
31
|
+
|
32
|
+
<message name="acknowledgment">
|
33
|
+
<optional>
|
34
|
+
<choice>
|
35
|
+
<parameter name="continue" type="string">
|
36
|
+
<choice>
|
37
|
+
<value>true</value>
|
38
|
+
<value>false</value>
|
39
|
+
<value>callback</value>
|
40
|
+
</choice>
|
41
|
+
</parameter>
|
42
|
+
<parameter name="continue" mimetype="text/plain"/>
|
43
|
+
</choice>
|
44
|
+
</optional>
|
45
|
+
</message>
|
46
|
+
|
47
|
+
<resource pattern="http://riddl.org/ns/common-patterns/notifications-consumer/2.0">
|
48
|
+
<post in="event"/>
|
49
|
+
<post in="vote" out="acknowledgment"/>
|
50
|
+
</resource>
|
51
|
+
|
52
|
+
</description>
|
@@ -99,9 +99,6 @@
|
|
99
99
|
<message name="subscribe">
|
100
100
|
<optional>
|
101
101
|
<parameter name="url" type="string"/>
|
102
|
-
<optional>
|
103
|
-
<parameter name="onbehalf" type="string"/>
|
104
|
-
</optional>
|
105
102
|
</optional>
|
106
103
|
<oneOrMore>
|
107
104
|
<parameter name="topic" type="string"/>
|
@@ -119,23 +116,6 @@
|
|
119
116
|
<parameter name="key" type="string"/>
|
120
117
|
</message>
|
121
118
|
|
122
|
-
<message name="details">
|
123
|
-
<optional>
|
124
|
-
<parameter name="url" type="string"/>
|
125
|
-
</optional>
|
126
|
-
<oneOrMore>
|
127
|
-
<parameter name="topic" type="string"/>
|
128
|
-
<choice>
|
129
|
-
<parameter name="votes" type="string">
|
130
|
-
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
131
|
-
</parameter>
|
132
|
-
<parameter name="events" type="string">
|
133
|
-
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
134
|
-
</parameter>
|
135
|
-
</choice>
|
136
|
-
</oneOrMore>
|
137
|
-
</message>
|
138
|
-
|
139
119
|
<message name="overview">
|
140
120
|
<parameter name="overview" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
|
141
121
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://riddl.org/ns/common-patterns/notifications-producer/2.0">
|
@@ -164,7 +144,7 @@
|
|
164
144
|
<post in="subscribe" out="acknowledgment"/>
|
165
145
|
<resource>
|
166
146
|
<get out="subscription"/>
|
167
|
-
<put in="
|
147
|
+
<put in="subscribe"/>
|
168
148
|
<delete/>
|
169
149
|
<resource relative="sse">
|
170
150
|
<sse/>
|
data/lib/ruby/riddl/server.rb
CHANGED
@@ -162,7 +162,7 @@ module Riddl
|
|
162
162
|
if @riddl_message.nil?
|
163
163
|
if @riddl_info[:env].has_key?('HTTP_ORIGIN') && @riddl_cross_site_xhr && @riddl_method == 'options'
|
164
164
|
@riddl_res['Access-Control-Allow-Origin'] = '*'
|
165
|
-
@riddl_res['Access-Control-Allow-Methods'] = 'GET, POST, PUT, DELETE, OPTIONS'
|
165
|
+
@riddl_res['Access-Control-Allow-Methods'] = 'GET, POST, PUT, PATCH, DELETE, OPTIONS'
|
166
166
|
@riddl_res['Access-Control-Allow-Headers'] = @riddl_info[:env]['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'] if @riddl_info[:env]['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']
|
167
167
|
@riddl_res['Access-Control-Max-Age'] = '0'
|
168
168
|
@riddl_res['Content-Length'] = '0'
|
@@ -223,7 +223,7 @@ module Riddl
|
|
223
223
|
@riddl_res = Rack::Response.new
|
224
224
|
@riddl_status = 404
|
225
225
|
|
226
|
-
@riddl_pinfo =
|
226
|
+
@riddl_pinfo = @riddl_env["PATH_INFO"].gsub(/\/+/,'/')
|
227
227
|
@riddl_matching_path = @riddl_paths.find{ |e| @riddl_pinfo.match(e[1]).to_s.length == @riddl_pinfo.length }
|
228
228
|
|
229
229
|
if @riddl_matching_path
|
@@ -466,7 +466,7 @@ module Riddl
|
|
466
466
|
nodes.each do |ele|
|
467
467
|
if value.nil?
|
468
468
|
newstuff.each do |child|
|
469
|
-
cpath = File.basename(child.
|
469
|
+
cpath = File.basename(child.qname.name)
|
470
470
|
subele = ele.find("p:" + cpath).first
|
471
471
|
if subele
|
472
472
|
subele.replace_by_copy(child)
|
data/lib/ruby/riddl/wrapper.rb
CHANGED
@@ -79,7 +79,7 @@ module Riddl
|
|
79
79
|
name = File.expand_path(File.dirname(__FILE__)) + $2
|
80
80
|
end
|
81
81
|
begin
|
82
|
-
fh = name.respond_to?(:read) ? name : open(name,:ssl_verify_mode => OpenSSL::SSL::VERIFY_NONE)
|
82
|
+
fh = name.respond_to?(:read) ? name : URI.open(name,:ssl_verify_mode => OpenSSL::SSL::VERIFY_NONE)
|
83
83
|
@doc = XML::Smart.string(fh.read)
|
84
84
|
fh.close
|
85
85
|
fpath = File.dirname(fh.path) if fh.is_a?(File) || fh.is_a?(Tempfile)
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<description datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://riddl.org/ns/description/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
2
|
+
|
3
|
+
<message name="event">
|
4
|
+
<parameter name="type" fixed="event"/>
|
5
|
+
<parameter name="topic" type="string">
|
6
|
+
<param name="pattern">[\w_/]+</param>
|
7
|
+
</parameter>
|
8
|
+
<parameter name="event" type="string">
|
9
|
+
<param name="pattern">[\w_]+</param>
|
10
|
+
</parameter>
|
11
|
+
<choice>
|
12
|
+
<parameter name="notification" type="string"/>
|
13
|
+
<parameter name="notification" mimetype="application/json"/>
|
14
|
+
</choice>
|
15
|
+
</message>
|
16
|
+
|
17
|
+
<message name="vote">
|
18
|
+
<parameter name="type" fixed="vote"/>
|
19
|
+
<parameter name="topic" type="string">
|
20
|
+
<param name="pattern">[\w_/]+</param>
|
21
|
+
</parameter>
|
22
|
+
<parameter name="vote" type="string">
|
23
|
+
<param name="pattern">[\w_]+</param>
|
24
|
+
</parameter>
|
25
|
+
<parameter name="callback" type="string"/>
|
26
|
+
<choice>
|
27
|
+
<parameter name="notification" type="string"/>
|
28
|
+
<parameter name="notification" mimetype="application/json"/>
|
29
|
+
</choice>
|
30
|
+
</message>
|
31
|
+
|
32
|
+
<message name="acknowledgment">
|
33
|
+
<optional>
|
34
|
+
<choice>
|
35
|
+
<parameter name="continue" type="string">
|
36
|
+
<choice>
|
37
|
+
<value>true</value>
|
38
|
+
<value>false</value>
|
39
|
+
<value>callback</value>
|
40
|
+
</choice>
|
41
|
+
</parameter>
|
42
|
+
<parameter name="continue" mimetype="text/plain"/>
|
43
|
+
</choice>
|
44
|
+
</optional>
|
45
|
+
</message>
|
46
|
+
|
47
|
+
<resource pattern="http://riddl.org/ns/common-patterns/notifications-consumer/2.0">
|
48
|
+
<post in="event"/>
|
49
|
+
<post in="vote" out="acknowledgment"/>
|
50
|
+
</resource>
|
51
|
+
|
52
|
+
</description>
|
@@ -99,9 +99,6 @@
|
|
99
99
|
<message name="subscribe">
|
100
100
|
<optional>
|
101
101
|
<parameter name="url" type="string"/>
|
102
|
-
<optional>
|
103
|
-
<parameter name="onbehalf" type="string"/>
|
104
|
-
</optional>
|
105
102
|
</optional>
|
106
103
|
<oneOrMore>
|
107
104
|
<parameter name="topic" type="string"/>
|
@@ -119,23 +116,6 @@
|
|
119
116
|
<parameter name="key" type="string"/>
|
120
117
|
</message>
|
121
118
|
|
122
|
-
<message name="details">
|
123
|
-
<optional>
|
124
|
-
<parameter name="url" type="string"/>
|
125
|
-
</optional>
|
126
|
-
<oneOrMore>
|
127
|
-
<parameter name="topic" type="string"/>
|
128
|
-
<choice>
|
129
|
-
<parameter name="votes" type="string">
|
130
|
-
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
131
|
-
</parameter>
|
132
|
-
<parameter name="events" type="string">
|
133
|
-
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
134
|
-
</parameter>
|
135
|
-
</choice>
|
136
|
-
</oneOrMore>
|
137
|
-
</message>
|
138
|
-
|
139
119
|
<message name="overview">
|
140
120
|
<parameter name="overview" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
|
141
121
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://riddl.org/ns/common-patterns/notifications-producer/2.0">
|
@@ -164,7 +144,7 @@
|
|
164
144
|
<post in="subscribe" out="acknowledgment"/>
|
165
145
|
<resource>
|
166
146
|
<get out="subscription"/>
|
167
|
-
<put in="
|
147
|
+
<put in="subscribe"/>
|
168
148
|
<delete/>
|
169
149
|
<resource relative="sse">
|
170
150
|
<sse/>
|
data/riddl.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "riddl"
|
3
|
-
s.version = "0.101.
|
3
|
+
s.version = "0.101.24"
|
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"
|
@@ -15,7 +15,6 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.executables = ['riddlcheck','riddlprocess']
|
16
16
|
s.test_files = Dir['test/tc_*.rb','test/smartrunner.rb']
|
17
17
|
|
18
|
-
|
19
18
|
s.email = 'juergen.mangler@gmail.com'
|
20
19
|
s.authors = ['Juergen \'eTM\' Mangler','Florian \'Solo\' Stertz','Sonja Biedermann']
|
21
20
|
s.email = 'juergen.mangler@gmail.com'
|
@@ -23,7 +22,7 @@ Gem::Specification.new do |s|
|
|
23
22
|
|
24
23
|
s.required_ruby_version = '>=2.2.0'
|
25
24
|
|
26
|
-
s.add_runtime_dependency 'daemonite', '~>0.
|
25
|
+
s.add_runtime_dependency 'daemonite', '~>0.5', '>=0.5.9'
|
27
26
|
s.add_runtime_dependency 'typhoeus', '~>1.3'
|
28
27
|
s.add_runtime_dependency 'xml-smart', '>=0.4.3', '~>0'
|
29
28
|
s.add_runtime_dependency 'rdf-smart', '>=0.0.160', '~>0'
|
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.101.
|
4
|
+
version: 0.101.24
|
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: 2020-
|
13
|
+
date: 2020-09-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: daemonite
|
@@ -18,14 +18,20 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '0.
|
21
|
+
version: '0.5'
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 0.5.9
|
22
25
|
type: :runtime
|
23
26
|
prerelease: false
|
24
27
|
version_requirements: !ruby/object:Gem::Requirement
|
25
28
|
requirements:
|
26
29
|
- - "~>"
|
27
30
|
- !ruby/object:Gem::Version
|
28
|
-
version: '0.
|
31
|
+
version: '0.5'
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 0.5.9
|
29
35
|
- !ruby/object:Gem::Dependency
|
30
36
|
name: typhoeus
|
31
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -441,6 +447,7 @@ files:
|
|
441
447
|
- lib/ruby/riddl/ns/common-patterns/addon-security/response.xml
|
442
448
|
- lib/ruby/riddl/ns/common-patterns/downloadify/1.0/downloadify.xml
|
443
449
|
- lib/ruby/riddl/ns/common-patterns/notifications-consumer/1.0/consumer.xml
|
450
|
+
- lib/ruby/riddl/ns/common-patterns/notifications-consumer/2.0/consumer.xml
|
444
451
|
- lib/ruby/riddl/ns/common-patterns/notifications-producer/1.0/producer.xml
|
445
452
|
- lib/ruby/riddl/ns/common-patterns/notifications-producer/2.0/producer.xml
|
446
453
|
- lib/ruby/riddl/ns/common-patterns/oauth2-univie-app/1.0/app.xml
|
@@ -501,6 +508,7 @@ files:
|
|
501
508
|
- ns/common-patterns/addon-security/response.xml
|
502
509
|
- ns/common-patterns/downloadify/1.0/downloadify.xml
|
503
510
|
- ns/common-patterns/notifications-consumer/1.0/consumer.xml
|
511
|
+
- ns/common-patterns/notifications-consumer/2.0/consumer.xml
|
504
512
|
- ns/common-patterns/notifications-producer/1.0/producer.xml
|
505
513
|
- ns/common-patterns/notifications-producer/2.0/producer.xml
|
506
514
|
- ns/common-patterns/oauth2-univie-app/1.0/app.xml
|