riddl 0.107 → 0.108
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/sse/server.rb +2 -0
- data/lib/ruby/riddl/protocols/sse.rb +6 -2
- data/riddl.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba99e4436e3ca77f2ccd22e783ced04c42b84a2a3a90e5dc767b3912a0fe15b5
|
4
|
+
data.tar.gz: e6b7abac2cd99448e958a61748b2e16c39896747fb4011921ca67f2b53ac6ae1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3855116333b18322255d788c92e3003c37813167266d24d15ca4d048113b4c57014c5eb8d8048e8492679a42f585bc86dcd04aee0d60982a135d4a4761adf946
|
7
|
+
data.tar.gz: c81120e0746794963fbe8c59498eb5fe15330c63149144a3800d6477402b7b41d88b710786ddf55b266737933a07737cd3f537a622d1533e1e09d45907161149
|
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|
|
@@ -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/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.108'
|
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-10-
|
13
|
+
date: 2020-10-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: daemonite
|