active_seed 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/active_seed.gemspec +2 -2
- data/lib/active_seed/active_seed.rb +6 -5
- metadata +8 -8
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.5
|
data/active_seed.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{active_seed}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["David Monagle"]
|
12
|
-
s.date = %q{2011-05
|
12
|
+
s.date = %q{2011-07-05}
|
13
13
|
s.description = %q{ActiveSeed Gives the ability to seed data by inserting it via activerecord. Also allows you to manage sets of data and seed based on the current environment.}
|
14
14
|
s.email = %q{david.monagle@intrica.com.au}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -43,14 +43,15 @@ module ActiveSeed
|
|
43
43
|
unless (header[count].strip == "nil")
|
44
44
|
value = d[count]
|
45
45
|
value = "" if value.nil?
|
46
|
-
value = "'" + value.strip.gsub(/'/, "\\\\'") + "'"
|
46
|
+
value = "'" + value.strip.gsub(/'/, "\\\\'") + "'"
|
47
47
|
if evaluations[count].nil?
|
48
48
|
assignment = value
|
49
49
|
else
|
50
|
-
|
51
|
-
|
50
|
+
assignment = evaluations[count].gsub(/\?+/) do |s|
|
51
|
+
s.size == 2 ? "?" : value
|
52
|
+
end
|
52
53
|
end
|
53
|
-
code += "model." + header[count].strip + "=" + assignment + "\n"
|
54
|
+
code += "model." + header[count].strip + "=" + assignment + "\n"
|
54
55
|
end
|
55
56
|
end
|
56
57
|
# Add in the statics
|
@@ -96,4 +97,4 @@ module ActiveSeed
|
|
96
97
|
end
|
97
98
|
|
98
99
|
module_function :seed
|
99
|
-
end
|
100
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_seed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 5
|
10
|
+
version: 1.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Monagle
|
@@ -15,11 +15,10 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-05
|
18
|
+
date: 2011-07-05 00:00:00 +10:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name: bundler
|
23
22
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
23
|
none: false
|
25
24
|
requirements:
|
@@ -31,11 +30,11 @@ dependencies:
|
|
31
30
|
- 0
|
32
31
|
- 0
|
33
32
|
version: 1.0.0
|
33
|
+
requirement: *id001
|
34
34
|
prerelease: false
|
35
35
|
type: :development
|
36
|
-
|
36
|
+
name: bundler
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
-
name: jeweler
|
39
38
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
39
|
none: false
|
41
40
|
requirements:
|
@@ -47,9 +46,10 @@ dependencies:
|
|
47
46
|
- 5
|
48
47
|
- 2
|
49
48
|
version: 1.5.2
|
49
|
+
requirement: *id002
|
50
50
|
prerelease: false
|
51
51
|
type: :development
|
52
|
-
|
52
|
+
name: jeweler
|
53
53
|
description: ActiveSeed Gives the ability to seed data by inserting it via activerecord. Also allows you to manage sets of data and seed based on the current environment.
|
54
54
|
email: david.monagle@intrica.com.au
|
55
55
|
executables: []
|