riddl 0.104 → 0.110
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/sse/description.xml +1 -1
- data/examples/sse/server.rb +2 -0
- data/lib/ruby/riddl/client.rb +1 -0
- data/lib/ruby/riddl/protocols/sse.rb +8 -4
- data/lib/ruby/riddl/server.rb +1 -1
- data/riddl.gemspec +2 -2
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 530c68cacbe96f742703ec8b367c6baa62d90548af6aea14353e88f2aeb30d6d
|
4
|
+
data.tar.gz: 2ba5cbca303588c53837c51f1f474503c22ca250a4e1fdb8e36e2ea43468062f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a844c39cdc3a53e7ee2899d8485bb508df0b02f3a7565336513d2f962a7f91bc2f7160872e3ce82c833e3ea2ecb99a594f212d630cd5da982a4a82904481f06
|
7
|
+
data.tar.gz: 45520300c67c0dcec6b5fcd257c3860d5fdc9fed998e12f9cc5d53447334a55d1a61547f1beeb2f1090039446c97bc45f0b6255906b5101bc8809edbd265d77d
|
data/examples/sse/server.rb
CHANGED
@@ -10,6 +10,8 @@ end
|
|
10
10
|
|
11
11
|
class Echo < Riddl::SSEImplementation
|
12
12
|
def onopen
|
13
|
+
// if true (or any object for that matter) is returned, then 200 is sent
|
14
|
+
// if false (or nil) is returned 404, the sse is denied
|
13
15
|
puts "Connection established"
|
14
16
|
Thread.new do
|
15
17
|
1.upto 10 do |i|
|
data/lib/ruby/riddl/client.rb
CHANGED
@@ -33,8 +33,8 @@ module Riddl
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
def trigger_on_open();
|
37
|
-
def trigger_on_close;
|
36
|
+
def trigger_on_open(); @closed = false; @app.onopen; end
|
37
|
+
def trigger_on_close; @closed = true; @app.onclose; end
|
38
38
|
|
39
39
|
def initialize(app, env)
|
40
40
|
@app = app
|
@@ -56,8 +56,12 @@ module Riddl
|
|
56
56
|
headers['Access-Control-Max-Age'] = '0'
|
57
57
|
end
|
58
58
|
EventMachine::next_tick {
|
59
|
-
|
60
|
-
|
59
|
+
if trigger_on_open
|
60
|
+
@env['async.callback'].call [200, headers, @body]
|
61
|
+
else
|
62
|
+
@body.fail
|
63
|
+
@env['async.callback'].call [404, headers, {}]
|
64
|
+
end
|
61
65
|
}
|
62
66
|
end
|
63
67
|
|
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
|
data/riddl.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "riddl"
|
3
|
-
s.version = "0.
|
3
|
+
s.version = "0.110"
|
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"
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
s.required_ruby_version = '>=2.2.0'
|
24
24
|
|
25
|
-
s.add_runtime_dependency 'daemonite', '~>0.
|
25
|
+
s.add_runtime_dependency 'daemonite', '~>0.6', '>=0.6.0'
|
26
26
|
s.add_runtime_dependency 'typhoeus', '~>1.3'
|
27
27
|
s.add_runtime_dependency 'xml-smart', '>=0.4.3', '~>0'
|
28
28
|
s.add_runtime_dependency 'rdf-smart', '>=0.0.160', '~>0'
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: riddl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.110'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen 'eTM' Mangler
|
8
8
|
- Florian 'Solo' Stertz
|
9
9
|
- Sonja Biedermann
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: tools
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-11-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: daemonite
|
@@ -18,20 +18,20 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '0.
|
21
|
+
version: '0.6'
|
22
22
|
- - ">="
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: 0.
|
24
|
+
version: 0.6.0
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
28
28
|
requirements:
|
29
29
|
- - "~>"
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version: '0.
|
31
|
+
version: '0.6'
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.
|
34
|
+
version: 0.6.0
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: typhoeus
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -533,7 +533,7 @@ homepage: http://www.wst.univie.ac.at/communities/riddl/
|
|
533
533
|
licenses:
|
534
534
|
- LGPL-3.0
|
535
535
|
metadata: {}
|
536
|
-
post_install_message:
|
536
|
+
post_install_message:
|
537
537
|
rdoc_options: []
|
538
538
|
require_paths:
|
539
539
|
- lib/ruby
|
@@ -548,8 +548,8 @@ 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.
|
552
|
-
signing_key:
|
551
|
+
rubygems_version: 3.1.4
|
552
|
+
signing_key:
|
553
553
|
specification_version: 4
|
554
554
|
summary: 'restful interface description and declaration language: tools and client/server
|
555
555
|
libs'
|