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 +4 -4
- data/lib/protocol/http/middleware/builder.rb +8 -6
- data/lib/protocol/http/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52e91627263ea1f1b1c1744372ca276042bc0b901b3eef0fbb45cb79e49daae8
|
4
|
+
data.tar.gz: 4bbf0d84e477382c6a42551f25b73bd2adac17ea78f649490beba2b0f8462866
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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, *
|
46
|
-
@use << proc {|app| middleware.new(app, *
|
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
|
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
|
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.
|
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-
|
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.
|
115
|
+
rubygems_version: 3.2.15
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: Provides abstractions to handle HTTP protocols.
|