evt-event_store-http 0.1.0.4 → 0.1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/event_store/http/net_http/extensions.rb +7 -0
- data/lib/event_store/http/request.rb +15 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed6319a53ade148fe7b3c18b1a36fc92ea805bf9
|
4
|
+
data.tar.gz: 7ceb22dc954c090ebf6014c0b8bd0db0fa0baac3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc1e6685fb6c3b70f9621e524d471a62b179c4b0f0c555135757f9256f7eb7452c59f246f39a9cdf00f6357c22ab08165c5768261cbedca43802adec14d93e0c
|
7
|
+
data.tar.gz: bbbf26514cb9bdfa85d6442e3807b519bd323fd70b9f1ddbfd850cfb41e7923263611dba64276795cc0226595ac9e783926b307360467ba4bee07031274f9781
|
@@ -6,6 +6,7 @@ module EventStore
|
|
6
6
|
net_http.instance_exec do
|
7
7
|
extend DefaultHostHeader
|
8
8
|
extend IPAddress
|
9
|
+
extend IO
|
9
10
|
end
|
10
11
|
end
|
11
12
|
|
@@ -15,6 +16,12 @@ module EventStore
|
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
19
|
+
module IO
|
20
|
+
def io
|
21
|
+
@socket&.io
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
18
25
|
module IPAddress
|
19
26
|
def ip_address
|
20
27
|
if @socket.instance_of? Net::BufferedIO
|
@@ -43,6 +43,21 @@ module EventStore
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|
46
|
+
|
47
|
+
module Assertions
|
48
|
+
def session?(session, copy: nil)
|
49
|
+
return false unless connection.is_a? Session
|
50
|
+
return false unless connection.connect == session.connect
|
51
|
+
|
52
|
+
instancy_equality = connection.equal? session
|
53
|
+
|
54
|
+
if copy
|
55
|
+
!instancy_equality
|
56
|
+
else
|
57
|
+
instancy_equality
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
46
61
|
end
|
47
62
|
end
|
48
63
|
end
|