falcon 0.26.0 → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -9
- data/bin/falcon +1 -1
- data/falcon.gemspec +1 -1
- data/lib/falcon/command.rb +8 -8
- data/lib/falcon/command/serve.rb +1 -1
- data/lib/falcon/command/virtual.rb +1 -1
- data/lib/falcon/configuration.rb +7 -1
- data/lib/falcon/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d8f6d04def38b5f391b3cdcc17935b06612a9c95137bfaf563c58ac21cc0edc
|
4
|
+
data.tar.gz: '085234503af9930b2d0a9bf7430673bb896456c2093cc627eee83fb7a6d9e1a3'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41223e695feb4428ef06b260dd4b4a178c35f8889708198f5f94f4f598b6322b2c0d431e0268372debe54fd670fdb146efa2126295d8022a956a4878dd9ce095
|
7
|
+
data.tar.gz: 33728e72a25355cb7025b0ae1c4f4883fc200251d82fe8d7ee1011c240ec9f49769c601a95da80801736a6cfeb3c1f78f3d499ac9c013425cc82c27c90987016
|
data/README.md
CHANGED
@@ -52,7 +52,7 @@ falcon [--verbose | --quiet] [-h/--help] [-v/--version] <command>
|
|
52
52
|
An asynchronous HTTP server.
|
53
53
|
|
54
54
|
[--verbose | --quiet] Verbosity of output for debugging.
|
55
|
-
[-h/--help] Print out help information.
|
55
|
+
[-h/--help] Print out help information.
|
56
56
|
[-v/--version] Print out the application version.
|
57
57
|
<command> One of: serve, virtual. Default: serve
|
58
58
|
|
@@ -60,15 +60,16 @@ falcon [--verbose | --quiet] [-h/--help] [-v/--version] <command>
|
|
60
60
|
Run an HTTP server.
|
61
61
|
|
62
62
|
[-b/--bind <address>] Bind to the given hostname/address Default: https://localhost:9292
|
63
|
-
[-p/--port <number>] Override the specified port
|
63
|
+
[-p/--port <number>] Override the specified port
|
64
64
|
[-h/--hostname <hostname>] Specify the hostname which would be used for certificates, etc.
|
65
|
-
[-t/--timeout <duration>] Specify the maximum time to wait for blocking operations. Default: 60
|
66
|
-
[--reuse-port] Enable SO_REUSEPORT if possible. Default: false
|
67
|
-
[-c/--config <path>] Rackup configuration file to load Default: config.ru
|
68
|
-
[--forked | --threaded | --hybrid] Select a specific parallelism model Default: forked
|
69
|
-
[-n/--count <count>] Number of instances to start. Default: 8
|
70
|
-
[--forks <count>] Number of forks (hybrid only).
|
71
|
-
[--threads <count>] Number of threads (hybrid only).
|
65
|
+
[-t/--timeout <duration>] Specify the maximum time to wait for blocking operations. Default: 60
|
66
|
+
[--reuse-port] Enable SO_REUSEPORT if possible. Default: false
|
67
|
+
[-c/--config <path>] Rackup configuration file to load Default: config.ru
|
68
|
+
[--forked | --threaded | --hybrid] Select a specific parallelism model Default: forked
|
69
|
+
[-n/--count <count>] Number of instances to start. Default: 8
|
70
|
+
[--forks <count>] Number of forks (hybrid only).
|
71
|
+
[--threads <count>] Number of threads (hybrid only).
|
72
|
+
```
|
72
73
|
|
73
74
|
To run on a different port:
|
74
75
|
|
data/bin/falcon
CHANGED
data/falcon.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
spec.add_dependency "rack", ">= 1.0"
|
27
27
|
|
28
|
-
spec.add_dependency 'samovar', "~> 1
|
28
|
+
spec.add_dependency 'samovar', "~> 2.1"
|
29
29
|
spec.add_dependency 'localhost', "~> 1.1"
|
30
30
|
spec.add_dependency 'build-environment', '~> 1.6'
|
31
31
|
|
data/lib/falcon/command.rb
CHANGED
@@ -28,8 +28,8 @@ require 'logger'
|
|
28
28
|
|
29
29
|
module Falcon
|
30
30
|
module Command
|
31
|
-
def self.
|
32
|
-
Top.
|
31
|
+
def self.call(*args)
|
32
|
+
Top.call(*args)
|
33
33
|
end
|
34
34
|
|
35
35
|
class Top < Samovar::Command
|
@@ -41,7 +41,7 @@ module Falcon
|
|
41
41
|
option '-v/--version', "Print out the application version."
|
42
42
|
end
|
43
43
|
|
44
|
-
nested
|
44
|
+
nested :command, {
|
45
45
|
'serve' => Serve,
|
46
46
|
'virtual' => Virtual
|
47
47
|
}, default: 'serve'
|
@@ -54,7 +54,7 @@ module Falcon
|
|
54
54
|
@options[:logging] == :quiet
|
55
55
|
end
|
56
56
|
|
57
|
-
def
|
57
|
+
def call
|
58
58
|
if verbose?
|
59
59
|
Async.logger.level = Logger::DEBUG
|
60
60
|
elsif quiet?
|
@@ -64,11 +64,11 @@ module Falcon
|
|
64
64
|
end
|
65
65
|
|
66
66
|
if @options[:version]
|
67
|
-
puts "
|
68
|
-
elsif @options[:help]
|
69
|
-
print_usage
|
67
|
+
puts "#{self.name} v#{Falcon::VERSION}"
|
68
|
+
elsif @options[:help]
|
69
|
+
self.print_usage
|
70
70
|
else
|
71
|
-
@command.
|
71
|
+
@command.call
|
72
72
|
end
|
73
73
|
end
|
74
74
|
end
|
data/lib/falcon/command/serve.rb
CHANGED
data/lib/falcon/configuration.rb
CHANGED
@@ -94,6 +94,12 @@ module Falcon
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
+
add(:lets_encrypt, :ssl) do
|
98
|
+
lets_encrypt_root '/etc/letsencrypt/live'
|
99
|
+
ssl_certificate_path {File.join(lets_encrypt_root, authority, "fullchain.pem")}
|
100
|
+
ssl_private_key_path {File.join(lets_encrypt_root, authority, "privkey.pem")}
|
101
|
+
end
|
102
|
+
|
97
103
|
add(:self_signed, :ssl) do
|
98
104
|
ssl_context do
|
99
105
|
contexts = Localhost::Authority.fetch(authority)
|
@@ -189,7 +195,7 @@ module Falcon
|
|
189
195
|
end
|
190
196
|
|
191
197
|
def load_file(path)
|
192
|
-
self.instance_eval(File.read(path), path)
|
198
|
+
self.instance_eval(File.read(path), File.realpath(path))
|
193
199
|
end
|
194
200
|
end
|
195
201
|
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.
|
4
|
+
version: 0.27.0
|
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-03-
|
11
|
+
date: 2019-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http-protocol
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1
|
103
|
+
version: '2.1'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '1
|
110
|
+
version: '2.1'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: localhost
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -321,7 +321,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
321
321
|
- !ruby/object:Gem::Version
|
322
322
|
version: '0'
|
323
323
|
requirements: []
|
324
|
-
rubygems_version: 3.0.
|
324
|
+
rubygems_version: 3.0.3
|
325
325
|
signing_key:
|
326
326
|
specification_version: 4
|
327
327
|
summary: A fast, asynchronous, rack-compatible web server.
|