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 +8 -0
- data/Manifest +0 -1
- data/Rakefile +2 -2
- data/lib/populator/record.rb +5 -0
- data/populator3.gemspec +3 -3
- metadata +7 -4
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
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.
|
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/
|
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/*"]
|
data/lib/populator/record.rb
CHANGED
@@ -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
|
data/populator3.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{populator3}
|
5
|
-
s.version = "0.2.
|
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-
|
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/
|
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
|
-
-
|
9
|
-
version: 0.2.
|
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-
|
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/
|
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
|