rails_event_store_active_record-legacy 0.33.0 → 0.34.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Makefile +2 -5
- data/lib/rails_event_store_active_record/legacy/event_repository.rb +1 -0
- data/lib/rails_event_store_active_record/legacy/generators/templates/{v1_v2_migration_template.rb → migrate_res_schema_v1_to_v2_template.rb} +2 -2
- data/lib/rails_event_store_active_record/legacy/generators/v1_v2_migration_generator.rb +1 -1
- data/lib/rails_event_store_active_record/legacy/version.rb +1 -1
- data/rails_event_store_active_record-legacy.gemspec +3 -3
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6a4b4cfcef98780421cb3ef00d00c651b683b0afa2d13b707cc93b413b87388
|
4
|
+
data.tar.gz: c63b133f980e3c7b1cab67358b39569327f67fd23f9c5f0fcf435715f5c3c25f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba3506c4355e379fe5eb4451dddb4b2e1e93b7b0b419b979e02fcee80f35ce049c777e384d55354d29ff9b717a703838696a9098562c0f2514a13b0d357a5e59
|
7
|
+
data.tar.gz: edff9c15954735d46d5cf532930da0e39c2b7ed60051b29f088420fea82844035c55d7b909c4ec674159a82ba24e1d68fe26891b5c13205d57ec7bde0adec61c
|
data/Makefile
CHANGED
@@ -8,18 +8,15 @@ DATABASE_URL ?= sqlite3::memory:
|
|
8
8
|
install: ## Install gem dependencies
|
9
9
|
@echo "Installing gem dependencies"
|
10
10
|
@bundle install
|
11
|
-
@
|
12
|
-
@BUNDLE_GEMFILE=spec/schema/Gemfile bundle install
|
11
|
+
@BUNDLE_GEMFILE=../lib/Gemfile.0_18_2 bundle install
|
13
12
|
|
14
13
|
remove-lock:
|
15
14
|
@echo "Removing resolved dependency versions"
|
16
15
|
-rm Gemfile.lock
|
17
|
-
-rm
|
18
|
-
|
16
|
+
-rm ../lib/Gemfile.0_18_2.lock
|
19
17
|
|
20
18
|
reinstall: remove-lock install ## Removing resolved dependency versions
|
21
19
|
|
22
|
-
|
23
20
|
test: ## Run unit tests
|
24
21
|
@echo "Running unit tests"
|
25
22
|
@BUNDLE_GEMFILE=Gemfile bundle exec rspec
|
@@ -58,6 +58,7 @@ instead:
|
|
58
58
|
def read(spec)
|
59
59
|
stream = LegacyEvent.order(id: order(spec))
|
60
60
|
stream = stream.where(event_id: spec.with_ids) if spec.with_ids?
|
61
|
+
stream = stream.where(event_type: spec.with_types) if spec.with_types?
|
61
62
|
stream = stream.limit(spec.limit) if spec.limit?
|
62
63
|
stream = stream.where(start_condition(spec)) unless spec.head?
|
63
64
|
stream = stream.where(stream: spec.stream.name) unless spec.stream.global?
|
@@ -21,7 +21,7 @@ class MigrateResSchemaV1ToV2 < ActiveRecord::Migration<%= migration_version %>
|
|
21
21
|
if postgres
|
22
22
|
t.references :event, null: false, type: :uuid
|
23
23
|
else
|
24
|
-
t.references :event, null: false, type: :string
|
24
|
+
t.references :event, null: false, type: :string, limit: 36
|
25
25
|
end
|
26
26
|
t.datetime :created_at, null: false
|
27
27
|
end
|
@@ -51,7 +51,6 @@ class MigrateResSchemaV1ToV2 < ActiveRecord::Migration<%= migration_version %>
|
|
51
51
|
add_index :event_store_events_in_streams, [:stream, :event_id], unique: true
|
52
52
|
add_index :event_store_events_in_streams, [:created_at]
|
53
53
|
|
54
|
-
remove_index :event_store_events, :event_type
|
55
54
|
remove_column :event_store_events, :stream
|
56
55
|
remove_column :event_store_events, :id
|
57
56
|
rename_column :event_store_events, :event_id, :id
|
@@ -71,6 +70,7 @@ class MigrateResSchemaV1ToV2 < ActiveRecord::Migration<%= migration_version %>
|
|
71
70
|
end
|
72
71
|
add_index :event_store_events, :id, unique: true if rails_42
|
73
72
|
add_index :event_store_events, :created_at
|
73
|
+
add_index :event_store_events, :event_type
|
74
74
|
execute <<-SQL
|
75
75
|
INSERT INTO event_store_events(id, event_type, metadata, data, created_at)
|
76
76
|
SELECT id, event_type, metadata, data, created_at FROM old_event_store_events;
|
@@ -9,7 +9,7 @@ module RailsEventStoreActiveRecord
|
|
9
9
|
source_root File.expand_path(File.join(File.dirname(__FILE__), '../generators/templates'))
|
10
10
|
|
11
11
|
def create_migration
|
12
|
-
template "
|
12
|
+
template "migrate_res_schema_v1_to_v2_template.rb", "db/migrate/#{timestamp}_migrate_res_schema_v1_to_v2.rb"
|
13
13
|
end
|
14
14
|
|
15
15
|
private
|
@@ -37,10 +37,10 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.add_development_dependency 'mysql2', '0.4.10'
|
38
38
|
spec.add_development_dependency 'fakefs', '~> 0.11.2'
|
39
39
|
spec.add_development_dependency 'childprocess'
|
40
|
-
spec.add_development_dependency 'mutant-rspec', '
|
40
|
+
spec.add_development_dependency 'mutant-rspec', '= 0.8.17'
|
41
41
|
|
42
|
-
spec.add_dependency 'ruby_event_store', '= 0.
|
43
|
-
spec.add_dependency 'rails_event_store_active_record', '= 0.
|
42
|
+
spec.add_dependency 'ruby_event_store', '= 0.34.0'
|
43
|
+
spec.add_dependency 'rails_event_store_active_record', '= 0.34.0'
|
44
44
|
spec.add_dependency 'activesupport', '>= 3.0'
|
45
45
|
spec.add_dependency 'activemodel', '>= 3.0'
|
46
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_event_store_active_record-legacy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.34.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arkency
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -140,14 +140,14 @@ dependencies:
|
|
140
140
|
name: mutant-rspec
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - '='
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: 0.8.17
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - '='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 0.8.17
|
153
153
|
- !ruby/object:Gem::Dependency
|
@@ -156,28 +156,28 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - '='
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.
|
159
|
+
version: 0.34.0
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - '='
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0.
|
166
|
+
version: 0.34.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rails_event_store_active_record
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - '='
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 0.
|
173
|
+
version: 0.34.0
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - '='
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 0.
|
180
|
+
version: 0.34.0
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: activesupport
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -220,7 +220,7 @@ files:
|
|
220
220
|
- README.md
|
221
221
|
- lib/rails_event_store_active_record/legacy.rb
|
222
222
|
- lib/rails_event_store_active_record/legacy/event_repository.rb
|
223
|
-
- lib/rails_event_store_active_record/legacy/generators/templates/
|
223
|
+
- lib/rails_event_store_active_record/legacy/generators/templates/migrate_res_schema_v1_to_v2_template.rb
|
224
224
|
- lib/rails_event_store_active_record/legacy/generators/v1_v2_migration_generator.rb
|
225
225
|
- lib/rails_event_store_active_record/legacy/version.rb
|
226
226
|
- rails_event_store_active_record-legacy.gemspec
|
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
248
|
version: '0'
|
249
249
|
requirements: []
|
250
250
|
rubyforge_project:
|
251
|
-
rubygems_version:
|
251
|
+
rubygems_version: 2.7.6
|
252
252
|
signing_key:
|
253
253
|
specification_version: 4
|
254
254
|
summary: Active Record events repository for Rails Event Store
|