ruby_event_store-rom 0.38.1 → 0.39.0

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: 6b32358dc46cd81f931545741801477145f954fdf3ac6c91be121539fa0360bb
4
- data.tar.gz: 1c95d4516466dcc7416aad2a096a2342ee12161bf11f6f0902db3ce77bc2388a
3
+ metadata.gz: '09d23ab19b18dde2c940ff44c4e801bd947dcd3b0084f1952ebb3e841c08764f'
4
+ data.tar.gz: 3b4a6944ee281dd7a19db514493f4854db851c3df5423309921247620c8378db
5
5
  SHA512:
6
- metadata.gz: 9338bf94b7876ee7f15bbd77ad1bf1ed08c2ceec48d84c3cd724c181bcb395e53d1aa034850bf533f3d5343ebeed7d2dadda930ff2e31750c24892554ba8018d
7
- data.tar.gz: ebd2180d96d9508d0ec85f425b74dc10c7df6877760696e8296525fc7d3aa167f131c2b5ff34a5587052a83ef2132345673f79d0743e142063466e60a7b70ce2
6
+ metadata.gz: bb6329728b35a4ead04583b6a9e4826b872253373931651b8421a0198917a2cea3a27365e5d401258579384d51b4901ada69f6439a4e8be5f33967377b6454fd
7
+ data.tar.gz: c8f94b6a130ba920b2391eac4548bcc6a384cbee518b13aee954a56bfb459ebe9a2daf98d3bff005278df10484713e45813383ca57a499bf2d81035577737751
data/Gemfile CHANGED
@@ -1,7 +1,8 @@
1
1
  source 'https://rubygems.org'
2
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
2
3
  gemspec
3
4
 
4
- eval_gemfile File.expand_path('../lib/Gemfile.shared', __dir__)
5
+ eval_gemfile File.expand_path('../support/bundler/Gemfile.shared', __dir__)
5
6
 
6
7
  gem 'childprocess'
7
8
  gem 'fakefs', '~> 0.11.2'
data/Makefile CHANGED
@@ -43,8 +43,8 @@ IGNORE = RubyEventStore::ROM::EventRepository\#initialize \
43
43
  SUBJECT ?= RubyEventStore::ROM*
44
44
  DATABASE_URL ?= sqlite::memory:
45
45
 
46
- include ../lib/install.mk
47
- include ../lib/test.mk
48
- include ../lib/mutant.mk
49
- include ../lib/gem.mk
50
- include ../lib/help.mk
46
+ include ../support/make/install.mk
47
+ include ../support/make/test.mk
48
+ include ../support/make/mutant.mk
49
+ include ../support/make/gem.mk
50
+ include ../support/make/help.mk
@@ -45,7 +45,7 @@ module RubyEventStore
45
45
  ).each
46
46
  else
47
47
  query = query_builder(query, limit: (specification.limit if specification.limit?))
48
- if specification.head? && !specification.stop
48
+ if !specification.start && !specification.stop
49
49
  specification.first? || specification.last? ? query.first : query.each
50
50
  elsif specification.last?
51
51
  query.to_ary.last
@@ -64,12 +64,12 @@ module RubyEventStore
64
64
  protected
65
65
 
66
66
  def read_scope(specification)
67
- offset_entry_id = stream_entries.by_stream_and_event_id(specification.stream, specification.start).fetch(:id) unless specification.head?
67
+ offset_entry_id = stream_entries.by_stream_and_event_id(specification.stream, specification.start).fetch(:id) if specification.start
68
68
  stop_entry_id = stream_entries.by_stream_and_event_id(specification.stream, specification.stop).fetch(:id) if specification.stop
69
69
 
70
70
  direction = specification.forward? ? :forward : :backward
71
71
 
72
- if specification.last? && specification.head? && !specification.stop
72
+ if specification.last? && !specification.start && !specification.stop
73
73
  direction = specification.forward? ? :backward : :forward
74
74
  end
75
75
 
@@ -1,5 +1,5 @@
1
1
  module RubyEventStore
2
2
  module ROM
3
- VERSION = "0.38.1"
3
+ VERSION = "0.39.0"
4
4
  end
5
5
  end
@@ -55,8 +55,8 @@ module RubyEventStore::ROM
55
55
 
56
56
  expect { repository.read(specification.stream('all').result) }.to raise_error(RubyEventStore::ReservedInternalName)
57
57
  expect { repository.read(specification.stream('all').backward.result) }.to raise_error(RubyEventStore::ReservedInternalName)
58
- expect { repository.read(specification.stream('all').from(:head).limit(5).result) }.to raise_error(RubyEventStore::ReservedInternalName)
59
- expect { repository.read(specification.stream('all').from(:head).limit(5).backward.result) }.to raise_error(RubyEventStore::ReservedInternalName)
58
+ expect { repository.read(specification.stream('all').limit(5).result) }.to raise_error(RubyEventStore::ReservedInternalName)
59
+ expect { repository.read(specification.stream('all').limit(5).backward.result) }.to raise_error(RubyEventStore::ReservedInternalName)
60
60
 
61
61
  expect { repository.count(specification.stream('all').result) }.to raise_error(RubyEventStore::ReservedInternalName)
62
62
  end
@@ -86,10 +86,10 @@ module RubyEventStore::ROM
86
86
  # remove_index :event_store_events_in_streams, [:stream, :position]
87
87
  # end
88
88
 
89
- expect(repository.read(specification.stream('stream').from(:head).limit(3).result).map(&:event_id)).to eq([u1, u2, u3])
89
+ expect(repository.read(specification.stream('stream').limit(3).result).map(&:event_id)).to eq([u1, u2, u3])
90
90
  expect(repository.read(specification.stream('stream').result).map(&:event_id)).to eq([u1, u2, u3])
91
91
 
92
- expect(repository.read(specification.stream('stream').backward.from(:head).limit(3).result).map(&:event_id)).to eq([u3, u2, u1])
92
+ expect(repository.read(specification.stream('stream').backward.limit(3).result).map(&:event_id)).to eq([u3, u2, u1])
93
93
  expect(repository.read(specification.stream('stream').backward.result).map(&:event_id)).to eq([u3, u2, u1])
94
94
  end
95
95
 
@@ -113,8 +113,8 @@ module RubyEventStore::ROM
113
113
 
114
114
  expect(repo.stream_entries.to_a.size).to eq(3)
115
115
 
116
- expect(repository.read(specification.from(:head).limit(3).result).map(&:event_id)).to eq([u1, u2, u3])
117
- expect(repository.read(specification.from(:head).limit(3).backward.result).map(&:event_id)).to eq([u3, u2, u1])
116
+ expect(repository.read(specification.limit(3).result).map(&:event_id)).to eq([u1, u2, u3])
117
+ expect(repository.read(specification.limit(3).backward.result).map(&:event_id)).to eq([u3, u2, u1])
118
118
  end
119
119
 
120
120
  specify 'nested transaction - events still not persisted if append failed' do
@@ -129,10 +129,10 @@ module RubyEventStore::ROM
129
129
  ], default_stream, RubyEventStore::ExpectedVersion.none)
130
130
  end.to raise_error(RubyEventStore::WrongExpectedEventVersion)
131
131
  expect(repository.has_event?('9bedf448-e4d0-41a3-a8cd-f94aec7aa763')).to be_falsey
132
- expect(repository.read(specification.from(:head).limit(2).result).to_a).to eq([event])
132
+ expect(repository.read(specification.limit(2).result).to_a).to eq([event])
133
133
  end
134
134
  expect(repository.has_event?('9bedf448-e4d0-41a3-a8cd-f94aec7aa763')).to be_falsey
135
- expect(repository.read(specification.from(:head).limit(2).result).to_a).to eq([event])
135
+ expect(repository.read(specification.limit(2).result).to_a).to eq([event])
136
136
  end
137
137
 
138
138
  def cleanup_concurrency_test
@@ -30,6 +30,6 @@ Gem::Specification.new do |spec|
30
30
  spec.add_dependency 'rom-changeset', '>= 1.0'
31
31
  spec.add_dependency 'rom-repository', '>= 2.0'
32
32
  spec.add_dependency 'rom-sql', '>= 2.4'
33
- spec.add_dependency 'ruby_event_store', '= 0.38.1'
33
+ spec.add_dependency 'ruby_event_store', '= 0.39.0'
34
34
  spec.add_dependency 'sequel', '>= 5.11.0'
35
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_event_store-rom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.38.1
4
+ version: 0.39.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Van Horn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-12 00:00:00.000000000 Z
11
+ date: 2019-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-initializer
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 0.38.1
103
+ version: 0.39.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 0.38.1
110
+ version: 0.39.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: sequel
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
196
  - !ruby/object:Gem::Version
197
197
  version: '0'
198
198
  requirements: []
199
- rubygems_version: 3.0.2
199
+ rubygems_version: 3.0.3
200
200
  signing_key:
201
201
  specification_version: 4
202
202
  summary: ROM events repository for Ruby Event Store