async-http 0.27.1 → 0.27.2

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: 29e7c425f733a4ca0835844e9348f012847766a876edaeda46bb6cda9bcb75e3
4
- data.tar.gz: 988f79cdd1b7b30c9864f1d7f41a393fc19e6ddbcec4cc66bdd4273ac288c1db
3
+ metadata.gz: 36cc450006286215c770afb827d6eceed69ae22a8ad9c656e6a9b5c390725098
4
+ data.tar.gz: 8a503fce6425578681ce03921242f3f189ca041d3bcdb518a209cf7b22b1ef86
5
5
  SHA512:
6
- metadata.gz: 1a663c0840a0af98cba9fb9f50cbcd912255c0b1674a0d1ba576594f9a0c728a4d78ee435df8badc800253991cd66119f6b5c142c90de76408811e56661be91f
7
- data.tar.gz: 3fc0c94c16edfd99a31b120757bd5e8f67d9d7ef5a2902ef07e3649af2e5e28e394d589f3ce1d6d39cefa7019b40c549c86a2f5dc26c6e212ebb91b5f8f91462
6
+ metadata.gz: 17f315d6f0a473ef646bfbbb0fc2728243c275a8f14a85b1ee2f905a70542fdea28d08c30aeadac4eb4d979095a85579bc4c6046de75556555307954ab98ce53
7
+ data.tar.gz: 9c1af523d534885a18688acd8cd5304afa61551f104ad1650dc4a5558a04494341e8e33f44955fd4560d2a088333d8783577346d6a03fc0e92db4c319b7d3722
@@ -18,13 +18,24 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
 
21
+
22
+
21
23
  module Async
22
24
  module HTTP
23
25
  class Middleware
26
+ module NotFound
27
+ def self.close
28
+ end
29
+
30
+ def self.call(request)
31
+ Response[404, {}, []]
32
+ end
33
+ end
34
+
24
35
  class Builder
25
- def initialize(default_app = nil, &block)
36
+ def initialize(default_app = NotFound, &block)
26
37
  @use = []
27
- @run = default_app
38
+ @app = default_app
28
39
 
29
40
  instance_eval(&block) if block_given?
30
41
  end
@@ -38,7 +49,7 @@ module Async
38
49
  end
39
50
 
40
51
  def to_app
41
- app = @use.reverse.inject(app) {|app, use| use.call(app).freeze}
52
+ @use.reverse.inject(@app) {|app, use| use.call(app).freeze}
42
53
  end
43
54
  end
44
55
 
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module HTTP
23
- VERSION = "0.27.1"
23
+ VERSION = "0.27.2"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.1
4
+ version: 0.27.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-27 00:00:00.000000000 Z
11
+ date: 2018-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async