vorpal 1.0.3 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +73 -26
- data/lib/vorpal/aggregate_mapper.rb +13 -2
- data/lib/vorpal/aggregate_traversal.rb +9 -8
- data/lib/vorpal/config/association_config.rb +84 -0
- data/lib/vorpal/config/belongs_to_config.rb +35 -0
- data/lib/vorpal/config/class_config.rb +71 -0
- data/lib/vorpal/config/configs.rb +54 -0
- data/lib/vorpal/config/foreign_key_info.rb +23 -0
- data/lib/vorpal/config/has_many_config.rb +38 -0
- data/lib/vorpal/config/has_one_config.rb +35 -0
- data/lib/vorpal/config/main_config.rb +68 -0
- data/lib/vorpal/db_loader.rb +25 -22
- data/lib/vorpal/driver/postgresql.rb +42 -6
- data/lib/vorpal/dsl/config_builder.rb +26 -73
- data/lib/vorpal/dsl/configuration.rb +139 -42
- data/lib/vorpal/dsl/defaults_generator.rb +1 -1
- data/lib/vorpal/engine.rb +27 -13
- data/lib/vorpal/exceptions.rb +4 -0
- data/lib/vorpal/loaded_objects.rb +57 -14
- data/lib/vorpal/util/array_hash.rb +22 -8
- data/lib/vorpal/util/hash_initialization.rb +1 -1
- data/lib/vorpal/version.rb +1 -1
- data/vorpal.gemspec +4 -4
- metadata +17 -74
- data/.editorconfig +0 -13
- data/.envrc +0 -4
- data/.gitignore +0 -16
- data/.rspec +0 -1
- data/.ruby-version +0 -1
- data/.travis.yml +0 -18
- data/.yardopts +0 -1
- data/Appraisals +0 -18
- data/Gemfile +0 -4
- data/Rakefile +0 -39
- data/bin/appraisal +0 -29
- data/bin/rake +0 -29
- data/bin/rspec +0 -29
- data/docker-compose.yml +0 -19
- data/gemfiles/rails_5_1.gemfile +0 -11
- data/gemfiles/rails_5_1.gemfile.lock +0 -101
- data/gemfiles/rails_5_2.gemfile +0 -11
- data/gemfiles/rails_5_2.gemfile.lock +0 -101
- data/gemfiles/rails_6_0.gemfile +0 -9
- data/gemfiles/rails_6_0.gemfile.lock +0 -101
- data/lib/vorpal/configs.rb +0 -296
- data/spec/acceptance/vorpal/aggregate_mapper_spec.rb +0 -910
- data/spec/helpers/codecov_helper.rb +0 -7
- data/spec/helpers/db_helpers.rb +0 -69
- data/spec/helpers/profile_helpers.rb +0 -26
- data/spec/integration/vorpal/driver/postgresql_spec.rb +0 -42
- data/spec/integration_spec_helper.rb +0 -29
- data/spec/performance/vorpal/performance_spec.rb +0 -305
- data/spec/unit/vorpal/configs_spec.rb +0 -117
- data/spec/unit/vorpal/db_loader_spec.rb +0 -103
- data/spec/unit/vorpal/dsl/config_builder_spec.rb +0 -18
- data/spec/unit/vorpal/dsl/defaults_generator_spec.rb +0 -75
- data/spec/unit/vorpal/identity_map_spec.rb +0 -62
- data/spec/unit/vorpal/loaded_objects_spec.rb +0 -22
- data/spec/unit/vorpal/util/string_utils_spec.rb +0 -25
- data/spec/unit_spec_helper.rb +0 -1
data/lib/vorpal/version.rb
CHANGED
data/vorpal.gemspec
CHANGED
@@ -13,17 +13,17 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = "https://github.com/nulogy/vorpal"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
|
-
spec.files =
|
17
|
-
spec.
|
16
|
+
spec.files = Dir["CHANGELOG.md", "LICENSE.txt", "README.md", "vorpal.gemspec", "lib/**/*"]
|
17
|
+
spec.bindir = "exe"
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
18
19
|
spec.require_paths = ["lib"]
|
19
20
|
|
20
21
|
spec.add_runtime_dependency "simple_serializer", "~> 1.0"
|
21
22
|
spec.add_runtime_dependency "equalizer"
|
22
23
|
spec.add_runtime_dependency "activesupport"
|
23
24
|
|
24
|
-
spec.add_development_dependency "rake", "~>
|
25
|
+
spec.add_development_dependency "rake", "~> 13"
|
25
26
|
spec.add_development_dependency "rspec", "~> 3.0"
|
26
|
-
spec.add_development_dependency "virtus", "~> 1.0"
|
27
27
|
spec.add_development_dependency "appraisal", "~> 2.2"
|
28
28
|
|
29
29
|
spec.required_ruby_version = ">= 2.5.7"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vorpal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Kirby
|
8
|
-
autorequire:
|
9
|
-
bindir:
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simple_serializer
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '13'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '13'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '3.0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: virtus
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '1.0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '1.0'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: appraisal
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -172,34 +158,21 @@ executables: []
|
|
172
158
|
extensions: []
|
173
159
|
extra_rdoc_files: []
|
174
160
|
files:
|
175
|
-
- ".editorconfig"
|
176
|
-
- ".envrc"
|
177
|
-
- ".gitignore"
|
178
|
-
- ".rspec"
|
179
|
-
- ".ruby-version"
|
180
|
-
- ".travis.yml"
|
181
|
-
- ".yardopts"
|
182
|
-
- Appraisals
|
183
161
|
- CHANGELOG.md
|
184
|
-
- Gemfile
|
185
162
|
- LICENSE.txt
|
186
163
|
- README.md
|
187
|
-
- Rakefile
|
188
|
-
- bin/appraisal
|
189
|
-
- bin/rake
|
190
|
-
- bin/rspec
|
191
|
-
- docker-compose.yml
|
192
|
-
- gemfiles/rails_5_1.gemfile
|
193
|
-
- gemfiles/rails_5_1.gemfile.lock
|
194
|
-
- gemfiles/rails_5_2.gemfile
|
195
|
-
- gemfiles/rails_5_2.gemfile.lock
|
196
|
-
- gemfiles/rails_6_0.gemfile
|
197
|
-
- gemfiles/rails_6_0.gemfile.lock
|
198
164
|
- lib/vorpal.rb
|
199
165
|
- lib/vorpal/aggregate_mapper.rb
|
200
166
|
- lib/vorpal/aggregate_traversal.rb
|
201
167
|
- lib/vorpal/aggregate_utils.rb
|
202
|
-
- lib/vorpal/
|
168
|
+
- lib/vorpal/config/association_config.rb
|
169
|
+
- lib/vorpal/config/belongs_to_config.rb
|
170
|
+
- lib/vorpal/config/class_config.rb
|
171
|
+
- lib/vorpal/config/configs.rb
|
172
|
+
- lib/vorpal/config/foreign_key_info.rb
|
173
|
+
- lib/vorpal/config/has_many_config.rb
|
174
|
+
- lib/vorpal/config/has_one_config.rb
|
175
|
+
- lib/vorpal/config/main_config.rb
|
203
176
|
- lib/vorpal/db_loader.rb
|
204
177
|
- lib/vorpal/driver/postgresql.rb
|
205
178
|
- lib/vorpal/dsl/config_builder.rb
|
@@ -213,27 +186,12 @@ files:
|
|
213
186
|
- lib/vorpal/util/hash_initialization.rb
|
214
187
|
- lib/vorpal/util/string_utils.rb
|
215
188
|
- lib/vorpal/version.rb
|
216
|
-
- spec/acceptance/vorpal/aggregate_mapper_spec.rb
|
217
|
-
- spec/helpers/codecov_helper.rb
|
218
|
-
- spec/helpers/db_helpers.rb
|
219
|
-
- spec/helpers/profile_helpers.rb
|
220
|
-
- spec/integration/vorpal/driver/postgresql_spec.rb
|
221
|
-
- spec/integration_spec_helper.rb
|
222
|
-
- spec/performance/vorpal/performance_spec.rb
|
223
|
-
- spec/unit/vorpal/configs_spec.rb
|
224
|
-
- spec/unit/vorpal/db_loader_spec.rb
|
225
|
-
- spec/unit/vorpal/dsl/config_builder_spec.rb
|
226
|
-
- spec/unit/vorpal/dsl/defaults_generator_spec.rb
|
227
|
-
- spec/unit/vorpal/identity_map_spec.rb
|
228
|
-
- spec/unit/vorpal/loaded_objects_spec.rb
|
229
|
-
- spec/unit/vorpal/util/string_utils_spec.rb
|
230
|
-
- spec/unit_spec_helper.rb
|
231
189
|
- vorpal.gemspec
|
232
190
|
homepage: https://github.com/nulogy/vorpal
|
233
191
|
licenses:
|
234
192
|
- MIT
|
235
193
|
metadata: {}
|
236
|
-
post_install_message:
|
194
|
+
post_install_message:
|
237
195
|
rdoc_options: []
|
238
196
|
require_paths:
|
239
197
|
- lib
|
@@ -249,22 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
207
|
version: '0'
|
250
208
|
requirements: []
|
251
209
|
rubygems_version: 3.1.2
|
252
|
-
signing_key:
|
210
|
+
signing_key:
|
253
211
|
specification_version: 4
|
254
212
|
summary: Separate your domain model from your persistence mechanism.
|
255
|
-
test_files:
|
256
|
-
- spec/acceptance/vorpal/aggregate_mapper_spec.rb
|
257
|
-
- spec/helpers/codecov_helper.rb
|
258
|
-
- spec/helpers/db_helpers.rb
|
259
|
-
- spec/helpers/profile_helpers.rb
|
260
|
-
- spec/integration/vorpal/driver/postgresql_spec.rb
|
261
|
-
- spec/integration_spec_helper.rb
|
262
|
-
- spec/performance/vorpal/performance_spec.rb
|
263
|
-
- spec/unit/vorpal/configs_spec.rb
|
264
|
-
- spec/unit/vorpal/db_loader_spec.rb
|
265
|
-
- spec/unit/vorpal/dsl/config_builder_spec.rb
|
266
|
-
- spec/unit/vorpal/dsl/defaults_generator_spec.rb
|
267
|
-
- spec/unit/vorpal/identity_map_spec.rb
|
268
|
-
- spec/unit/vorpal/loaded_objects_spec.rb
|
269
|
-
- spec/unit/vorpal/util/string_utils_spec.rb
|
270
|
-
- spec/unit_spec_helper.rb
|
213
|
+
test_files: []
|
data/.editorconfig
DELETED
data/.envrc
DELETED
data/.gitignore
DELETED
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--colour
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.7.0
|
data/.travis.yml
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
services:
|
3
|
-
- postgresql
|
4
|
-
matrix:
|
5
|
-
include:
|
6
|
-
- rvm: 2.5.7
|
7
|
-
gemfile: gemfiles/rails_5_1.gemfile
|
8
|
-
- rvm: 2.6
|
9
|
-
gemfile: gemfiles/rails_5_1.gemfile
|
10
|
-
- rvm: 2.6
|
11
|
-
gemfile: gemfiles/rails_5_2.gemfile
|
12
|
-
- rvm: 2.7
|
13
|
-
gemfile: gemfiles/rails_6_0.gemfile
|
14
|
-
cache:
|
15
|
-
- bundler
|
16
|
-
script: "bundle exec rake"
|
17
|
-
env:
|
18
|
-
- CODECOV_TOKEN="fab4ddb8-ba2c-47cb-a407-941209ad54a4"
|
data/.yardopts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--no-private -m markdown lib/**/*.*
|
data/Appraisals
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
appraise "rails-6-0" do
|
2
|
-
ruby ">= 2.7.0"
|
3
|
-
gem "activerecord", "~> 6.0.0"
|
4
|
-
end
|
5
|
-
|
6
|
-
appraise "rails-5-2" do
|
7
|
-
ruby ">= 2.5.7"
|
8
|
-
gem "activerecord", "~> 5.2.0"
|
9
|
-
gem "pg", "~> 0.18.0"
|
10
|
-
gem "activerecord-import", "= 0.13.0"
|
11
|
-
end
|
12
|
-
|
13
|
-
appraise "rails-5-1" do
|
14
|
-
ruby ">= 2.5.7"
|
15
|
-
gem "activerecord", "~> 5.1.0"
|
16
|
-
gem "pg", "~> 0.18.0"
|
17
|
-
gem "activerecord-import", "= 0.13.0"
|
18
|
-
end
|
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
|
-
begin
|
3
|
-
require "bundler/gem_tasks"
|
4
|
-
rescue LoadError
|
5
|
-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks associated with creating new versions of the gem.'
|
6
|
-
end
|
7
|
-
|
8
|
-
begin
|
9
|
-
require 'rspec/core/rake_task'
|
10
|
-
|
11
|
-
namespace :spec do
|
12
|
-
RSpec::Core::RakeTask.new(:acceptance) do |t|
|
13
|
-
t.pattern = "spec/acceptance/**/*_spec.rb"
|
14
|
-
end
|
15
|
-
|
16
|
-
RSpec::Core::RakeTask.new(:integration) do |t|
|
17
|
-
t.pattern = "spec/integration/**/*_spec.rb"
|
18
|
-
end
|
19
|
-
|
20
|
-
RSpec::Core::RakeTask.new(:performance) do |t|
|
21
|
-
t.pattern = "spec/performance/**/*_spec.rb"
|
22
|
-
end
|
23
|
-
|
24
|
-
RSpec::Core::RakeTask.new(:unit) do |t|
|
25
|
-
t.pattern = "spec/unit/**/*_spec.rb"
|
26
|
-
end
|
27
|
-
|
28
|
-
desc "Run all non-performance related specs"
|
29
|
-
task non_perf: [:unit, :integration, :acceptance]
|
30
|
-
|
31
|
-
desc "Run all specs"
|
32
|
-
task all: [:acceptance, :integration, :unit, :performance]
|
33
|
-
end
|
34
|
-
|
35
|
-
task default: :'spec:all'
|
36
|
-
rescue LoadError
|
37
|
-
# Allow the Rakefile to be used in environments where the RSpec gem is unavailable
|
38
|
-
# (e.g. Production)
|
39
|
-
end
|
data/bin/appraisal
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
#
|
5
|
-
# This file was generated by Bundler.
|
6
|
-
#
|
7
|
-
# The application 'appraisal' is installed as part of a gem, and
|
8
|
-
# this file is here to facilitate running it.
|
9
|
-
#
|
10
|
-
|
11
|
-
require "pathname"
|
12
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
-
Pathname.new(__FILE__).realpath)
|
14
|
-
|
15
|
-
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
-
|
17
|
-
if File.file?(bundle_binstub)
|
18
|
-
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
-
load(bundle_binstub)
|
20
|
-
else
|
21
|
-
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
require "rubygems"
|
27
|
-
require "bundler/setup"
|
28
|
-
|
29
|
-
load Gem.bin_path("appraisal", "appraisal")
|
data/bin/rake
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
#
|
5
|
-
# This file was generated by Bundler.
|
6
|
-
#
|
7
|
-
# The application 'rake' is installed as part of a gem, and
|
8
|
-
# this file is here to facilitate running it.
|
9
|
-
#
|
10
|
-
|
11
|
-
require "pathname"
|
12
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
-
Pathname.new(__FILE__).realpath)
|
14
|
-
|
15
|
-
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
-
|
17
|
-
if File.file?(bundle_binstub)
|
18
|
-
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
-
load(bundle_binstub)
|
20
|
-
else
|
21
|
-
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
require "rubygems"
|
27
|
-
require "bundler/setup"
|
28
|
-
|
29
|
-
load Gem.bin_path("rake", "rake")
|
data/bin/rspec
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
#
|
5
|
-
# This file was generated by Bundler.
|
6
|
-
#
|
7
|
-
# The application 'rspec' is installed as part of a gem, and
|
8
|
-
# this file is here to facilitate running it.
|
9
|
-
#
|
10
|
-
|
11
|
-
require "pathname"
|
12
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
-
Pathname.new(__FILE__).realpath)
|
14
|
-
|
15
|
-
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
-
|
17
|
-
if File.file?(bundle_binstub)
|
18
|
-
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
-
load(bundle_binstub)
|
20
|
-
else
|
21
|
-
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
require "rubygems"
|
27
|
-
require "bundler/setup"
|
28
|
-
|
29
|
-
load Gem.bin_path("rspec-core", "rspec")
|
data/docker-compose.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
version: "3.6"
|
2
|
-
|
3
|
-
services:
|
4
|
-
vorpal_postgres:
|
5
|
-
hostname: vorpal_postgres
|
6
|
-
command: -p 55433
|
7
|
-
image: postgres:11.4
|
8
|
-
ports:
|
9
|
-
- "55433:55433"
|
10
|
-
volumes:
|
11
|
-
- vorpal_postgres_volume:/var/lib/postgresql/data
|
12
|
-
environment:
|
13
|
-
POSTGRES_USER: vorpal
|
14
|
-
POSTGRES_PASSWORD: pass
|
15
|
-
POSTGRES_DB: vorpal_development
|
16
|
-
restart: unless-stopped
|
17
|
-
|
18
|
-
volumes:
|
19
|
-
vorpal_postgres_volume:
|