riddl 0.101.12 → 0.101.21

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: 109e837b2ce174314da92efbd082962a6e3fb73e7a165bf5067808986d220b41
4
- data.tar.gz: c04560d8388c750139cc45e972e5fb8da06ffe04db6eee5d6416a0e776231712
3
+ metadata.gz: 8fe8bf4d306c97df84542c2ae6e95d5f04645e692c6a7a7be84fc68e7d77de06
4
+ data.tar.gz: 31edb84266c10038fee94f3693a827612e1c4bc898a82ca56b873b85dc7e5704
5
5
  SHA512:
6
- metadata.gz: 99bad479ea3a0286e7a23987c2d7ba9c3dd7e539f6291754ff60e171192cda653e79010da8e8b4c6f6cc46f36dd145c6840617961d62964e94659e0c35e11068
7
- data.tar.gz: 4386b196c4521963f2224b4cb95e94bc1b77a9b8388f33534e9805cca69b53d74dfa280322fae7e668d19e73511acb12f7bbefe33156ea1175ca9d0acac8d14f
6
+ metadata.gz: a0071983512b4d9871cc9b40eb5da91398e5706719abeaad6480f277c3d1389200714dcb1fba10e4e5a20cee8ad87b04ce6bbe24d04f387e009f77336a82e762
7
+ data.tar.gz: f8fe87253a07a369560a2ee21af6a4f91bd88df9febc1a89f95da2111b84ae74fe0da813a95c7f099c6fc9504e3c8a1832eb9b15be3f9626fcb63c4920b61a95
@@ -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# }}}
@@ -469,7 +469,7 @@ module Riddl
469
469
  cpath = File.basename(child.path)
470
470
  subele = ele.find("p:" + cpath).first
471
471
  if subele
472
- subele.replace_by(child)
472
+ subele.replace_by_copy(child)
473
473
  else
474
474
  ele.add(child)
475
475
  end
@@ -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.12"
3
+ s.version = "0.101.21"
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.12
4
+ version: 0.101.21
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-08 00:00:00.000000000 Z
13
+ date: 2020-08-24 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