falcon 0.16.0 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/falcon/command/serve.rb +13 -12
- data/lib/falcon/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d9fc7ea8d8bf2ecbb8b35f6a76aa5962f4a12878e3777a3ae62914cd219dfb2
|
4
|
+
data.tar.gz: 9b83c5cc050cee1c6bf9019880b54e9179689135d53e09138648819ad3f0bec6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b1b0faad2845f854637a85bccc2f77ed9fe9426e6bf0a91d6211f8bc75921c8f9e9de7470334cff351577562255e9dc552f7cc5197bd2032207e3825037b970
|
7
|
+
data.tar.gz: ffe14cbbec5baed63e37c0f2a721ef8be77b6f05e1304184aaa1c1a461408e149705dfd7ed726cccb8aa4b5865710415be2158b5e1e25f177c0696314f293c6e
|
data/lib/falcon/command/serve.rb
CHANGED
@@ -27,6 +27,8 @@ require 'async/io/trap'
|
|
27
27
|
require 'async/io/host_endpoint'
|
28
28
|
require 'async/io/shared_endpoint'
|
29
29
|
|
30
|
+
require 'async/http/middleware/builder'
|
31
|
+
|
30
32
|
require 'samovar'
|
31
33
|
|
32
34
|
require 'rack/builder'
|
@@ -58,19 +60,18 @@ module Falcon
|
|
58
60
|
end
|
59
61
|
|
60
62
|
def load_app(verbose)
|
61
|
-
|
62
|
-
|
63
|
-
# We adapt the rack app to `Async::HTTP::Middleware`:
|
64
|
-
app = Adapters::Rack.new(app)
|
65
|
-
|
66
|
-
# We buffer the input body but only for specific kinds of requests:
|
67
|
-
app = Adapters::Rewindable.new(app)
|
68
|
-
|
69
|
-
# We compress response bodies according to what the client expects:
|
70
|
-
app = Async::HTTP::ContentEncoding.new(app)
|
63
|
+
rack_app, options = Rack::Builder.parse_file(@options[:config])
|
71
64
|
|
72
|
-
|
73
|
-
|
65
|
+
app = Async::HTTP::Middleware.build do
|
66
|
+
if verbose
|
67
|
+
use Verbose
|
68
|
+
end
|
69
|
+
|
70
|
+
use Async::HTTP::ContentEncoding
|
71
|
+
use Adapters::Rewindable
|
72
|
+
use Adapters::Rack
|
73
|
+
|
74
|
+
run rack_app
|
74
75
|
end
|
75
76
|
|
76
77
|
return app, options
|
data/lib/falcon/version.rb
CHANGED