sus-fixtures-async-http 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/sus/fixtures/async/http/server_context.rb +7 -3
- 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: ee6d8ef3cde95bed688b17080244dbe31c1384ae130d48d3fb7bf4b3e2c5530a
|
4
|
+
data.tar.gz: 8bf80d2f089462c073e3f35c50b72471e4b4935c89e3f3624c0a1c40e238dd5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a24cec244482e9fbe9c93124dd55ffeb4140e6d13f718262730ec6d4cef12e20f0ea1640ad9d1eef5162620dce5504623a89bac3f2f9b3ff62ed63aaefc02ff4
|
7
|
+
data.tar.gz: 8005a829cd3c68dc6ee738fb48d8eced10daeec3716612ca50f5126ec1efbc09521a95dc54173e2b93cf6797d85aebe6f7b2be5f94f3f57885b43f059c2dad79
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -44,10 +44,14 @@ module Sus::Fixtures
|
|
44
44
|
@client
|
45
45
|
end
|
46
46
|
|
47
|
+
def client_endpoint
|
48
|
+
@address_endpoint
|
49
|
+
end
|
50
|
+
|
47
51
|
def before
|
48
52
|
# We bind the endpoint before running the server so that we know incoming connections will be accepted:
|
49
53
|
@bound_endpoint = ::Async::IO::SharedEndpoint.bound(endpoint)
|
50
|
-
@
|
54
|
+
@client_endpoint = @bound_endpoint.local_address_endpoint
|
51
55
|
|
52
56
|
# I feel a dedicated class might be better than this hack:
|
53
57
|
mock(@bound_endpoint) do |mock|
|
@@ -55,7 +59,7 @@ module Sus::Fixtures
|
|
55
59
|
mock.replace(:scheme) {endpoint.scheme}
|
56
60
|
end
|
57
61
|
|
58
|
-
mock(@
|
62
|
+
mock(@client_endpoint) do |mock|
|
59
63
|
mock.replace(:protocol) {endpoint.protocol}
|
60
64
|
mock.replace(:scheme) {endpoint.scheme}
|
61
65
|
mock.replace(:authority) {endpoint.authority}
|
@@ -65,7 +69,7 @@ module Sus::Fixtures
|
|
65
69
|
server.run
|
66
70
|
end
|
67
71
|
|
68
|
-
@client = ::Async::HTTP::Client.new(@
|
72
|
+
@client = ::Async::HTTP::Client.new(@client_endpoint, protocol: endpoint.protocol, retries: retries)
|
69
73
|
end
|
70
74
|
|
71
75
|
def after
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|