active_type 2.5.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +38 -0
- data/README.md +23 -9
- data/lib/active_type/change_association.rb +2 -6
- data/lib/active_type/marshalling.rb +62 -0
- data/lib/active_type/nested_attributes/association.rb +5 -20
- data/lib/active_type/no_table.rb +66 -148
- data/lib/active_type/object.rb +2 -0
- data/lib/active_type/record.rb +2 -0
- data/lib/active_type/record_extension/inheritance.rb +41 -76
- data/lib/active_type/type_caster.rb +2 -8
- data/lib/active_type/version.rb +3 -1
- data/lib/active_type/virtual_attributes.rb +65 -40
- data/lib/active_type.rb +0 -7
- metadata +7 -41
- data/.github/workflows/test.yml +0 -134
- data/.gitignore +0 -8
- data/.rspec +0 -1
- data/.ruby-version +0 -1
- data/Gemfile +0 -1
- data/Gemfile.5.2.mysql2 +0 -9
- data/Gemfile.5.2.mysql2.lock +0 -59
- data/Gemfile.5.2.pg +0 -9
- data/Gemfile.5.2.pg.lock +0 -59
- data/Gemfile.5.2.sqlite3 +0 -9
- data/Gemfile.5.2.sqlite3.lock +0 -59
- data/Gemfile.6.0.sqlite3 +0 -9
- data/Gemfile.6.0.sqlite3.lock +0 -59
- data/Gemfile.6.1.pg +0 -9
- data/Gemfile.6.1.pg.lock +0 -59
- data/Gemfile.6.1.sqlite3 +0 -9
- data/Gemfile.6.1.sqlite3.lock +0 -59
- data/Gemfile.7.0.pg +0 -9
- data/Gemfile.7.0.pg.lock +0 -56
- data/Gemfile.7.0.sqlite3 +0 -9
- data/Gemfile.7.0.sqlite3.lock +0 -58
- data/Gemfile.7.1.pg +0 -9
- data/Gemfile.7.1.pg.lock +0 -68
- data/Gemfile.7.1.sqlite3 +0 -9
- data/Gemfile.7.1.sqlite3.lock +0 -70
- data/Gemfile.7.2.pg +0 -9
- data/Gemfile.7.2.pg.lock +0 -70
- data/Gemfile.7.2.sqlite3 +0 -9
- data/Gemfile.7.2.sqlite3.lock +0 -72
- data/Gemfile.lock +0 -1
- data/Rakefile +0 -57
- data/active_type.gemspec +0 -31
data/Gemfile.7.2.pg.lock
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
active_type (2.5.1)
|
|
5
|
-
activerecord (>= 3.2)
|
|
6
|
-
|
|
7
|
-
GEM
|
|
8
|
-
remote: https://rubygems.org/
|
|
9
|
-
specs:
|
|
10
|
-
activemodel (7.2.0)
|
|
11
|
-
activesupport (= 7.2.0)
|
|
12
|
-
activerecord (7.2.0)
|
|
13
|
-
activemodel (= 7.2.0)
|
|
14
|
-
activesupport (= 7.2.0)
|
|
15
|
-
timeout (>= 0.4.0)
|
|
16
|
-
activesupport (7.2.0)
|
|
17
|
-
base64
|
|
18
|
-
bigdecimal
|
|
19
|
-
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
20
|
-
connection_pool (>= 2.2.5)
|
|
21
|
-
drb
|
|
22
|
-
i18n (>= 1.6, < 2)
|
|
23
|
-
logger (>= 1.4.2)
|
|
24
|
-
minitest (>= 5.1)
|
|
25
|
-
securerandom (>= 0.3)
|
|
26
|
-
tzinfo (~> 2.0, >= 2.0.5)
|
|
27
|
-
base64 (0.2.0)
|
|
28
|
-
bigdecimal (3.1.8)
|
|
29
|
-
concurrent-ruby (1.3.4)
|
|
30
|
-
connection_pool (2.4.1)
|
|
31
|
-
diff-lcs (1.5.1)
|
|
32
|
-
drb (2.2.1)
|
|
33
|
-
gemika (0.8.3)
|
|
34
|
-
i18n (1.14.5)
|
|
35
|
-
concurrent-ruby (~> 1.0)
|
|
36
|
-
logger (1.6.0)
|
|
37
|
-
minitest (5.24.1)
|
|
38
|
-
pg (1.5.7)
|
|
39
|
-
rake (13.2.1)
|
|
40
|
-
rspec (3.13.0)
|
|
41
|
-
rspec-core (~> 3.13.0)
|
|
42
|
-
rspec-expectations (~> 3.13.0)
|
|
43
|
-
rspec-mocks (~> 3.13.0)
|
|
44
|
-
rspec-core (3.13.0)
|
|
45
|
-
rspec-support (~> 3.13.0)
|
|
46
|
-
rspec-expectations (3.13.1)
|
|
47
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
48
|
-
rspec-support (~> 3.13.0)
|
|
49
|
-
rspec-mocks (3.13.1)
|
|
50
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
51
|
-
rspec-support (~> 3.13.0)
|
|
52
|
-
rspec-support (3.13.1)
|
|
53
|
-
securerandom (0.3.1)
|
|
54
|
-
timeout (0.4.1)
|
|
55
|
-
tzinfo (2.0.6)
|
|
56
|
-
concurrent-ruby (~> 1.0)
|
|
57
|
-
|
|
58
|
-
PLATFORMS
|
|
59
|
-
ruby
|
|
60
|
-
|
|
61
|
-
DEPENDENCIES
|
|
62
|
-
active_type!
|
|
63
|
-
activerecord (~> 7.2.0)
|
|
64
|
-
gemika
|
|
65
|
-
pg
|
|
66
|
-
rake
|
|
67
|
-
rspec (~> 3.4)
|
|
68
|
-
|
|
69
|
-
BUNDLED WITH
|
|
70
|
-
2.5.6
|
data/Gemfile.7.2.sqlite3
DELETED
data/Gemfile.7.2.sqlite3.lock
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
active_type (2.5.1)
|
|
5
|
-
activerecord (>= 3.2)
|
|
6
|
-
|
|
7
|
-
GEM
|
|
8
|
-
remote: https://rubygems.org/
|
|
9
|
-
specs:
|
|
10
|
-
activemodel (7.2.0)
|
|
11
|
-
activesupport (= 7.2.0)
|
|
12
|
-
activerecord (7.2.0)
|
|
13
|
-
activemodel (= 7.2.0)
|
|
14
|
-
activesupport (= 7.2.0)
|
|
15
|
-
timeout (>= 0.4.0)
|
|
16
|
-
activesupport (7.2.0)
|
|
17
|
-
base64
|
|
18
|
-
bigdecimal
|
|
19
|
-
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
20
|
-
connection_pool (>= 2.2.5)
|
|
21
|
-
drb
|
|
22
|
-
i18n (>= 1.6, < 2)
|
|
23
|
-
logger (>= 1.4.2)
|
|
24
|
-
minitest (>= 5.1)
|
|
25
|
-
securerandom (>= 0.3)
|
|
26
|
-
tzinfo (~> 2.0, >= 2.0.5)
|
|
27
|
-
base64 (0.2.0)
|
|
28
|
-
bigdecimal (3.1.8)
|
|
29
|
-
concurrent-ruby (1.3.4)
|
|
30
|
-
connection_pool (2.4.1)
|
|
31
|
-
diff-lcs (1.5.1)
|
|
32
|
-
drb (2.2.1)
|
|
33
|
-
gemika (0.8.3)
|
|
34
|
-
i18n (1.14.5)
|
|
35
|
-
concurrent-ruby (~> 1.0)
|
|
36
|
-
logger (1.6.0)
|
|
37
|
-
mini_portile2 (2.8.7)
|
|
38
|
-
minitest (5.24.1)
|
|
39
|
-
rake (13.2.1)
|
|
40
|
-
rspec (3.13.0)
|
|
41
|
-
rspec-core (~> 3.13.0)
|
|
42
|
-
rspec-expectations (~> 3.13.0)
|
|
43
|
-
rspec-mocks (~> 3.13.0)
|
|
44
|
-
rspec-core (3.13.0)
|
|
45
|
-
rspec-support (~> 3.13.0)
|
|
46
|
-
rspec-expectations (3.13.1)
|
|
47
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
48
|
-
rspec-support (~> 3.13.0)
|
|
49
|
-
rspec-mocks (3.13.1)
|
|
50
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
51
|
-
rspec-support (~> 3.13.0)
|
|
52
|
-
rspec-support (3.13.1)
|
|
53
|
-
securerandom (0.3.1)
|
|
54
|
-
sqlite3 (1.6.0)
|
|
55
|
-
mini_portile2 (~> 2.8.0)
|
|
56
|
-
timeout (0.4.1)
|
|
57
|
-
tzinfo (2.0.6)
|
|
58
|
-
concurrent-ruby (~> 1.0)
|
|
59
|
-
|
|
60
|
-
PLATFORMS
|
|
61
|
-
ruby
|
|
62
|
-
|
|
63
|
-
DEPENDENCIES
|
|
64
|
-
active_type!
|
|
65
|
-
activerecord (~> 7.2.0)
|
|
66
|
-
gemika
|
|
67
|
-
rake
|
|
68
|
-
rspec (~> 3.4)
|
|
69
|
-
sqlite3 (= 1.6.0)
|
|
70
|
-
|
|
71
|
-
BUNDLED WITH
|
|
72
|
-
2.5.6
|
data/Gemfile.lock
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Gemfile.7.0.sqlite3.lock
|
data/Rakefile
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
require 'rake'
|
|
2
|
-
require 'bundler/gem_tasks'
|
|
3
|
-
|
|
4
|
-
begin
|
|
5
|
-
require 'gemika/tasks'
|
|
6
|
-
rescue LoadError
|
|
7
|
-
puts 'Run `gem install gemika` for additional tasks'
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
task default: 'matrix:spec'
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
task :spec do
|
|
14
|
-
success = system("bundle exec rspec spec --exclude-pattern '**/isolated/**'")
|
|
15
|
-
for_each_isolated_spec do |isolated_spec|
|
|
16
|
-
success &= system("bundle exec rspec #{isolated_spec}")
|
|
17
|
-
end
|
|
18
|
-
fail "Tests failed" unless success
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# we have to override the matrix:spec task, since we need some specs to run in isolation
|
|
23
|
-
|
|
24
|
-
Rake::Task["matrix:spec"].clear
|
|
25
|
-
|
|
26
|
-
namespace :matrix do
|
|
27
|
-
|
|
28
|
-
desc "Run specs for all Ruby #{RUBY_VERSION} gemfiles"
|
|
29
|
-
task :spec, :files do |t, options|
|
|
30
|
-
Gemika::Matrix.from_ci_config.each do |row|
|
|
31
|
-
options = options.to_hash.merge(
|
|
32
|
-
:gemfile => row.gemfile,
|
|
33
|
-
:fatal => false,
|
|
34
|
-
:bundle_exec => true,
|
|
35
|
-
)
|
|
36
|
-
success = Gemika::RSpec.run_specs(options.merge(
|
|
37
|
-
:options => '--exclude-pattern "**/isolated/**"',
|
|
38
|
-
))
|
|
39
|
-
|
|
40
|
-
for_each_isolated_spec do |isolated_spec|
|
|
41
|
-
isolated_success = Gemika::RSpec.run_specs(options.merge(
|
|
42
|
-
:files => isolated_spec,
|
|
43
|
-
))
|
|
44
|
-
success &&= isolated_success
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
success
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
def for_each_isolated_spec
|
|
54
|
-
Dir["spec/isolated/**/*_spec.rb"].sort.each do |isolated_spec|
|
|
55
|
-
yield(isolated_spec)
|
|
56
|
-
end
|
|
57
|
-
end
|
data/active_type.gemspec
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
$:.push File.expand_path("../lib", __FILE__)
|
|
2
|
-
require "active_type/version"
|
|
3
|
-
|
|
4
|
-
Gem::Specification.new do |s|
|
|
5
|
-
s.name = 'active_type'
|
|
6
|
-
s.version = ActiveType::VERSION
|
|
7
|
-
s.authors = ["Tobias Kraze", "Henning Koch"]
|
|
8
|
-
s.email = 'tobias.kraze@makandra.de'
|
|
9
|
-
s.homepage = 'https://github.com/makandra/active_type'
|
|
10
|
-
s.summary = 'Make any Ruby object quack like ActiveRecord'
|
|
11
|
-
s.description = s.summary
|
|
12
|
-
s.license = 'MIT'
|
|
13
|
-
s.metadata = {
|
|
14
|
-
'source_code_uri' => s.homepage,
|
|
15
|
-
'bug_tracker_uri' => s.homepage + '/issues',
|
|
16
|
-
'changelog_uri' => s.homepage + '/blob/master/CHANGELOG.md',
|
|
17
|
-
'rubygems_mfa_required' => 'true',
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
21
|
-
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
22
|
-
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
|
23
|
-
s.require_paths = ["lib"]
|
|
24
|
-
|
|
25
|
-
s.add_development_dependency "bundler", ">= 1.5"
|
|
26
|
-
s.add_development_dependency "rake"
|
|
27
|
-
|
|
28
|
-
s.add_runtime_dependency('activerecord', '>= 3.2')
|
|
29
|
-
|
|
30
|
-
s.required_ruby_version = '>= 2.5.0'
|
|
31
|
-
end
|