seed_dump 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
@@ -42,8 +42,16 @@ module SeedDump
42
42
  f =~ /models\/(.*).rb/
43
43
  # split path by /, camelize the constituents, and then reform as a formal class name
44
44
  parts = $1.split("/").map {|x| x.camelize}
45
+
45
46
  # Initialize nested model namespaces
46
- parts.clip.inject(Object) { |x, y| x.const_set(y, Module.new) }
47
+ parts.clip.inject(Object) do |x, y|
48
+ if x.const_defined?(y)
49
+ x.const_get(y)
50
+ else
51
+ x.const_set(y, Module.new)
52
+ end
53
+ end
54
+
47
55
  model = parts.join("::")
48
56
  require f
49
57
 
data/seed_dump.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "seed_dump"
8
- s.version = "0.4.1"
8
+ s.version = "0.4.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rob Halff"]
12
- s.date = "2012-08-01"
12
+ s.date = "2012-11-29"
13
13
  s.description = "Dump (parts) of your database to db/seeds.rb to get a headstart creating a meaningful seeds.rb file"
14
14
  s.email = "rob.halff@gmail.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seed_dump
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-01 00:00:00.000000000 Z
12
+ date: 2012-11-29 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Dump (parts) of your database to db/seeds.rb to get a headstart creating
15
15
  a meaningful seeds.rb file