seed_dump 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,9 @@
1
1
  == Seed Dump
2
2
 
3
+ == 0.3.2 / 2011-04-22
4
+
5
+ * fix broken APPEND option
6
+
3
7
  == 0.3.1 / 2011-04-22
4
8
 
5
9
  * use different syntax for multiple rows
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -15,7 +15,7 @@ module SeedDump
15
15
  @opts['no-data'] = !env['NO_DATA'].nil?
16
16
  @opts['models'] = env['MODELS'] || (env['MODEL'] ? env['MODEL'] : "")
17
17
  @opts['file'] = env['FILE'] || "#{Rails.root}/db/seeds.rb"
18
- @opts['append'] = (!env['APPEND'].nil? && File.exists?(opts['file']) )
18
+ @opts['append'] = (!env['APPEND'].nil? && File.exists?(@opts['file']) )
19
19
  @ar_options = env['LIMIT'].to_i > 0 ? { :limit => env['LIMIT'].to_i } : {}
20
20
  @indent = " " * (env['INDENT'].nil? ? 2 : env['INDENT'].to_i)
21
21
  @opts['models'] = @opts['models'].split(',').collect {|x| x.underscore.singularize.camelize.constantize }
@@ -41,8 +41,9 @@ module SeedDump
41
41
  @id_set_string = ''
42
42
  create_hash = ""
43
43
  rows = []
44
+ arr = []
44
45
  arr = model.find(:all, @ar_options) unless @opts['no-data']
45
- arr = arr.empty? ? [model.new] : arr
46
+ arr = arr.empty? ? [model.new] : arr
46
47
  arr.each_with_index { |r,i|
47
48
  attr_s = [];
48
49
  r.attributes.each { |k,v| dumpAttribute(attr_s,r,k,v) }
data/seed_dump.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{seed_dump}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.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"]
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.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: