event_store_client 0.2.6 → 0.2.7

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
  SHA256:
3
- metadata.gz: f6283dff424c52805ce2a9808857d9689034852c929280ca0033bedcb17df955
4
- data.tar.gz: 05e13904e171a6b57188473b6c518d34d3edb852065271da01c6dc5ff2a02c05
3
+ metadata.gz: f82d6c3f0f05d70cafc2e28ace794847de37a8fddfdc8b2f60fe52cfb89d9cee
4
+ data.tar.gz: 85c7cbca113143890c843ba0e07f783eb3dd7754ff8c7ee92dff7e49abf69252
5
5
  SHA512:
6
- metadata.gz: 8a254af517856f58d5154d748bd6779f3dac58340d9ff6a984cb1088fa090eef88483bec247fdd8b3417d14836cceb31284f85e08544d9421d819ec3c4deb131
7
- data.tar.gz: da374d5d8ffdab4bd3e027cbec63be86b9efefd87de02329954014fcad342a1c854a4d77b86c4b78dd761da15257f42e7fb520b69273ffdd51dbaba75c8310d5
6
+ metadata.gz: ee4e7d182f5f6e1ce239020391ac71b62718e8c8d654b90345e015bd4246012f09c904bce11b33db1161f064a2e92a29276e784afb0d8ccc50756948ad01a780
7
+ data.tar.gz: da128977ff1fed3e55c92ed07fb881fcc9223b3d1a4b04ed0a4de279ede84f4f6290469914dd40baf3f12c41a06a1f6b8dd7bf9526f8414f15deeb39c9dde8f0
@@ -47,20 +47,18 @@ module EventStoreClient
47
47
  def read_all_from_stream(stream, direction: 'forward', start: 0, resolve_links: true)
48
48
  count = per_page
49
49
  events = []
50
+ entries = []
50
51
  failed_requests_count = 0
51
52
 
52
53
  while failed_requests_count < 3
53
54
  begin
54
- response =
55
+ entries =
55
56
  read(stream, start: start, direction: direction, resolve_links: resolve_links)
56
- failed_requests_count += 1 && next unless response.success? || response.status == 404
57
57
  rescue Faraday::ConnectionFailed
58
58
  failed_requests_count += 1
59
59
  next
60
60
  end
61
61
  failed_requests_count = 0
62
- break if response.body.nil? || response.body.empty?
63
- entries = JSON.parse(response.body)['entries']
64
62
  break if entries.empty?
65
63
  events += entries.map { |entry| deserialize_event(entry) }.reverse
66
64
  start += count
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EventStoreClient
4
- VERSION = '0.2.6'
4
+ VERSION = '0.2.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event_store_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Wilgosz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-17 00:00:00.000000000 Z
11
+ date: 2020-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-schema