sus-fixtures-async-http 0.1.3 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/sus/fixtures/async/http/server_context.rb +7 -5
- data/lib/sus/fixtures/async/http/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac9ad49832d25a91d985c0f017f9c8708edb861fc177baf01f8a139ff6a008a8
|
4
|
+
data.tar.gz: 0e9f0d7e3ccb5b89f041f7eb48f550ff81c60dbac1b25c550e2c8c58bac711c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67d1a9da2fc742fb8c1445715e4ea71c2b2e8d4eadbdbbff4f56c4fa9632af86c5cba1c3bfce64dcfdf668d6e0dcca95fe00c9e2ca8a0c201cdae0e2e87986d9
|
7
|
+
data.tar.gz: 0105a58c8c314d97ba0429ebd6b0b1d4f04ee84c7d6d0ea08056c0390166170ea9aaeda835d4e57fd01e6a0286a6195f12b18eb129ac87e91f196c1051a95f51
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -14,8 +14,6 @@ module Sus::Fixtures
|
|
14
14
|
module ServerContext
|
15
15
|
include ReactorContext
|
16
16
|
|
17
|
-
def timeout = nil
|
18
|
-
|
19
17
|
def protocol
|
20
18
|
::Async::HTTP::Protocol::HTTP1
|
21
19
|
end
|
@@ -44,10 +42,14 @@ module Sus::Fixtures
|
|
44
42
|
@client
|
45
43
|
end
|
46
44
|
|
45
|
+
def client_endpoint
|
46
|
+
@client_endpoint
|
47
|
+
end
|
48
|
+
|
47
49
|
def before
|
48
50
|
# We bind the endpoint before running the server so that we know incoming connections will be accepted:
|
49
51
|
@bound_endpoint = ::Async::IO::SharedEndpoint.bound(endpoint)
|
50
|
-
@
|
52
|
+
@client_endpoint = @bound_endpoint.local_address_endpoint
|
51
53
|
|
52
54
|
# I feel a dedicated class might be better than this hack:
|
53
55
|
mock(@bound_endpoint) do |mock|
|
@@ -55,7 +57,7 @@ module Sus::Fixtures
|
|
55
57
|
mock.replace(:scheme) {endpoint.scheme}
|
56
58
|
end
|
57
59
|
|
58
|
-
mock(@
|
60
|
+
mock(@client_endpoint) do |mock|
|
59
61
|
mock.replace(:protocol) {endpoint.protocol}
|
60
62
|
mock.replace(:scheme) {endpoint.scheme}
|
61
63
|
mock.replace(:authority) {endpoint.authority}
|
@@ -65,7 +67,7 @@ module Sus::Fixtures
|
|
65
67
|
server.run
|
66
68
|
end
|
67
69
|
|
68
|
-
@client = ::Async::HTTP::Client.new(@
|
70
|
+
@client = ::Async::HTTP::Client.new(@client_endpoint, protocol: endpoint.protocol, retries: retries)
|
69
71
|
end
|
70
72
|
|
71
73
|
def after
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|