falcon 0.36.0 → 0.36.1
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/.github/workflows/development.yml +20 -5
- data/Gemfile +1 -0
- data/README.md +1 -1
- data/lib/falcon/command/proxy.rb +3 -1
- data/lib/falcon/command/redirect.rb +3 -1
- data/lib/falcon/command/virtual.rb +6 -0
- data/lib/falcon/controller/serve.rb +1 -1
- data/lib/falcon/controller/virtual.rb +11 -2
- data/lib/falcon/version.rb +1 -1
- metadata +2 -3
- data/.travis.yml +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c7bbe842d0dcd1ed728989b357925217b7040179b2087e3a7c9ddd6bd5096c6
|
4
|
+
data.tar.gz: 5146d64c19b97d92da76a426cb318502cf6dc371fb2d38572075bc997612bf88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
-
|
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
|
-
-
|
37
|
+
- experimental: true
|
38
|
+
os: ubuntu
|
23
39
|
ruby: 2.7
|
24
40
|
env: BUNDLE_GEMFILE=gems/rack3.gemfile
|
25
|
-
-
|
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
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
|
-
[](https://github.com/socketry/falcon/actions?workflow=Development)
|
8
8
|
[](https://codeclimate.com/github/socketry/falcon)
|
9
9
|
[](https://coveralls.io/r/socketry/falcon)
|
10
10
|
[](https://gitter.im/socketry/falcon)
|
data/lib/falcon/command/proxy.rb
CHANGED
@@ -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",
|
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",
|
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
|
data/lib/falcon/version.rb
CHANGED
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.
|
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-
|
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
|
data/.travis.yml
DELETED
@@ -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
|