riddl 0.105 → 0.111

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: 5a9281315099f1f79cb26e07966c0b5ca62e1b453212d14bb1bc0dfb7fdc8e10
4
- data.tar.gz: c8ecbfea56bb9ef33309fac83d12be4903c0542dfefca7f65b1743d092816b45
3
+ metadata.gz: af5663795b156a2d01e5e032443482c39f249de5a0567ed3a7efc0f1666351be
4
+ data.tar.gz: 3af3fbc9ffd7667c1408d3d07d1f9d4204eb991a570d3523ffc55ee72b3e9890
5
5
  SHA512:
6
- metadata.gz: b0d30308234141020cc251d1f9031b4f70c95aeb20b95d6f16a06f6d918ff939c2166926825d3ec50c5de98eae20e23e324d5568f51a73412ae40f53d1d0b551
7
- data.tar.gz: 87cab038380f1e5a7414c8444b7bc836db31ed9007f4bf8c5a7cef32e5a4e821c4633bad4a4fcdcb107c024951bd54bab7550a238dca314f2f5c8962fd42dd0f
6
+ metadata.gz: 299b50d567fb8ac68c07395a0cdaa25a3a2113378093909e7210f0ce765070b222e49d412b8380107b938de8d5469b42e419958eb80add86daea7fe1916596dc
7
+ data.tar.gz: 9cc4cfa4cd46acdc65bb242b7e34a2c2e7b388006cb6f359168df42e00f8f17955ac336264d31ed4e56942a8bd7678484af7ad32fb6c37bb3db0ee961b7a8506
@@ -8,7 +8,7 @@
8
8
  <parameter name="age" type="integer"/>
9
9
  <parameter name="bla" type="string"/>
10
10
  </message>
11
- <message name=xxxxx">
11
+ <message name="xxxxx">
12
12
  <parameter name="degree" type="integer"/>
13
13
  <parameter name="bla" type="string"/>
14
14
  </message>
@@ -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|
@@ -16,6 +16,7 @@ require 'digest/md5'
16
16
 
17
17
  class StringIO #{{{
18
18
  def continue_timeout; nil; end
19
+ def empty?; size == 0; end
19
20
  end #}}}
20
21
 
21
22
  class SignalWait #{{{
@@ -33,8 +33,8 @@ module Riddl
33
33
  end
34
34
  end
35
35
 
36
- def trigger_on_open(); @closed = false; @app.onopen; end
37
- def trigger_on_close; @closed = true; @app.onclose; end
36
+ def trigger_on_open(); @closed = false; res = @app.onopen; res ? true : false; 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
- @env['async.callback'].call [200, headers, @body]
60
- trigger_on_open
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
 
@@ -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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "riddl"
3
- s.version = "0.105"
3
+ s.version = "0.111"
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"
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.105'
4
+ version: '0.111'
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-10-05 00:00:00.000000000 Z
13
+ date: 2020-11-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: daemonite
@@ -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.2
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'