sequent 3.3.1 → 3.4.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: 68422698850db5ac4fa36b805bec257d00d40e1937ae736359b423104e7486fc
4
- data.tar.gz: 868cd1cc45201cb6b7d9cbaec96ec2de6053a4b8b1f55ac5aa4b00f0bee32755
3
+ metadata.gz: 2a5a7fbe148700d4a9dcc94486ae59c237043bd824cac58cc40d65ca61f6c86e
4
+ data.tar.gz: da13d594f5145355f85a9e02877b9c9137b5fc66757c4b1a1c318801f87065eb
5
5
  SHA512:
6
- metadata.gz: 0eec0c36ffc290976c7654ca6aa69f6b473e093303c465f92b25653426deabd186ed80cda350af0808faa978b2d1488861e92308fde5b35319c42731e5dd1a3e
7
- data.tar.gz: 5649b65b48cca40d22dd6c375d48b46389d2cdcddcbe75ec0079ece9d12a4cdb4b3456470f032a16a16b0b0c27011b7ee5337b65c1e91a2b684566474054f3d5
6
+ metadata.gz: effaa48077d9f375b804f35dfd1b51165cf919fdafeb2677a03173d8678228b8e6b3d08664ad23189cf88cbe2b3e54c8c62676cc9f70498c7a01f4c303434ba9
7
+ data.tar.gz: 456a50e34447a5c1dd429c470b4ba4e75cb7f1b6cf7bb3392da5577057097de79b1b2331d09dd896640aaba4424d347cc3af7bf8aac660195fd4c5dec562d6c3
@@ -1,4 +1 @@
1
- require_relative './generator/project'
2
- require_relative './generator/aggregate'
3
- require_relative './generator/command'
4
- require_relative './generator/event'
1
+ require_relative './generator/generator'
@@ -0,0 +1,4 @@
1
+ require_relative 'aggregate'
2
+ require_relative 'command'
3
+ require_relative 'project'
4
+ require_relative 'event'
@@ -54,7 +54,7 @@ module Sequent
54
54
  end
55
55
 
56
56
  def name_camelized
57
- @name_camelized ||= name.camelize
57
+ @name_camelized ||= name.gsub(/\W/, '_').squeeze('_').camelize
58
58
  end
59
59
  end
60
60
  end
@@ -1,5 +1,5 @@
1
1
  source "https://rubygems.org"
2
- ruby "2.5.1"
2
+ ruby "2.6.5"
3
3
 
4
4
  gem 'rake'
5
5
  # let's use the latest and greatest
@@ -6,7 +6,6 @@ require_relative 'core/aggregate_root'
6
6
  require_relative 'core/projector'
7
7
  require_relative 'core/workflow'
8
8
  require_relative 'core/value_object'
9
- require_relative 'generator'
10
9
  require_relative 'migrations/migrations'
11
10
 
12
11
  module Sequent
@@ -47,7 +47,7 @@ module Sequent
47
47
  def self.create_schema(schema)
48
48
  sql = "CREATE SCHEMA IF NOT EXISTS #{schema}"
49
49
  if user = ActiveRecord::Base.connection_config[:username]
50
- sql += " AUTHORIZATION #{user}"
50
+ sql += %Q{ AUTHORIZATION "#{user}"}
51
51
  end
52
52
  execute_sql(sql)
53
53
  end
@@ -61,8 +61,13 @@ module Sequent
61
61
 
62
62
  disconnect!
63
63
  original_search_paths = db_config['schema_search_path'].dup
64
- ActiveRecord::Base.configurations[env.to_s] = ActiveSupport::HashWithIndifferentAccess.new(db_config).stringify_keys
64
+
65
+ if ActiveRecord::VERSION::MAJOR < 6
66
+ ActiveRecord::Base.configurations[env.to_s] = ActiveSupport::HashWithIndifferentAccess.new(db_config).stringify_keys
67
+ end
68
+
65
69
  db_config['schema_search_path'] = search_path
70
+
66
71
  ActiveRecord::Base.establish_connection db_config
67
72
 
68
73
  yield
@@ -94,9 +99,11 @@ module Sequent
94
99
  self.class.execute_sql(sql)
95
100
  end
96
101
 
97
- def migrate(migrations_path, verbose: true)
102
+ def migrate(migrations_path, schema_migration: ActiveRecord::SchemaMigration, verbose: true)
98
103
  ActiveRecord::Migration.verbose = verbose
99
- if ActiveRecord::VERSION::MAJOR >= 5 && ActiveRecord::VERSION::MINOR >= 2
104
+ if ActiveRecord::VERSION::MAJOR >= 6
105
+ ActiveRecord::MigrationContext.new([migrations_path], schema_migration).up
106
+ elsif ActiveRecord::VERSION::MAJOR >= 5 && ActiveRecord::VERSION::MINOR >= 2
100
107
  ActiveRecord::MigrationContext.new([migrations_path]).up
101
108
  else
102
109
  ActiveRecord::Migrator.migrate(migrations_path)
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sequent
2
- VERSION = '3.3.1'
2
+ VERSION = '3.4.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequent
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Vonk
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2019-10-02 00:00:00.000000000 Z
15
+ date: 2019-12-09 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activerecord
@@ -21,9 +21,9 @@ dependencies:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
23
  version: '5.0'
24
- - - "<"
24
+ - - "<="
25
25
  - !ruby/object:Gem::Version
26
- version: '5.3'
26
+ version: '6.0'
27
27
  type: :runtime
28
28
  prerelease: false
29
29
  version_requirements: !ruby/object:Gem::Requirement
@@ -31,9 +31,9 @@ dependencies:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '5.0'
34
- - - "<"
34
+ - - "<="
35
35
  - !ruby/object:Gem::Version
36
- version: '5.3'
36
+ version: '6.0'
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: activemodel
39
39
  requirement: !ruby/object:Gem::Requirement
@@ -41,9 +41,9 @@ dependencies:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: '5.0'
44
- - - "<"
44
+ - - "<="
45
45
  - !ruby/object:Gem::Version
46
- version: '5.3'
46
+ version: '6.0'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
@@ -51,23 +51,23 @@ dependencies:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: '5.0'
54
- - - "<"
54
+ - - "<="
55
55
  - !ruby/object:Gem::Version
56
- version: '5.3'
56
+ version: '6.0'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: pg
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: '1.0'
63
+ version: '1.1'
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: '1.0'
70
+ version: '1.1'
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: postgresql_cursor
73
73
  requirement: !ruby/object:Gem::Requirement
@@ -88,42 +88,42 @@ dependencies:
88
88
  requirements:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
- version: '3.0'
91
+ version: '3'
92
92
  type: :runtime
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - "~>"
97
97
  - !ruby/object:Gem::Version
98
- version: '3.0'
98
+ version: '3'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: thread_safe
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - "~>"
104
104
  - !ruby/object:Gem::Version
105
- version: 0.3.5
105
+ version: 0.3.6
106
106
  type: :runtime
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - "~>"
111
111
  - !ruby/object:Gem::Version
112
- version: 0.3.5
112
+ version: 0.3.6
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: parallel
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - "~>"
118
118
  - !ruby/object:Gem::Version
119
- version: 1.12.1
119
+ version: '1.17'
120
120
  type: :runtime
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - "~>"
125
125
  - !ruby/object:Gem::Version
126
- version: 1.12.1
126
+ version: '1.17'
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: bcrypt
129
129
  requirement: !ruby/object:Gem::Requirement
@@ -144,28 +144,28 @@ dependencies:
144
144
  requirements:
145
145
  - - "~>"
146
146
  - !ruby/object:Gem::Version
147
- version: '2.5'
147
+ version: 2.6.5
148
148
  type: :runtime
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
152
  - - "~>"
153
153
  - !ruby/object:Gem::Version
154
- version: '2.5'
154
+ version: 2.6.5
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: rspec
157
157
  requirement: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - "~>"
160
160
  - !ruby/object:Gem::Version
161
- version: '3.2'
161
+ version: '3.8'
162
162
  type: :development
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
166
  - - "~>"
167
167
  - !ruby/object:Gem::Version
168
- version: '3.2'
168
+ version: '3.8'
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: timecop
171
171
  requirement: !ruby/object:Gem::Requirement
@@ -186,70 +186,70 @@ dependencies:
186
186
  requirements:
187
187
  - - "~>"
188
188
  - !ruby/object:Gem::Version
189
- version: '3.2'
189
+ version: '3.8'
190
190
  type: :development
191
191
  prerelease: false
192
192
  version_requirements: !ruby/object:Gem::Requirement
193
193
  requirements:
194
194
  - - "~>"
195
195
  - !ruby/object:Gem::Version
196
- version: '3.2'
196
+ version: '3.8'
197
197
  - !ruby/object:Gem::Dependency
198
198
  name: rspec-collection_matchers
199
199
  requirement: !ruby/object:Gem::Requirement
200
200
  requirements:
201
201
  - - "~>"
202
202
  - !ruby/object:Gem::Version
203
- version: '1.1'
203
+ version: '1.2'
204
204
  type: :development
205
205
  prerelease: false
206
206
  version_requirements: !ruby/object:Gem::Requirement
207
207
  requirements:
208
208
  - - "~>"
209
209
  - !ruby/object:Gem::Version
210
- version: '1.1'
210
+ version: '1.2'
211
211
  - !ruby/object:Gem::Dependency
212
212
  name: rake
213
213
  requirement: !ruby/object:Gem::Requirement
214
214
  requirements:
215
215
  - - "~>"
216
216
  - !ruby/object:Gem::Version
217
- version: '10.4'
217
+ version: '13'
218
218
  type: :development
219
219
  prerelease: false
220
220
  version_requirements: !ruby/object:Gem::Requirement
221
221
  requirements:
222
222
  - - "~>"
223
223
  - !ruby/object:Gem::Version
224
- version: '10.4'
224
+ version: '13'
225
225
  - !ruby/object:Gem::Dependency
226
226
  name: pry
227
227
  requirement: !ruby/object:Gem::Requirement
228
228
  requirements:
229
229
  - - "~>"
230
230
  - !ruby/object:Gem::Version
231
- version: '0.10'
231
+ version: '0.12'
232
232
  type: :development
233
233
  prerelease: false
234
234
  version_requirements: !ruby/object:Gem::Requirement
235
235
  requirements:
236
236
  - - "~>"
237
237
  - !ruby/object:Gem::Version
238
- version: '0.10'
238
+ version: '0.12'
239
239
  - !ruby/object:Gem::Dependency
240
240
  name: simplecov
241
241
  requirement: !ruby/object:Gem::Requirement
242
242
  requirements:
243
243
  - - "~>"
244
244
  - !ruby/object:Gem::Version
245
- version: 0.14.1
245
+ version: '0.17'
246
246
  type: :development
247
247
  prerelease: false
248
248
  version_requirements: !ruby/object:Gem::Requirement
249
249
  requirements:
250
250
  - - "~>"
251
251
  - !ruby/object:Gem::Version
252
- version: 0.14.1
252
+ version: '0.17'
253
253
  description: Sequent is a CQRS and event sourcing framework for Ruby.
254
254
  email:
255
255
  - lars.vonk@gmail.com
@@ -319,6 +319,7 @@ files:
319
319
  - lib/sequent/generator/aggregate.rb
320
320
  - lib/sequent/generator/command.rb
321
321
  - lib/sequent/generator/event.rb
322
+ - lib/sequent/generator/generator.rb
322
323
  - lib/sequent/generator/project.rb
323
324
  - lib/sequent/generator/template_aggregate/template_aggregate.rb
324
325
  - lib/sequent/generator/template_aggregate/template_aggregate/commands.rb
@@ -389,8 +390,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
389
390
  - !ruby/object:Gem::Version
390
391
  version: '0'
391
392
  requirements: []
392
- rubyforge_project:
393
- rubygems_version: 2.7.6
393
+ rubygems_version: 3.0.3
394
394
  signing_key:
395
395
  specification_version: 4
396
396
  summary: Event sourcing framework for Ruby