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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjkxYWFhMjE3MTQ5MzZiZmQwYjdiYmE1ZjcyOTk0YjNjYTE1OTYxZQ==
4
+ YTRlMjQ0MGJiNDU3NjdjMzRjMWI5MWE3NWRlMDQwZTE3MTJhYmQ5ZQ==
5
5
  data.tar.gz: !binary |-
6
- NTA2ODBiNmQyMjEzYzc2MDYxZmVhNzMzMDg2NGQ3MWRkOTFkZTc1Mw==
6
+ ODExYWM2ZjgwOWI1ZDkzZjk4MWI2YjlmYTA3ZWNmN2IyODk4MzQ0Yg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YWJhZWQ1NTdiYTdkNzZiZGU1MDI4M2E1OTE4OGQ0ZTYxOWUwYjcwZjMzOTlm
10
- YzU0MDI5ZDlmNDMyMWNlMGQ4NWU4NjJkOTUwZDJmOTNjYTMyMzQ5MzE4Zjkx
11
- ZjhhN2I2NGRjYzcxMGIwYjE2NjVkYTI2NzRmM2E0OTFiOTYwMzE=
9
+ MmU1ZWIzZTVhZmIwNzliZDlkZmM1ZmI2MDJmMTcxZWRkOThlYTA2YjEzMTFi
10
+ ZjJlMjk0OGM3YjhkYTMzMzFiODgyYTEwZjRiYjVlOTZiNzU5ODY5ZTFjYTQ0
11
+ MDkwNmRhOTgzZWIzYzVkMTQ0NDkyZmNmMzBhMTcxMGU0ZDQ4NWU=
12
12
  data.tar.gz: !binary |-
13
- ZjQ5NzQ4Yzg3OTM5OTM4MmUxMTNlZDUxMDEwNDYzNmY0NDgwMWQ5YjU2NDQ3
14
- ODI3YmU3ZGE3YTJjMjU0OTI5OWZhOTczMjRkMWMxYmU4NzY0OTlkYzA3NmYw
15
- MTMwMGExMjM1M2U1ZTExMDk1NmQwMTI1ODZkZDlkZTEwYTZjMzQ=
13
+ MzRmNDVjOWFhMzMxZWViNWM3ODY0MzFkNmI4NTkzMGY4ZWYxYjg3MWI0Nzg2
14
+ MTAwN2Y0Njc4OTUzNTBkNzUwMzc3NGNiN2M2ODdkMmI3NWQ4YmM2M2ZmMzY4
15
+ YzU3ZDYyYWU4YjU4YmEyZTAzNmRlM2M4MDNiY2ExMzJjMTY2YzQ=
@@ -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 = belongs_to_table_name.constantize
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) ||
@@ -1,3 +1,3 @@
1
1
  module SortedSeeder
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
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.10
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-03-07 00:00:00.000000000 Z
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.4.5
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.