riddl 0.109 → 0.114
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/twitter/twitter.xml +2 -2
- data/examples/zotero/client.rb +10 -7
- data/examples/zotero/litlist.html +511 -202
- data/lib/ruby/riddl/ns/common-patterns/notifications-consumer/2.0/consumer.xml +1 -4
- data/lib/ruby/riddl/ns/common-patterns/notifications-producer/2.0/producer.xml +25 -3
- data/lib/ruby/riddl/protocols/sse.rb +1 -1
- data/lib/ruby/riddl/wrapper/messageparser.rb +4 -2
- data/ns/common-patterns/notifications-consumer/2.0/consumer.xml +1 -4
- data/ns/common-patterns/notifications-producer/2.0/producer.xml +25 -3
- data/riddl.gemspec +1 -1
- metadata +3 -3
@@ -1,7 +1,7 @@
|
|
1
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
2
|
|
3
3
|
<message name="event">
|
4
|
-
<parameter name="
|
4
|
+
<parameter name="type" fixed="event"/>
|
5
5
|
<parameter name="topic" type="string">
|
6
6
|
<param name="pattern">[\w_/]+</param>
|
7
7
|
</parameter>
|
@@ -12,9 +12,6 @@
|
|
12
12
|
<parameter name="notification" type="string"/>
|
13
13
|
<parameter name="notification" mimetype="application/json"/>
|
14
14
|
</choice>
|
15
|
-
<optional>
|
16
|
-
<parameter name="fingerprint-with-consumer-secret" type="string"/>
|
17
|
-
</optional>
|
18
15
|
</message>
|
19
16
|
|
20
17
|
<message name="vote">
|
@@ -67,6 +67,9 @@
|
|
67
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
68
|
<start>
|
69
69
|
<element name="subscription">
|
70
|
+
<attribute name="id">
|
71
|
+
<data type="string"/>
|
72
|
+
</attribute>
|
70
73
|
<optional>
|
71
74
|
<attribute name="url">
|
72
75
|
<data type="string"/>
|
@@ -96,7 +99,26 @@
|
|
96
99
|
</parameter>
|
97
100
|
</message>
|
98
101
|
|
99
|
-
<message name="
|
102
|
+
<message name="create_subscription">
|
103
|
+
<optional>
|
104
|
+
<parameter name="id" type="string"/>
|
105
|
+
</optional>
|
106
|
+
<optional>
|
107
|
+
<parameter name="url" type="string"/>
|
108
|
+
</optional>
|
109
|
+
<oneOrMore>
|
110
|
+
<parameter name="topic" type="string"/>
|
111
|
+
<choice>
|
112
|
+
<parameter name="votes" type="string">
|
113
|
+
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
114
|
+
</parameter>
|
115
|
+
<parameter name="events" type="string">
|
116
|
+
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
117
|
+
</parameter>
|
118
|
+
</choice>
|
119
|
+
</oneOrMore>
|
120
|
+
</message>
|
121
|
+
<message name="change_subscription">
|
100
122
|
<optional>
|
101
123
|
<parameter name="url" type="string"/>
|
102
124
|
</optional>
|
@@ -141,10 +163,10 @@
|
|
141
163
|
</resource>
|
142
164
|
<resource relative="subscriptions">
|
143
165
|
<get in="*" out="subscriptions"/>
|
144
|
-
<post in="
|
166
|
+
<post in="create_subscription" out="acknowledgment"/>
|
145
167
|
<resource>
|
146
168
|
<get out="subscription"/>
|
147
|
-
<put in="
|
169
|
+
<put in="change_subscription"/>
|
148
170
|
<delete/>
|
149
171
|
<resource relative="sse">
|
150
172
|
<sse/>
|
@@ -33,7 +33,7 @@ module Riddl
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
def trigger_on_open(); @closed = false; @app.onopen;
|
36
|
+
def trigger_on_open(); @closed = false; res = @app.onopen; res ? true : false; end
|
37
37
|
def trigger_on_close; @closed = true; @app.onclose; end
|
38
38
|
|
39
39
|
def initialize(app, env)
|
@@ -55,9 +55,11 @@ module Riddl
|
|
55
55
|
|
56
56
|
if b.class == Riddl::Parameter::Simple && (a.attributes['fixed'] || a.attributes['type'])
|
57
57
|
b.name = a.attributes['name'] if @numparams == 1
|
58
|
-
if (b.name == a.attributes['name'] || a.attributes['name'] == '*')
|
58
|
+
if (b.name == a.attributes['name'] || a.attributes['name'] == '*') && match_simple(a,b.value)
|
59
59
|
@mistp += 1
|
60
|
-
return
|
60
|
+
return true
|
61
|
+
else
|
62
|
+
return false
|
61
63
|
end
|
62
64
|
end
|
63
65
|
if b.class == Riddl::Parameter::Complex && a.attributes['mimetype']
|
@@ -1,7 +1,7 @@
|
|
1
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
2
|
|
3
3
|
<message name="event">
|
4
|
-
<parameter name="
|
4
|
+
<parameter name="type" fixed="event"/>
|
5
5
|
<parameter name="topic" type="string">
|
6
6
|
<param name="pattern">[\w_/]+</param>
|
7
7
|
</parameter>
|
@@ -12,9 +12,6 @@
|
|
12
12
|
<parameter name="notification" type="string"/>
|
13
13
|
<parameter name="notification" mimetype="application/json"/>
|
14
14
|
</choice>
|
15
|
-
<optional>
|
16
|
-
<parameter name="fingerprint-with-consumer-secret" type="string"/>
|
17
|
-
</optional>
|
18
15
|
</message>
|
19
16
|
|
20
17
|
<message name="vote">
|
@@ -67,6 +67,9 @@
|
|
67
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
68
|
<start>
|
69
69
|
<element name="subscription">
|
70
|
+
<attribute name="id">
|
71
|
+
<data type="string"/>
|
72
|
+
</attribute>
|
70
73
|
<optional>
|
71
74
|
<attribute name="url">
|
72
75
|
<data type="string"/>
|
@@ -96,7 +99,26 @@
|
|
96
99
|
</parameter>
|
97
100
|
</message>
|
98
101
|
|
99
|
-
<message name="
|
102
|
+
<message name="create_subscription">
|
103
|
+
<optional>
|
104
|
+
<parameter name="id" type="string"/>
|
105
|
+
</optional>
|
106
|
+
<optional>
|
107
|
+
<parameter name="url" type="string"/>
|
108
|
+
</optional>
|
109
|
+
<oneOrMore>
|
110
|
+
<parameter name="topic" type="string"/>
|
111
|
+
<choice>
|
112
|
+
<parameter name="votes" type="string">
|
113
|
+
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
114
|
+
</parameter>
|
115
|
+
<parameter name="events" type="string">
|
116
|
+
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
117
|
+
</parameter>
|
118
|
+
</choice>
|
119
|
+
</oneOrMore>
|
120
|
+
</message>
|
121
|
+
<message name="change_subscription">
|
100
122
|
<optional>
|
101
123
|
<parameter name="url" type="string"/>
|
102
124
|
</optional>
|
@@ -141,10 +163,10 @@
|
|
141
163
|
</resource>
|
142
164
|
<resource relative="subscriptions">
|
143
165
|
<get in="*" out="subscriptions"/>
|
144
|
-
<post in="
|
166
|
+
<post in="create_subscription" out="acknowledgment"/>
|
145
167
|
<resource>
|
146
168
|
<get out="subscription"/>
|
147
|
-
<put in="
|
169
|
+
<put in="change_subscription"/>
|
148
170
|
<delete/>
|
149
171
|
<resource relative="sse">
|
150
172
|
<sse/>
|
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.114'
|
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: 2021-06-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.1.
|
551
|
+
rubygems_version: 3.1.6
|
552
552
|
signing_key:
|
553
553
|
specification_version: 4
|
554
554
|
summary: 'restful interface description and declaration language: tools and client/server
|