sorted_seeder 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/sorted_seeder/seeder.rb +7 -1
- data/lib/sorted_seeder/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTRlMjQ0MGJiNDU3NjdjMzRjMWI5MWE3NWRlMDQwZTE3MTJhYmQ5ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODExYWM2ZjgwOWI1ZDkzZjk4MWI2YjlmYTA3ZWNmN2IyODk4MzQ0Yg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MmU1ZWIzZTVhZmIwNzliZDlkZmM1ZmI2MDJmMTcxZWRkOThlYTA2YjEzMTFi
|
10
|
+
ZjJlMjk0OGM3YjhkYTMzMzFiODgyYTEwZjRiYjVlOTZiNzU5ODY5ZTFjYTQ0
|
11
|
+
MDkwNmRhOTgzZWIzYzVkMTQ0NDkyZmNmMzBhMTcxMGU0ZDQ4NWU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzRmNDVjOWFhMzMxZWViNWM3ODY0MzFkNmI4NTkzMGY4ZWYxYjg3MWI0Nzg2
|
14
|
+
MTAwN2Y0Njc4OTUzNTBkNzUwMzc3NGNiN2M2ODdkMmI3NWQ4YmM2M2ZmMzY4
|
15
|
+
YzU3ZDYyYWU4YjU4YmEyZTAzNmRlM2M4MDNiY2ExMzJjMTY2YzQ=
|
data/lib/sorted_seeder/seeder.rb
CHANGED
@@ -289,7 +289,13 @@ module SortedSeeder
|
|
289
289
|
end
|
290
290
|
else
|
291
291
|
belongs_to_table_name = (belongs_to.options[:class_name] || belongs_to.name.to_s.classify).to_s
|
292
|
-
prev_table
|
292
|
+
prev_table = belongs_to_table_name.constantize rescue nil
|
293
|
+
|
294
|
+
# belongs_to.klass SHOULD be what I want.
|
295
|
+
# for some reason when I was testing, this wasn't working well for me.
|
296
|
+
# I don't remember what happened, how or why.
|
297
|
+
# There ARE definite cases where the constantize doesn't work, so if it doesn't, fall back to the klass.
|
298
|
+
prev_table ||= belongs_to.klass
|
293
299
|
|
294
300
|
if prev_table &&
|
295
301
|
(SortedSeeder::Seeder.create_order.include?(prev_table) ||
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sorted_seeder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RealNobody
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
76
|
rubyforge_project:
|
77
|
-
rubygems_version: 2.
|
77
|
+
rubygems_version: 2.1.11
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: A system for organizing and simplifying seeding your environment.
|