populator3 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,4 +1,12 @@
1
+ 0.2.7 (November 11th, 2010)
2
+
3
+ * Changed home URL to http://github.com/yumitsu/populator3
4
+ * Fixed error with NOT NULL fields (thanks to Ivan V. <http://github.com/ivanvr>)
5
+
6
+ 0.2.6 (November 5th, 2010)
7
+
1
8
  * Now populator supports Rails 3
9
+ * Fixed specs, added more flexibility with primary key name (thanks to Thierry Treyer <http://github.com/zehkae>)
2
10
 
3
11
  0.2.5 (November 5th, 2010)
4
12
 
data/Manifest CHANGED
@@ -13,7 +13,6 @@ lib/populator/factory.rb
13
13
  lib/populator/model_additions.rb
14
14
  lib/populator/random.rb
15
15
  lib/populator/record.rb
16
- populator3.gemspec
17
16
  spec/README
18
17
  spec/example_database.yml
19
18
  spec/models/category.rb
data/Rakefile CHANGED
@@ -2,10 +2,10 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('populator3', '0.2.6') do |p|
5
+ Echoe.new('populator3', '0.2.7') do |p|
6
6
  p.summary = "Mass populate an Active Record database."
7
7
  p.description = "Mass populate an Active Record database."
8
- p.url = "http://github.com/ryanb/populator"
8
+ p.url = "http://github.com/yumitsu/populator3"
9
9
  p.author = 'Ryan Bates, Alex Zinchenko'
10
10
  p.email = "ryan (at) railscasts (dot) com, admloki (at) gmail (dot) com"
11
11
  p.ignore_pattern = ["script/*", "**/*.sqlite3", "tmp/*"]
@@ -24,6 +24,11 @@ module Populator
24
24
  @attributes[column.to_sym] = model_class.to_s
25
25
  end
26
26
  end
27
+ # So NOT NULL columns with default values don't raise errors
28
+ # when omitted from the populate block:
29
+ model_class.columns.find_all{|c| !c.default.nil? }.each do |column|
30
+ @attributes[column.name.to_sym] = column.default
31
+ end
27
32
  end
28
33
 
29
34
  # override id since method_missing won't catch this column name
@@ -2,16 +2,16 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{populator3}
5
- s.version = "0.2.6"
5
+ s.version = "0.2.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Ryan Bates, Alex Zinchenko"]
9
- s.date = %q{2010-11-05}
9
+ s.date = %q{2010-11-11}
10
10
  s.description = %q{Mass populate an Active Record database.}
11
11
  s.email = %q{ryan (at) railscasts (dot) com, admloki (at) gmail (dot) com}
12
12
  s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.rdoc", "TODO", "lib/populator.rb", "lib/populator/adapters/abstract.rb", "lib/populator/adapters/oracle.rb", "lib/populator/adapters/postgresql.rb", "lib/populator/adapters/sqlite.rb", "lib/populator/factory.rb", "lib/populator/model_additions.rb", "lib/populator/random.rb", "lib/populator/record.rb", "tasks/deployment.rake", "tasks/spec.rake"]
13
13
  s.files = ["CHANGELOG", "LICENSE", "Manifest", "README.rdoc", "Rakefile", "TODO", "lib/populator.rb", "lib/populator/adapters/abstract.rb", "lib/populator/adapters/oracle.rb", "lib/populator/adapters/postgresql.rb", "lib/populator/adapters/sqlite.rb", "lib/populator/factory.rb", "lib/populator/model_additions.rb", "lib/populator/random.rb", "lib/populator/record.rb", "populator3.gemspec", "spec/README", "spec/example_database.yml", "spec/models/category.rb", "spec/models/product.rb", "spec/populator/factory_spec.rb", "spec/populator/model_additions_spec.rb", "spec/populator/random_spec.rb", "spec/populator/record_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/deployment.rake", "tasks/spec.rake"]
14
- s.homepage = %q{http://github.com/ryanb/populator}
14
+ s.homepage = %q{http://github.com/yumitsu/populator3}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Populator3", "--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = %q{populator3}
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: populator3
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 25
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 2
8
- - 6
9
- version: 0.2.6
9
+ - 7
10
+ version: 0.2.7
10
11
  platform: ruby
11
12
  authors:
12
13
  - Ryan Bates, Alex Zinchenko
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-11-05 00:00:00 +03:00
18
+ date: 2010-11-11 00:00:00 +03:00
18
19
  default_executable:
19
20
  dependencies: []
20
21
 
@@ -70,7 +71,7 @@ files:
70
71
  - tasks/deployment.rake
71
72
  - tasks/spec.rake
72
73
  has_rdoc: true
73
- homepage: http://github.com/ryanb/populator
74
+ homepage: http://github.com/yumitsu/populator3
74
75
  licenses: []
75
76
 
76
77
  post_install_message:
@@ -88,6 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
89
  requirements:
89
90
  - - ">="
90
91
  - !ruby/object:Gem::Version
92
+ hash: 3
91
93
  segments:
92
94
  - 0
93
95
  version: "0"
@@ -96,6 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
98
  requirements:
97
99
  - - ">="
98
100
  - !ruby/object:Gem::Version
101
+ hash: 11
99
102
  segments:
100
103
  - 1
101
104
  - 2