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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf2ce761fe961a8a5a8e6427007be3bbe882ada827c366c89a6c1f6b20803538
4
- data.tar.gz: 3bac595cb42bc4c6eee5b3731979ea812426b309d511046c413caac91e612e16
3
+ metadata.gz: 3d9fc7ea8d8bf2ecbb8b35f6a76aa5962f4a12878e3777a3ae62914cd219dfb2
4
+ data.tar.gz: 9b83c5cc050cee1c6bf9019880b54e9179689135d53e09138648819ad3f0bec6
5
5
  SHA512:
6
- metadata.gz: 55a2923c02b53cee2d0cdbc59213f57a7ebbc254ba668e580f57373d36c664df4c81014c5409ed33eba55fc1893c45d15bc6e7cb174b354d0163938043fdf8c2
7
- data.tar.gz: 101e5db3f05438da0f1a6e9792dab8ada074bbbd98b7688049ae2bc97c790df8ea7e6a3f7f10d7194cae772c14d2cb2aa8111cf7b5f77b15dd51c18745f40820
6
+ metadata.gz: 8b1b0faad2845f854637a85bccc2f77ed9fe9426e6bf0a91d6211f8bc75921c8f9e9de7470334cff351577562255e9dc552f7cc5197bd2032207e3825037b970
7
+ data.tar.gz: ffe14cbbec5baed63e37c0f2a721ef8be77b6f05e1304184aaa1c1a461408e149705dfd7ed726cccb8aa4b5865710415be2158b5e1e25f177c0696314f293c6e
@@ -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
- app, options = Rack::Builder.parse_file(@options[:config])
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
- if verbose
73
- app = Verbose.new(app)
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
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Falcon
22
- VERSION = "0.16.0"
22
+ VERSION = "0.16.1"
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falcon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams