evt-message_store-event_store 0.1.0.1 → 0.1.0.2

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
  SHA1:
3
- metadata.gz: 4ff19d489f8ae08478bb093ec6d17fdc705ac794
4
- data.tar.gz: a0d60cc69585b89219a691d46a746f148b83fe5c
3
+ metadata.gz: fac23145e1ea2c7c1d8fd996606e1637722ba837
4
+ data.tar.gz: 5930e4fda4a0f03b6daed0a681aeae540b33e779
5
5
  SHA512:
6
- metadata.gz: 9cd0111a999a777da8d0edbba5ad81c65b2568eadd4b6939284fa07e41b119bf4b6c745a839a9f901012cf07e515dfd07afb58df735213105deb20dd84661615
7
- data.tar.gz: 877b64595397117abc0e7e381e0b7cd7ef0b79c9f755ea09ba721171cbd724c514eddc7085e0b45d6250b513a55654c51821c6a560d1005189664a8e147ece51
6
+ metadata.gz: afaabad5c2ca9a5daf978ef4a3d3f05cfb22f0a65c88b3efbdebd4be53145981569a69a843b130f85abe5768b67c7b6390818429824cd24c301a75e1b2ba9b1e
7
+ data.tar.gz: b05f7630ef3ab3dcbc90c4454b5e8a62dc5cf646281550e83fafad9780289313512975492cc5aec405c4de98506ec4f8ce52d6734002edeffe74fa8e001a56ae
@@ -2,24 +2,11 @@ module MessageStore
2
2
  module EventStore
3
3
  class Get
4
4
  class Last
5
- include Log::Dependency
6
-
7
- configure :get_last
5
+ include MessageStore::Get::Last
8
6
 
9
7
  dependency :read_stream, ::EventStore::HTTP::ReadStream
10
8
  dependency :session, Session
11
9
 
12
- def self.build(session: nil)
13
- instance = new
14
- instance.configure(session: session)
15
- instance
16
- end
17
-
18
- def self.call(stream_name, **build_arguments)
19
- instance = build(**build_arguments)
20
- instance.(stream_name)
21
- end
22
-
23
10
  def configure(session: nil)
24
11
  session = Session.configure(self, session: session)
25
12
 
@@ -33,8 +20,6 @@ module MessageStore
33
20
  end
34
21
 
35
22
  def call(stream_name)
36
- logger.trace { "Getting last message of stream (Stream Name: #{stream_name})" }
37
-
38
23
  begin
39
24
  message_data, * = read_stream.(
40
25
  stream_name,
@@ -45,8 +30,6 @@ module MessageStore
45
30
  rescue ::EventStore::HTTP::ReadStream::StreamNotFoundError
46
31
  end
47
32
 
48
- logger.debug { "Got last message of stream (Stream Name: #{stream_name}, Message Type: #{message_data&.type.inspect}, Position: #{message_data&.position.inspect}, Global Position: #{message_data&.global_position.inspect})" }
49
-
50
33
  message_data
51
34
  end
52
35
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-message_store-event_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.1
4
+ version: 0.1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-01 00:00:00.000000000 Z
11
+ date: 2017-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-event_store-http