seed_reaper 0.0.7 → 0.0.8
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/lib/seed_reaper/config_evaluator.rb +1 -1
- data/lib/seed_reaper/seedifier.rb +5 -1
- data/lib/seed_reaper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 338334877dd8903cc4383daa7a0ba5145b03d826e34caadb895d2dd7315ad6e5
|
4
|
+
data.tar.gz: 852714966712a98fe5787bc2b217f2ec83213a95d55c6ab07ba6d73d0d252f14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 343b4809b733469b8efbe44a013e33d02ef69e51473b908e339577c68df7e64db4569123a87f768e291470e9d97e0814e78c5b283dc0ce86ef09328e1f6810fe
|
7
|
+
data.tar.gz: 5d92b810c6b1c7dadfc24ee5d184676871b93f16b9a84c363e90206593e5f3c62b1f4f04eeb2ac1bedbc56f33142d64d3a749e81db6a495fe34fbd865c9f26d9
|
@@ -40,7 +40,7 @@ module SeedReaper
|
|
40
40
|
return schema unless instance._reflections[schema.to_s].belongs_to?
|
41
41
|
end
|
42
42
|
|
43
|
-
%i[count joins nullify].each do |meta_field|
|
43
|
+
%i[count joins nullify class_name].each do |meta_field|
|
44
44
|
define_method meta_field do
|
45
45
|
meta(meta_field)
|
46
46
|
end
|
@@ -20,7 +20,7 @@ module SeedReaper
|
|
20
20
|
def base_model
|
21
21
|
return @config.to_s.camelize.constantize if @config.is_a?(Symbol)
|
22
22
|
|
23
|
-
@config.first[0].to_s.camelize.constantize
|
23
|
+
(base_config_evaluator.class_name || @config.first[0]).to_s.camelize.constantize
|
24
24
|
end
|
25
25
|
|
26
26
|
def base_config
|
@@ -29,6 +29,10 @@ module SeedReaper
|
|
29
29
|
@config.first[1]
|
30
30
|
end
|
31
31
|
|
32
|
+
def base_config_evaluator
|
33
|
+
@base_config_evaluator ||= ConfigEvaluator.new(base_config)
|
34
|
+
end
|
35
|
+
|
32
36
|
def seedify_collection(collection, config)
|
33
37
|
ce = ConfigEvaluator.new(config)
|
34
38
|
evaluated_collection(collection, ce).reduce('') do |str, instance|
|
data/lib/seed_reaper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seed_reaper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Butts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02
|
11
|
+
date: 2022-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|