falcon 0.36.0 → 0.36.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28aa82ead35cc63c3a409d97839eadfc328f9464dfbb5c78481dabe35822b637
4
- data.tar.gz: dc2ea1d97d323132509a70d7b2a86910c57aa8f728faa73d8d4a624bfa69ee2b
3
+ metadata.gz: 7c7bbe842d0dcd1ed728989b357925217b7040179b2087e3a7c9ddd6bd5096c6
4
+ data.tar.gz: 5146d64c19b97d92da76a426cb318502cf6dc371fb2d38572075bc997612bf88
5
5
  SHA512:
6
- metadata.gz: 48b9092e315016c36756cb1d5863fd7ee938873770fd2a61e8566900b7e0ad8a7c6e17c7853d56b372745535ba63dbf116ca5ca773ca73106c3ee92b99cacd99
7
- data.tar.gz: e9c3f3541b89fe30b724e17f3fe953713252bfd945c69676c99e35e74a4ce2f52db8c1a098b2732db80e201f58225d647a935bb3ea996eaca7cc3dc7b666afef
6
+ metadata.gz: 478fc071519513bd45692777eced960c347d22733324d96b2b865d37b016aeeec884ac3216b54fdcc2a5f88134685e34b71c29f97d39bbf5e845de83fa247887
7
+ data.tar.gz: 01ed4d8cb611446ba398cdbd8fe6d66382a10dd5abf19bd49eefa5458e9e978ee42fbe45941bb2e5f1176a8e25e5d75607a8cc70abb96b580b66c7d23d3239f5
@@ -4,8 +4,13 @@ on: [push, pull_request]
4
4
 
5
5
  jobs:
6
6
  test:
7
+ runs-on: ${{matrix.os}}-latest
8
+ continue-on-error: ${{matrix.experimental}}
9
+
7
10
  strategy:
8
11
  matrix:
12
+ experimental: [false]
13
+
9
14
  os:
10
15
  - ubuntu
11
16
  - macos
@@ -16,18 +21,28 @@ jobs:
16
21
  - 2.7
17
22
 
18
23
  include:
19
- - os: 'ubuntu'
24
+ # - experimental: true
25
+ # os: ubuntu
26
+ # ruby: truffleruby
27
+ # - experimental: true
28
+ # os: ubuntu
29
+ # ruby: jruby
30
+ - experimental: true
31
+ os: ubuntu
32
+ ruby: head
33
+ - experimental: true
34
+ os: ubuntu
20
35
  ruby: 2.7
21
36
  env: BUNDLE_GEMFILE=gems/rack1.gemfile
22
- - os: 'ubuntu'
37
+ - experimental: true
38
+ os: ubuntu
23
39
  ruby: 2.7
24
40
  env: BUNDLE_GEMFILE=gems/rack3.gemfile
25
- - os: 'ubuntu'
41
+ - experimental: true
42
+ os: ubuntu
26
43
  ruby: 2.6
27
44
  env: COVERAGE=PartialSummary,Coveralls
28
45
 
29
- runs-on: ${{matrix.os}}-latest
30
-
31
46
  steps:
32
47
  - uses: actions/checkout@v1
33
48
  - uses: ruby/setup-ruby@v1
data/Gemfile CHANGED
@@ -6,6 +6,7 @@ gemspec
6
6
 
7
7
  # gem "async-container", path: "../async-container"
8
8
  # gem "async-websocket", path: "../async-websocket"
9
+ # gem "async-http", path: "../async-http"
9
10
 
10
11
  group :development do
11
12
  gem 'ruby-prof', platform: :mri
data/README.md CHANGED
@@ -4,7 +4,7 @@ Falcon is a multi-process, multi-fiber rack-compatible HTTP server built on top
4
4
 
5
5
  [Priority Business Support](#priority-business-support) is available.
6
6
 
7
- [![Build Status](https://travis-ci.com/socketry/falcon.svg?branch=master)](https://travis-ci.com/socketry/falcon)
7
+ [![Actions Status](https://github.com/socketry/falcon/workflows/Development/badge.svg)](https://github.com/socketry/falcon/actions?workflow=Development)
8
8
  [![Code Climate](https://codeclimate.com/github/socketry/falcon.svg)](https://codeclimate.com/github/socketry/falcon)
9
9
  [![Coverage Status](https://coveralls.io/repos/socketry/falcon/badge.svg)](https://coveralls.io/r/socketry/falcon)
10
10
  [![Gitter](https://badges.gitter.im/join.svg)](https://gitter.im/socketry/falcon)
@@ -32,6 +32,8 @@ module Falcon
32
32
 
33
33
  options do
34
34
  option '--bind <address>', "Bind to the given hostname/address", default: "https://[::]:443"
35
+
36
+ option '-t/--timeout <duration>', "Specify the maximum time to wait for non-blocking operations.", type: Float, default: nil
35
37
  end
36
38
 
37
39
  many :paths
@@ -62,7 +64,7 @@ module Falcon
62
64
  end
63
65
 
64
66
  def endpoint(**options)
65
- Async::HTTP::Endpoint.parse(@options[:bind], **options)
67
+ Async::HTTP::Endpoint.parse(@options[:bind], timeout: @options[:timeout], **options)
66
68
  end
67
69
  end
68
70
  end
@@ -33,6 +33,8 @@ module Falcon
33
33
  options do
34
34
  option '--bind <address>', "Bind to the given hostname/address", default: "http://[::]:80"
35
35
  option '--redirect <address>', "Redirect using this address as a template.", default: "https://[::]:443"
36
+
37
+ option '-t/--timeout <duration>', "Specify the maximum time to wait for non-blocking operations.", type: Float, default: nil
36
38
  end
37
39
 
38
40
  many :paths
@@ -63,7 +65,7 @@ module Falcon
63
65
  end
64
66
 
65
67
  def endpoint(**options)
66
- Async::HTTP::Endpoint.parse(@options[:bind], **options)
68
+ Async::HTTP::Endpoint.parse(@options[:bind], timeout: @options[:timeout], **options)
67
69
  end
68
70
 
69
71
  def redirect_endpoint(**options)
@@ -33,6 +33,8 @@ module Falcon
33
33
  options do
34
34
  option '--bind-insecure <address>', "Bind redirection to the given hostname/address", default: "http://[::]:80"
35
35
  option '--bind-secure <address>', "Bind proxy to the given hostname/address", default: "https://[::]:443"
36
+
37
+ option '-t/--timeout <duration>', "Specify the maximum time to wait for non-blocking operations.", type: Float, default: 30
36
38
  end
37
39
 
38
40
  many :paths
@@ -51,6 +53,10 @@ module Falcon
51
53
  @options[:bind_insecure]
52
54
  end
53
55
 
56
+ def timeout
57
+ @options[:timeout]
58
+ end
59
+
54
60
  def call
55
61
  Async.logger.info(self) do |buffer|
56
62
  buffer.puts "Falcon Virtual v#{VERSION} taking flight!"
@@ -69,7 +69,7 @@ module Falcon
69
69
  end
70
70
 
71
71
  def setup(container)
72
- container.run(name: self.name, restart: true, **@command.container_options) do |instance|
72
+ container.run(count: 1, name: self.name, restart: true, **@command.container_options) do |instance|
73
73
  Async do |task|
74
74
  # Load one app instance per container:
75
75
  app = self.load_app
@@ -78,11 +78,20 @@ module Falcon
78
78
  end
79
79
 
80
80
  container.spawn(name: "Falcon Redirector", restart: true, key: :redirect) do |instance|
81
- instance.exec(falcon_path, "redirect", "--bind", @command.bind_insecure, "--redirect", @command.bind_secure, *@command.paths, ready: false)
81
+ instance.exec(falcon_path, "redirect",
82
+ "--bind", @command.bind_insecure,
83
+ "--timeout", @command.timeout.to_s,
84
+ "--redirect", @command.bind_secure,
85
+ *@command.paths, ready: false
86
+ )
82
87
  end
83
88
 
84
89
  container.spawn(name: "Falcon Proxy", restart: true, key: :proxy) do |instance|
85
- instance.exec(falcon_path, "proxy", "--bind", @command.bind_secure, *@command.paths, ready: false)
90
+ instance.exec(falcon_path, "proxy",
91
+ "--bind", @command.bind_secure,
92
+ "--timeout", @command.timeout.to_s,
93
+ *@command.paths, ready: false
94
+ )
86
95
  end
87
96
  end
88
97
  end
@@ -21,5 +21,5 @@
21
21
  # THE SOFTWARE.
22
22
 
23
23
  module Falcon
24
- VERSION = "0.36.0"
24
+ VERSION = "0.36.1"
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falcon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.36.0
4
+ version: 0.36.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-08 00:00:00.000000000 Z
11
+ date: 2020-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async
@@ -276,7 +276,6 @@ files:
276
276
  - ".github/workflows/development.yml"
277
277
  - ".gitignore"
278
278
  - ".rspec"
279
- - ".travis.yml"
280
279
  - Gemfile
281
280
  - README.md
282
281
  - bake/falcon/supervisor.rb
@@ -1,41 +0,0 @@
1
- language: ruby
2
- dist: xenial
3
- cache: bundler
4
-
5
- addons:
6
- apt:
7
- packages:
8
- - wrk
9
- - apache2-utils
10
- homebrew:
11
- packages:
12
- - wrk
13
-
14
- script: bundle exec rspec
15
-
16
- after_script:
17
- - bundle exec rake benchmark:compare
18
-
19
- matrix:
20
- include:
21
- - rvm: 2.5
22
- - rvm: 2.6
23
- - rvm: 2.6
24
- gemfile: gems/rack1.gemfile
25
- - rvm: 2.6
26
- gemfile: gems/rack3.gemfile
27
- - rvm: 2.6
28
- env: COVERAGE=PartialSummary,Coveralls
29
- - rvm: 2.7
30
- - rvm: truffleruby
31
- - rvm: jruby-head
32
- env: JRUBY_OPTS="--debug -X+O"
33
- - rvm: ruby-head
34
- - rvm: 2.7
35
- os: osx
36
- allow_failures:
37
- - rvm: truffleruby
38
- - rvm: ruby-head
39
- - rvm: jruby-head
40
- - rvm: truffleruby
41
- - gemfile: gems/rack3.gemfile