riddl 0.101.14 → 0.101.22

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: 538f2fef1e82ea03b4b6902f9b3c944bfecb1325983f23595f19ef517533508b
4
- data.tar.gz: dc72c26cc82dff1c2b28783bfe63ab23f96ac12d5b88c49bb37c84da8e1bddeb
3
+ metadata.gz: ba13a4622c2280b047206d4f73776cfe5d4d131be46f7ec3a76fca785d920e0f
4
+ data.tar.gz: f0302103e937d8bbd1cd381e0a8bf6ac1153a781dd26247caa6648dd14891b61
5
5
  SHA512:
6
- metadata.gz: 8bfaa4ab3c4ccb92b434b415a080c0c992180aa09b0d7d9b957add325a9b10b925924be2237b3dead8516a0fdb1639a6919657e32eac224f21f227f0aad6d2de
7
- data.tar.gz: '0588e97d620d7ab2e080a40a86c8df65f75efc966952d851c338580018dbcc5d7e7c34118993abc5b96576b970d75fd3015cd11674acbe365cd426002714ad45'
6
+ metadata.gz: bc2590d22b774ad177e7b3edbcd23df629ac98b46e338fd10f081f5055efe6803fcc46509df2d2b907959447cfe524124756284e0127c22350fdc5ea3c485196
7
+ data.tar.gz: 5131b5d2f0ebc8139a962e4300c83501eeda8572932c7c2fdca4a986fae4bf128c6a8567aadd69127a0701fc7fa621681cae6aa4e2d835f1bb819ca7bf7c44a5
@@ -40,10 +40,10 @@ module Riddl
40
40
  def onerror(err);end
41
41
 
42
42
  def send(data)
43
- self.io.send_with_id 'data', data
43
+ @ws[:io].send_with_id 'data', data
44
44
  end
45
45
  def send_with_id(id,data)
46
- self.io.send_with_id id, data
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
- self.io.send data
80
+ @ws[:io].send data
81
81
  end
82
82
 
83
83
  def io=(connection)
@@ -0,0 +1,49 @@
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
+ <parameter name="continue" type="string">
35
+ <choice>
36
+ <value>true</value>
37
+ <value>false</value>
38
+ <value>callback</value>
39
+ </choice>
40
+ </parameter>
41
+ </optional>
42
+ </message>
43
+
44
+ <resource pattern="http://riddl.org/ns/common-patterns/notifications-consumer/2.0">
45
+ <post in="event"/>
46
+ <post in="vote" out="acknowledgment"/>
47
+ </resource>
48
+
49
+ </description>
@@ -0,0 +1,157 @@
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="topics">
4
+ <parameter name="topics" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
5
+ <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">
6
+ <start>
7
+ <element name="topics">
8
+ <zeroOrMore>
9
+ <ref name="topic"/>
10
+ </zeroOrMore>
11
+ </element>
12
+ </start>
13
+
14
+ <define name="topic">
15
+ <element name="topic">
16
+ <attribute name="id">
17
+ <data type="string"/>
18
+ </attribute>
19
+ <zeroOrMore>
20
+ <element>
21
+ <choice>
22
+ <name>event</name>
23
+ <name>vote</name>
24
+ </choice>
25
+ <data type="string">
26
+ <param name="pattern">[\w-_]+</param>
27
+ </data>
28
+ </element>
29
+ </zeroOrMore>
30
+ </element>
31
+ </define>
32
+
33
+ </grammar>
34
+ </parameter>
35
+ </message>
36
+
37
+ <message name="subscriptions">
38
+ <parameter name="subscriptions" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
39
+ <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">
40
+ <start>
41
+ <element name="subscriptions">
42
+ <zeroOrMore>
43
+ <ref name="subscription"/>
44
+ </zeroOrMore>
45
+ </element>
46
+ </start>
47
+
48
+ <define name="subscription">
49
+ <element name="subscription">
50
+ <attribute name="id">
51
+ <data type="string"/>
52
+ </attribute>
53
+ <optional>
54
+ <attribute name="url">
55
+ <data type="string"/>
56
+ </attribute>
57
+ </optional>
58
+ </element>
59
+ </define>
60
+
61
+ </grammar>
62
+ </parameter>
63
+ </message>
64
+
65
+ <message name="subscription">
66
+ <parameter name="subscription" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
67
+ <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">
68
+ <start>
69
+ <element name="subscription">
70
+ <optional>
71
+ <attribute name="url">
72
+ <data type="string"/>
73
+ </attribute>
74
+ </optional>
75
+ <oneOrMore>
76
+ <element name="topic">
77
+ <attribute name="id">
78
+ <data type="string"/>
79
+ </attribute>
80
+ <oneOrMore>
81
+ <element>
82
+ <choice>
83
+ <name>event</name>
84
+ <name>vote</name>
85
+ </choice>
86
+ <data type="string">
87
+ <param name="pattern">[\w_]+</param>
88
+ </data>
89
+ </element>
90
+ </oneOrMore>
91
+ </element>
92
+ </oneOrMore>
93
+ </element>
94
+ </start>
95
+ </grammar>
96
+ </parameter>
97
+ </message>
98
+
99
+ <message name="subscribe">
100
+ <optional>
101
+ <parameter name="url" type="string"/>
102
+ </optional>
103
+ <oneOrMore>
104
+ <parameter name="topic" type="string"/>
105
+ <choice>
106
+ <parameter name="votes" type="string">
107
+ <param name="pattern">([\w-_]+,)*([\w-_]+)</param>
108
+ </parameter>
109
+ <parameter name="events" type="string">
110
+ <param name="pattern">([\w-_]+,)*([\w-_]+)</param>
111
+ </parameter>
112
+ </choice>
113
+ </oneOrMore>
114
+ </message>
115
+ <message name="acknowledgment">
116
+ <parameter name="key" type="string"/>
117
+ </message>
118
+
119
+ <message name="overview">
120
+ <parameter name="overview" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
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">
122
+ <start>
123
+ <element name="overview">
124
+ <element name="topics">
125
+ <empty/>
126
+ </element>
127
+ <element name="subscriptions">
128
+ <empty/>
129
+ </element>
130
+ </element>
131
+ </start>
132
+ </grammar>
133
+ </parameter>
134
+ </message>
135
+
136
+ <resource pattern="http://riddl.org/ns/common-patterns/notifications-producer/2.0">
137
+ <resource relative="notifications">
138
+ <get in="*" out="overview"/>
139
+ <resource relative="topics">
140
+ <get in="*" out="topics"/>
141
+ </resource>
142
+ <resource relative="subscriptions">
143
+ <get in="*" out="subscriptions"/>
144
+ <post in="subscribe" out="acknowledgment"/>
145
+ <resource>
146
+ <get out="subscription"/>
147
+ <put in="subscribe"/>
148
+ <delete/>
149
+ <resource relative="sse">
150
+ <sse/>
151
+ </resource>
152
+ </resource>
153
+ </resource>
154
+ </resource>
155
+ </resource>
156
+
157
+ </description>
@@ -134,6 +134,11 @@ module Riddl
134
134
  end
135
135
  end
136
136
 
137
+ if @riddl_opts[:parallel]
138
+ EM.defer do
139
+ @riddl_opts[:parallel].call
140
+ end
141
+ end
137
142
  end
138
143
 
139
144
  rescue => e
@@ -144,6 +149,10 @@ module Riddl
144
149
  end
145
150
  end #}}}
146
151
 
152
+ def parallel(&blk)
153
+ @riddl_opts[:parallel] = blk
154
+ end
155
+
147
156
  def call(env)# {{{
148
157
  dup.__http_call(env)
149
158
  end# }}}
@@ -153,7 +162,7 @@ module Riddl
153
162
  if @riddl_message.nil?
154
163
  if @riddl_info[:env].has_key?('HTTP_ORIGIN') && @riddl_cross_site_xhr && @riddl_method == 'options'
155
164
  @riddl_res['Access-Control-Allow-Origin'] = '*'
156
- @riddl_res['Access-Control-Allow-Methods'] = 'GET, POST, PUT, DELETE, OPTIONS'
165
+ @riddl_res['Access-Control-Allow-Methods'] = 'GET, POST, PUT, PATCH, DELETE, OPTIONS'
157
166
  @riddl_res['Access-Control-Allow-Headers'] = @riddl_info[:env]['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'] if @riddl_info[:env]['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']
158
167
  @riddl_res['Access-Control-Max-Age'] = '0'
159
168
  @riddl_res['Content-Length'] = '0'
@@ -26,6 +26,7 @@ module Riddl
26
26
 
27
27
  # out not available
28
28
  return true if what.nil? && @mist.empty?
29
+ return false if what.nil?
29
30
 
30
31
  # do it
31
32
  m = what.content.root
@@ -0,0 +1,49 @@
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
+ <parameter name="continue" type="string">
35
+ <choice>
36
+ <value>true</value>
37
+ <value>false</value>
38
+ <value>callback</value>
39
+ </choice>
40
+ </parameter>
41
+ </optional>
42
+ </message>
43
+
44
+ <resource pattern="http://riddl.org/ns/common-patterns/notifications-consumer/2.0">
45
+ <post in="event"/>
46
+ <post in="vote" out="acknowledgment"/>
47
+ </resource>
48
+
49
+ </description>
@@ -0,0 +1,157 @@
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="topics">
4
+ <parameter name="topics" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
5
+ <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">
6
+ <start>
7
+ <element name="topics">
8
+ <zeroOrMore>
9
+ <ref name="topic"/>
10
+ </zeroOrMore>
11
+ </element>
12
+ </start>
13
+
14
+ <define name="topic">
15
+ <element name="topic">
16
+ <attribute name="id">
17
+ <data type="string"/>
18
+ </attribute>
19
+ <zeroOrMore>
20
+ <element>
21
+ <choice>
22
+ <name>event</name>
23
+ <name>vote</name>
24
+ </choice>
25
+ <data type="string">
26
+ <param name="pattern">[\w-_]+</param>
27
+ </data>
28
+ </element>
29
+ </zeroOrMore>
30
+ </element>
31
+ </define>
32
+
33
+ </grammar>
34
+ </parameter>
35
+ </message>
36
+
37
+ <message name="subscriptions">
38
+ <parameter name="subscriptions" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
39
+ <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">
40
+ <start>
41
+ <element name="subscriptions">
42
+ <zeroOrMore>
43
+ <ref name="subscription"/>
44
+ </zeroOrMore>
45
+ </element>
46
+ </start>
47
+
48
+ <define name="subscription">
49
+ <element name="subscription">
50
+ <attribute name="id">
51
+ <data type="string"/>
52
+ </attribute>
53
+ <optional>
54
+ <attribute name="url">
55
+ <data type="string"/>
56
+ </attribute>
57
+ </optional>
58
+ </element>
59
+ </define>
60
+
61
+ </grammar>
62
+ </parameter>
63
+ </message>
64
+
65
+ <message name="subscription">
66
+ <parameter name="subscription" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
67
+ <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">
68
+ <start>
69
+ <element name="subscription">
70
+ <optional>
71
+ <attribute name="url">
72
+ <data type="string"/>
73
+ </attribute>
74
+ </optional>
75
+ <oneOrMore>
76
+ <element name="topic">
77
+ <attribute name="id">
78
+ <data type="string"/>
79
+ </attribute>
80
+ <oneOrMore>
81
+ <element>
82
+ <choice>
83
+ <name>event</name>
84
+ <name>vote</name>
85
+ </choice>
86
+ <data type="string">
87
+ <param name="pattern">[\w_]+</param>
88
+ </data>
89
+ </element>
90
+ </oneOrMore>
91
+ </element>
92
+ </oneOrMore>
93
+ </element>
94
+ </start>
95
+ </grammar>
96
+ </parameter>
97
+ </message>
98
+
99
+ <message name="subscribe">
100
+ <optional>
101
+ <parameter name="url" type="string"/>
102
+ </optional>
103
+ <oneOrMore>
104
+ <parameter name="topic" type="string"/>
105
+ <choice>
106
+ <parameter name="votes" type="string">
107
+ <param name="pattern">([\w-_]+,)*([\w-_]+)</param>
108
+ </parameter>
109
+ <parameter name="events" type="string">
110
+ <param name="pattern">([\w-_]+,)*([\w-_]+)</param>
111
+ </parameter>
112
+ </choice>
113
+ </oneOrMore>
114
+ </message>
115
+ <message name="acknowledgment">
116
+ <parameter name="key" type="string"/>
117
+ </message>
118
+
119
+ <message name="overview">
120
+ <parameter name="overview" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
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">
122
+ <start>
123
+ <element name="overview">
124
+ <element name="topics">
125
+ <empty/>
126
+ </element>
127
+ <element name="subscriptions">
128
+ <empty/>
129
+ </element>
130
+ </element>
131
+ </start>
132
+ </grammar>
133
+ </parameter>
134
+ </message>
135
+
136
+ <resource pattern="http://riddl.org/ns/common-patterns/notifications-producer/2.0">
137
+ <resource relative="notifications">
138
+ <get in="*" out="overview"/>
139
+ <resource relative="topics">
140
+ <get in="*" out="topics"/>
141
+ </resource>
142
+ <resource relative="subscriptions">
143
+ <get in="*" out="subscriptions"/>
144
+ <post in="subscribe" out="acknowledgment"/>
145
+ <resource>
146
+ <get out="subscription"/>
147
+ <put in="subscribe"/>
148
+ <delete/>
149
+ <resource relative="sse">
150
+ <sse/>
151
+ </resource>
152
+ </resource>
153
+ </resource>
154
+ </resource>
155
+ </resource>
156
+
157
+ </description>
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "riddl"
3
- s.version = "0.101.14"
3
+ s.version = "0.101.22"
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.2'
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.14
4
+ version: 0.101.22
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-06-25 00:00:00.000000000 Z
13
+ date: 2020-08-27 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.2'
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.2'
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,7 +447,9 @@ 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
452
+ - lib/ruby/riddl/ns/common-patterns/notifications-producer/2.0/producer.xml
445
453
  - lib/ruby/riddl/ns/common-patterns/oauth2-univie-app/1.0/app.xml
446
454
  - lib/ruby/riddl/ns/common-patterns/oauth2-univie-app/1.0/bearer-delete.xml
447
455
  - lib/ruby/riddl/ns/common-patterns/oauth2-univie-app/1.0/bearer-get.xml
@@ -500,7 +508,9 @@ files:
500
508
  - ns/common-patterns/addon-security/response.xml
501
509
  - ns/common-patterns/downloadify/1.0/downloadify.xml
502
510
  - ns/common-patterns/notifications-consumer/1.0/consumer.xml
511
+ - ns/common-patterns/notifications-consumer/2.0/consumer.xml
503
512
  - ns/common-patterns/notifications-producer/1.0/producer.xml
513
+ - ns/common-patterns/notifications-producer/2.0/producer.xml
504
514
  - ns/common-patterns/oauth2-univie-app/1.0/app.xml
505
515
  - ns/common-patterns/oauth2-univie-app/1.0/bearer-delete.xml
506
516
  - ns/common-patterns/oauth2-univie-app/1.0/bearer-get.xml