protocol-http 0.22.0 → 0.22.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: 3618371cb38127c249c684947eed20383453d437b5fcf00bbcadcb81cce6e96e
4
- data.tar.gz: a948eb7f70ffe1824491d354acd4b42f6540100f9bb8a788ed85bf5f30f538a8
3
+ metadata.gz: 52e91627263ea1f1b1c1744372ca276042bc0b901b3eef0fbb45cb79e49daae8
4
+ data.tar.gz: 4bbf0d84e477382c6a42551f25b73bd2adac17ea78f649490beba2b0f8462866
5
5
  SHA512:
6
- metadata.gz: 062aaccaeb9e2fc71505490fb263d78bbc1201983adf12011837d89194d22f0b6a75618caf3083e7ea93aa122603d8b348a53e28565560f5983d0eaa85f31b05
7
- data.tar.gz: f0d7eed0eb10015c066751781c2d3f64e0c965a3f0cd4dafa12504fca56013344134a9e513a36f0b3d2259f2c1c1e86fc8d496bb9ca19a1ee6d1b7c950a76f88
6
+ metadata.gz: c07409b15f91f5b3d3fcdaccaf2410fefd0fd513c1657dde0209c1aa4001a7c4ec15fc7843c4a403a089c37f0d2952c53300961e4bb1b8fd70b3a04876c31e6a
7
+ data.tar.gz: 3fb7f131549020cdfe0b79a0348fd14a8ee96f7acdbdd4f3faf9ce0781f9d48d21a006fbb2338764884795b822c7e6b0b10426a77a31d79f7110d721c1044f88
@@ -35,15 +35,13 @@ module Protocol
35
35
  end
36
36
 
37
37
  class Builder
38
- def initialize(default_app = NotFound, &block)
38
+ def initialize(default_app = NotFound)
39
39
  @use = []
40
40
  @app = default_app
41
-
42
- instance_eval(&block) if block_given?
43
41
  end
44
42
 
45
- def use(middleware, *args, &block)
46
- @use << proc {|app| middleware.new(app, *args, &block)}
43
+ def use(middleware, *arguments, **options, &block)
44
+ @use << proc {|app| middleware.new(app, *arguments, **options, &block)}
47
45
  end
48
46
 
49
47
  def run(app)
@@ -56,7 +54,11 @@ module Protocol
56
54
  end
57
55
 
58
56
  def self.build(&block)
59
- Builder.new(&block).to_app
57
+ builder = Builder.new
58
+
59
+ builder.instance_eval(&block)
60
+
61
+ return builder.to_app
60
62
  end
61
63
  end
62
64
  end
@@ -22,6 +22,6 @@
22
22
 
23
23
  module Protocol
24
24
  module HTTP
25
- VERSION = "0.22.0"
25
+ VERSION = "0.22.1"
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.22.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-23 00:00:00.000000000 Z
11
+ date: 2021-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  requirements: []
115
- rubygems_version: 3.1.2
115
+ rubygems_version: 3.2.15
116
116
  signing_key:
117
117
  specification_version: 4
118
118
  summary: Provides abstractions to handle HTTP protocols.