falcon 0.33.10 → 0.33.11

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: 9004946e059feb6d57d8d638b996b22e76d0ce70a32dfadfd3061b93d9741178
4
- data.tar.gz: '0584dd8c92dbf14f6b2c93fb7aaca7d6aa41338073ad36b32791e63f5386ff0e'
3
+ metadata.gz: 126cc160e2be30fc68bbdd41d8a29ae4978e630be2e1df681fc979ec28d7cfe2
4
+ data.tar.gz: 0f0e01b8232344983294ad29217c84d270181f2e649500094fa9375348a7ea5a
5
5
  SHA512:
6
- metadata.gz: f462e350edba1d10bdec274181318aceecfc0435bdbdb504c0e139942288941777a1faf89ce37d7a876484fda0fae475d3f32ebb8e516eb9074013f25bb9bffe
7
- data.tar.gz: 0bda6f2395f53a49c2267e56d2a168be72ca4cbbce74ef56c4f4739d29b1849e1435ae944b4a26a4b2d24c1464427bab04d097db6366a8c8c31200a246917945
6
+ metadata.gz: 9f1c2adce3d3225fa452b12cee492923f24b0e39296ce1b99f1015a44f7df98a754d76cbd0bab0dcde6a037465b844c64f19958f270c307c2f7bc80bd242b4e5
7
+ data.tar.gz: 78fc6444b66562caded183f528adf374423987bb917fda205c233ada03b235547ac041173340e45b7749bb7ddfd231b47aeb80026e1f7dfc5da239e487c9ca93
@@ -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
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env -S falcon host
1
+ #!/usr/bin/env falcon-host
2
2
 
3
3
  load :rack, :self_signed_tls, :supervisor
4
4
 
@@ -1,9 +1,11 @@
1
- #!/usr/bin/env -S falcon host
1
+ #!/usr/bin/env falcon-host
2
2
 
3
3
  load :rack, :self_signed_tls, :supervisor
4
4
 
5
5
  rack 'hello.localhost', :self_signed_tls
6
6
 
7
+ supervisor
8
+
7
9
  # service 'jobs' do
8
10
  # shell ['rake', 'background:jobs:process']
9
11
  # end
@@ -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.45.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"
@@ -72,7 +72,7 @@ module Falcon
72
72
  end
73
73
 
74
74
  def call(container = Async::Container.new)
75
- container = run(container, parent.verbose?)
75
+ container = run(container, parent&.verbose?)
76
76
 
77
77
  container.wait(true)
78
78
  end
@@ -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
- def secure_endpoint
101
- Async::HTTP::Endpoint.parse(@options[:bind_secure])
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
@@ -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)
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Falcon
22
- VERSION = "0.33.10"
22
+ VERSION = "0.33.11"
23
23
  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.33.10
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-22 00:00:00.000000000 Z
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.45.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.45.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