riddl 0.108 → 0.113
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 +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 +22 -3
- data/lib/ruby/riddl/protocols/sse.rb +1 -1
- data/lib/ruby/riddl/server.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 +22 -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">
|
|
@@ -96,7 +96,26 @@
|
|
|
96
96
|
</parameter>
|
|
97
97
|
</message>
|
|
98
98
|
|
|
99
|
-
<message name="
|
|
99
|
+
<message name="create_subscription">
|
|
100
|
+
<optional>
|
|
101
|
+
<parameter name="id" type="string"/>
|
|
102
|
+
</optional>
|
|
103
|
+
<optional>
|
|
104
|
+
<parameter name="url" type="string"/>
|
|
105
|
+
</optional>
|
|
106
|
+
<oneOrMore>
|
|
107
|
+
<parameter name="topic" type="string"/>
|
|
108
|
+
<choice>
|
|
109
|
+
<parameter name="votes" type="string">
|
|
110
|
+
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
|
111
|
+
</parameter>
|
|
112
|
+
<parameter name="events" type="string">
|
|
113
|
+
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
|
114
|
+
</parameter>
|
|
115
|
+
</choice>
|
|
116
|
+
</oneOrMore>
|
|
117
|
+
</message>
|
|
118
|
+
<message name="change_subscription">
|
|
100
119
|
<optional>
|
|
101
120
|
<parameter name="url" type="string"/>
|
|
102
121
|
</optional>
|
|
@@ -141,10 +160,10 @@
|
|
|
141
160
|
</resource>
|
|
142
161
|
<resource relative="subscriptions">
|
|
143
162
|
<get in="*" out="subscriptions"/>
|
|
144
|
-
<post in="
|
|
163
|
+
<post in="create_subscription" out="acknowledgment"/>
|
|
145
164
|
<resource>
|
|
146
165
|
<get out="subscription"/>
|
|
147
|
-
<put in="
|
|
166
|
+
<put in="change_subscription"/>
|
|
148
167
|
<delete/>
|
|
149
168
|
<resource relative="sse">
|
|
150
169
|
<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)
|
data/lib/ruby/riddl/server.rb
CHANGED
|
@@ -233,7 +233,7 @@ module Riddl
|
|
|
233
233
|
@riddl_res = Rack::Response.new
|
|
234
234
|
@riddl_status = 404
|
|
235
235
|
|
|
236
|
-
@riddl_pinfo = @riddl_env["PATH_INFO"].gsub(/\/+/,'/')
|
|
236
|
+
@riddl_pinfo = Riddl::Protocols::Utils::unescape(@riddl_env["PATH_INFO"].gsub(/\/+/,'/'))
|
|
237
237
|
@riddl_matching_path = @riddl_paths.find{ |e| @riddl_pinfo.match(e[1]).to_s.length == @riddl_pinfo.length }
|
|
238
238
|
|
|
239
239
|
if @riddl_matching_path
|
|
@@ -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">
|
|
@@ -96,7 +96,26 @@
|
|
|
96
96
|
</parameter>
|
|
97
97
|
</message>
|
|
98
98
|
|
|
99
|
-
<message name="
|
|
99
|
+
<message name="create_subscription">
|
|
100
|
+
<optional>
|
|
101
|
+
<parameter name="id" type="string"/>
|
|
102
|
+
</optional>
|
|
103
|
+
<optional>
|
|
104
|
+
<parameter name="url" type="string"/>
|
|
105
|
+
</optional>
|
|
106
|
+
<oneOrMore>
|
|
107
|
+
<parameter name="topic" type="string"/>
|
|
108
|
+
<choice>
|
|
109
|
+
<parameter name="votes" type="string">
|
|
110
|
+
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
|
111
|
+
</parameter>
|
|
112
|
+
<parameter name="events" type="string">
|
|
113
|
+
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
|
114
|
+
</parameter>
|
|
115
|
+
</choice>
|
|
116
|
+
</oneOrMore>
|
|
117
|
+
</message>
|
|
118
|
+
<message name="change_subscription">
|
|
100
119
|
<optional>
|
|
101
120
|
<parameter name="url" type="string"/>
|
|
102
121
|
</optional>
|
|
@@ -141,10 +160,10 @@
|
|
|
141
160
|
</resource>
|
|
142
161
|
<resource relative="subscriptions">
|
|
143
162
|
<get in="*" out="subscriptions"/>
|
|
144
|
-
<post in="
|
|
163
|
+
<post in="create_subscription" out="acknowledgment"/>
|
|
145
164
|
<resource>
|
|
146
165
|
<get out="subscription"/>
|
|
147
|
-
<put in="
|
|
166
|
+
<put in="change_subscription"/>
|
|
148
167
|
<delete/>
|
|
149
168
|
<resource relative="sse">
|
|
150
169
|
<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.113'
|
|
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
|