seedsv 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ begin
11
11
  gem.homepage = "http://github.com/adriancuadros/seedsv"
12
12
  gem.authors = ["Adrian Cuadros"]
13
13
  gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
14
- gem.add_dependency("fastercsv", "~> 1.5.3")
14
+ gem.add_dependency("fastercsv", "~> 1.5.1")
15
15
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
16
  end
17
17
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.1.0
@@ -25,9 +25,7 @@
25
25
  #
26
26
  # If something goes wrong and you want to delete everything seeded from csv files:
27
27
  # rake db:seed:cleanup
28
- module Seedsv
29
- if defined?(Rails) && Rails::VERSION::MAJOR == 3
30
- require 'seedsv/csv_seed'
31
- require 'seedsv/engine'
32
- end
33
- end
28
+ require 'seedsv/csv_seed'
29
+ Dir[File.join(File.dirname(__FILE__), 'tasks/*.rake')].each{ |task| load task }
30
+ require 'seedsv'
31
+
@@ -5,7 +5,7 @@ module Seedsv
5
5
  mattr_accessor :csv_class
6
6
 
7
7
  #Use appropriate ruby library
8
- if VERSION.include?('1.9')
8
+ if RUBY_VERSION.include?('1.9')
9
9
  require 'csv'
10
10
  @@csv_class = CSV
11
11
  else
@@ -34,7 +34,9 @@ module Seedsv
34
34
  migration_class.transaction do
35
35
  csv_file.each do |line_values|
36
36
  record = migration_class.new
37
- line_values.to_hash.keys.map{|attribute| record.send("#{attribute.strip}=",line_values[attribute].strip) rescue nil}
37
+ line_values.to_hash.keys.map do |attribute|
38
+ record.send("#{attribute.strip}=",line_values[attribute].strip) rescue nil
39
+ end
38
40
  record.save(:validate => false)
39
41
  end
40
42
  end
@@ -1,60 +1,57 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{seedsv}
8
- s.version = "1.0.1"
8
+ s.version = "1.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Adrian Cuadros"]
12
- s.date = %q{2010-09-23}
12
+ s.date = %q{2011-03-11}
13
13
  s.description = %q{Seed your database with data from csv files with ease}
14
14
  s.email = %q{adrian@innku.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION",
26
- "lib/seedsv.rb",
27
- "lib/seedsv/csv_seed.rb",
28
- "lib/seedsv/engine.rb",
29
- "lib/tasks/seedsv.rake",
30
- "seedsv.gemspec",
31
- "test/helper.rb",
32
- "test/test_seedssv.rb"
21
+ "LICENSE",
22
+ "README.rdoc",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "lib/seedsv.rb",
26
+ "lib/seedsv/csv_seed.rb",
27
+ "lib/seedsv/engine.rb",
28
+ "lib/tasks/seedsv.rake",
29
+ "seedsv.gemspec",
30
+ "test/helper.rb",
31
+ "test/test_seedssv.rb"
33
32
  ]
34
33
  s.homepage = %q{http://github.com/adriancuadros/seedsv}
35
- s.rdoc_options = ["--charset=UTF-8"]
36
34
  s.require_paths = ["lib"]
37
- s.rubygems_version = %q{1.3.7}
35
+ s.rubygems_version = %q{1.5.2}
38
36
  s.summary = %q{Seed your database with data from csv files with ease}
39
37
  s.test_files = [
40
38
  "test/helper.rb",
41
- "test/test_seedssv.rb"
39
+ "test/test_seedssv.rb"
42
40
  ]
43
41
 
44
42
  if s.respond_to? :specification_version then
45
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
46
43
  s.specification_version = 3
47
44
 
48
45
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
46
  s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
50
- s.add_runtime_dependency(%q<fastercsv>, ["~> 1.5.3"])
47
+ s.add_runtime_dependency(%q<fastercsv>, ["~> 1.5.1"])
51
48
  else
52
49
  s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
53
- s.add_dependency(%q<fastercsv>, ["~> 1.5.3"])
50
+ s.add_dependency(%q<fastercsv>, ["~> 1.5.1"])
54
51
  end
55
52
  else
56
53
  s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
57
- s.add_dependency(%q<fastercsv>, ["~> 1.5.3"])
54
+ s.add_dependency(%q<fastercsv>, ["~> 1.5.1"])
58
55
  end
59
56
  end
60
57
 
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seedsv
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease: false
6
- segments:
7
- - 1
8
- - 0
9
- - 1
10
- version: 1.0.1
4
+ prerelease:
5
+ version: 1.1.0
11
6
  platform: ruby
12
7
  authors:
13
8
  - Adrian Cuadros
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2010-09-23 00:00:00 -05:00
13
+ date: 2011-03-11 00:00:00 -06:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
@@ -26,9 +21,6 @@ dependencies:
26
21
  requirements:
27
22
  - - ">="
28
23
  - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
24
  version: "0"
33
25
  type: :development
34
26
  version_requirements: *id001
@@ -40,12 +32,7 @@ dependencies:
40
32
  requirements:
41
33
  - - ~>
42
34
  - !ruby/object:Gem::Version
43
- hash: 5
44
- segments:
45
- - 1
46
- - 5
47
- - 3
48
- version: 1.5.3
35
+ version: 1.5.1
49
36
  type: :runtime
50
37
  version_requirements: *id002
51
38
  description: Seed your database with data from csv files with ease
@@ -59,7 +46,6 @@ extra_rdoc_files:
59
46
  - README.rdoc
60
47
  files:
61
48
  - .document
62
- - .gitignore
63
49
  - LICENSE
64
50
  - README.rdoc
65
51
  - Rakefile
@@ -76,8 +62,8 @@ homepage: http://github.com/adriancuadros/seedsv
76
62
  licenses: []
77
63
 
78
64
  post_install_message:
79
- rdoc_options:
80
- - --charset=UTF-8
65
+ rdoc_options: []
66
+
81
67
  require_paths:
82
68
  - lib
83
69
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -85,23 +71,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
85
71
  requirements:
86
72
  - - ">="
87
73
  - !ruby/object:Gem::Version
88
- hash: 3
89
- segments:
90
- - 0
91
74
  version: "0"
92
75
  required_rubygems_version: !ruby/object:Gem::Requirement
93
76
  none: false
94
77
  requirements:
95
78
  - - ">="
96
79
  - !ruby/object:Gem::Version
97
- hash: 3
98
- segments:
99
- - 0
100
80
  version: "0"
101
81
  requirements: []
102
82
 
103
83
  rubyforge_project:
104
- rubygems_version: 1.3.7
84
+ rubygems_version: 1.5.2
105
85
  signing_key:
106
86
  specification_version: 3
107
87
  summary: Seed your database with data from csv files with ease
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC