falcon 0.33.10 → 0.33.11
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/bin/falcon-host +28 -0
- data/examples/beer/falcon.rb +1 -1
- data/examples/hello/falcon.rb +3 -1
- data/falcon.gemspec +1 -1
- data/lib/falcon/command/host.rb +1 -1
- data/lib/falcon/command/virtual.rb +15 -4
- data/lib/falcon/hosts.rb +0 -1
- data/lib/falcon/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 126cc160e2be30fc68bbdd41d8a29ae4978e630be2e1df681fc979ec28d7cfe2
|
|
4
|
+
data.tar.gz: 0f0e01b8232344983294ad29217c84d270181f2e649500094fa9375348a7ea5a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9f1c2adce3d3225fa452b12cee492923f24b0e39296ce1b99f1015a44f7df98a754d76cbd0bab0dcde6a037465b844c64f19958f270c307c2f7bc80bd242b4e5
|
|
7
|
+
data.tar.gz: 78fc6444b66562caded183f528adf374423987bb917fda205c233ada03b235547ac041173340e45b7749bb7ddfd231b47aeb80026e1f7dfc5da239e487c9ca93
|
data/bin/falcon-host
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in
|
|
13
|
+
# all copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
# THE SOFTWARE.
|
|
22
|
+
|
|
23
|
+
require_relative '../lib/falcon'
|
|
24
|
+
|
|
25
|
+
begin
|
|
26
|
+
Falcon::Command::Host.call
|
|
27
|
+
rescue Interrupt
|
|
28
|
+
end
|
data/examples/beer/falcon.rb
CHANGED
data/examples/hello/falcon.rb
CHANGED
data/falcon.gemspec
CHANGED
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
|
|
22
22
|
spec.add_dependency "async", "~> 1.13"
|
|
23
23
|
spec.add_dependency "async-io", "~> 1.22"
|
|
24
|
-
spec.add_dependency "async-http", "~> 0.
|
|
24
|
+
spec.add_dependency "async-http", "~> 0.46.0"
|
|
25
25
|
spec.add_dependency "async-container", "~> 0.14.0"
|
|
26
26
|
|
|
27
27
|
spec.add_dependency "rack", ">= 1.0"
|
data/lib/falcon/command/host.rb
CHANGED
|
@@ -82,6 +82,7 @@ module Falcon
|
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
hosts = Hosts.new(configuration)
|
|
85
|
+
|
|
85
86
|
hosts.run(container, **@options)
|
|
86
87
|
|
|
87
88
|
return container
|
|
@@ -93,12 +94,22 @@ module Falcon
|
|
|
93
94
|
container.wait
|
|
94
95
|
end
|
|
95
96
|
|
|
96
|
-
def insecure_endpoint
|
|
97
|
-
Async::HTTP::Endpoint.parse(@options[:bind_insecure])
|
|
97
|
+
def insecure_endpoint(**options)
|
|
98
|
+
Async::HTTP::Endpoint.parse(@options[:bind_insecure], **options)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def secure_endpoint(**options)
|
|
102
|
+
Async::HTTP::Endpoint.parse(@options[:bind_secure], **options)
|
|
98
103
|
end
|
|
99
104
|
|
|
100
|
-
|
|
101
|
-
|
|
105
|
+
# An endpoint suitable for connecting to the specified hostname.
|
|
106
|
+
def host_endpoint(hostname, **options)
|
|
107
|
+
endpoint = secure_endpoint(**options)
|
|
108
|
+
|
|
109
|
+
url = URI.parse(@options[:bind_secure])
|
|
110
|
+
url.hostname = hostname
|
|
111
|
+
|
|
112
|
+
return Async::HTTP::Endpoint.new(url, hostname: endpoint.hostname)
|
|
102
113
|
end
|
|
103
114
|
end
|
|
104
115
|
end
|
data/lib/falcon/hosts.rb
CHANGED
|
@@ -30,7 +30,6 @@ require 'async/http/endpoint'
|
|
|
30
30
|
|
|
31
31
|
module Falcon
|
|
32
32
|
class Hosts
|
|
33
|
-
DEFAULT_ALPN_PROTOCOLS = ['h2', 'http/1.1'].freeze
|
|
34
33
|
SERVER_CIPHERS = "EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5".freeze
|
|
35
34
|
|
|
36
35
|
def initialize(configuration)
|
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.33.
|
|
4
|
+
version: 0.33.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-06-
|
|
11
|
+
date: 2019-06-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: async
|
|
@@ -44,14 +44,14 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0.
|
|
47
|
+
version: 0.46.0
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 0.
|
|
54
|
+
version: 0.46.0
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: async-container
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -225,6 +225,7 @@ email:
|
|
|
225
225
|
- samuel.williams@oriontransfer.co.nz
|
|
226
226
|
executables:
|
|
227
227
|
- falcon
|
|
228
|
+
- falcon-host
|
|
228
229
|
extensions: []
|
|
229
230
|
extra_rdoc_files: []
|
|
230
231
|
files:
|
|
@@ -237,6 +238,7 @@ files:
|
|
|
237
238
|
- Rakefile
|
|
238
239
|
- VIRTUAL.md
|
|
239
240
|
- bin/falcon
|
|
241
|
+
- bin/falcon-host
|
|
240
242
|
- examples/beer/config.ru
|
|
241
243
|
- examples/beer/falcon.rb
|
|
242
244
|
- examples/benchmark/config.ru
|