seed-fu 2.0.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ Version 2.1.0
2
+ -------------
3
+
4
+ Features:
5
+
6
+ * Deprecations removed
7
+
8
+ * Rails 3.1 support added, Rails 3.0 support removed (please use 2.0.X line with 3.0)
9
+
1
10
  Version 2.0.1
2
11
  -------------
3
12
 
data/README.md CHANGED
@@ -6,7 +6,7 @@ Seed Fu is an attempt to once and for all solve the problem of inserting and mai
6
6
  Warning: API Changes
7
7
  --------------------
8
8
 
9
- Version 2.0.0 of Seed Fu introduces API changes. `Seed::Writer` has been completely overhauled and will require you to update your scripts. Some other deprecations have been introduced, but the methods will not be removed until version 2.1.0. Please see the [CHANGELOG](CHANGELOG.md) for details.
9
+ Version 2.0.0 of Seed Fu introduced API changes. `Seed::Writer` was been completely overhauled and will require you to update your scripts. Some other deprecations were introduced, and support is fully removed in version 2.1.0. Please see the [CHANGELOG](CHANGELOG.md) for details.
10
10
 
11
11
  The API documentation is available in full at [http://rubydoc.info/github/mbleigh/seed-fu/master/frames](http://rubydoc.info/github/mbleigh/seed-fu/master/frames).
12
12
 
@@ -39,17 +39,19 @@ Basic Example
39
39
  Installation
40
40
  ------------
41
41
 
42
- ### Rails 3
42
+ ### Rails 3.1
43
43
 
44
- Just add `gem 'seed-fu'` to your `Gemfile`
45
-
46
- ### Active Record 3
44
+ Just add `gem 'seed-fu', '~> 2.1.0'` to your `Gemfile`
47
45
 
48
46
  Seed Fu depends on Active Record, but doesn't have to be used with a full Rails app. Simply load and require the `seed-fu` gem and you're set.
49
47
 
48
+ ### Rails 3.0
49
+
50
+ The current version is not backwards compatible with Rails 3.0. Please use `gem 'seed-fu', '~> 2.0.0'`.
51
+
50
52
  ### Rails 2.3
51
53
 
52
- The current version is not backwards compatible with Rails 2.3. Please use Seed Fu [version 1.2.3](https://github.com/mbleigh/seed-fu/tree/v1.2.3).
54
+ The current version is not backwards compatible with Rails 2.3. Please use `gem 'seed-fu', '~> 1.2.0'`.
53
55
 
54
56
  Constraints
55
57
  -----------
@@ -137,7 +139,7 @@ If you need to programmatically generate seed files, for example to convert a CS
137
139
  Bugs / Feature requests
138
140
  -----------------------
139
141
 
140
- Please report them [on Lighthouse](http://mbleigh.lighthouseapp.com/projects/10223-seed-fu).
142
+ Please report them on [Github Issues](https://github.com/mbleigh/seed-fu/issues).
141
143
 
142
144
  Contributors
143
145
  ------------
data/lib/seed-fu.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'active_record'
2
+ require 'active_support/core_ext/module/attribute_accessors'
2
3
  require 'seed-fu/railtie' if defined?(Rails) && Rails.version >= "3"
3
4
 
4
5
  module SeedFu
@@ -44,12 +44,6 @@ module SeedFu
44
44
  SeedFu::Seeder.new(self, constraints, data, :insert_only => true).seed
45
45
  end
46
46
 
47
- # @deprecated Use {#seed} instead
48
- def seed_many(*args, &block)
49
- puts "DEPRECATED: Model.seed_many is deprecated. You can now use Model.seed in exactly the same way." unless SeedFu.quiet
50
- seed(*args, &block)
51
- end
52
-
53
47
  private
54
48
 
55
49
  def parse_seed_fu_args(args, block)
@@ -64,7 +64,7 @@ module SeedFu
64
64
 
65
65
  puts " - #{@model_class} #{data.inspect}" unless @options[:quiet]
66
66
 
67
- record.send(:attributes=, data, false)
67
+ record.assign_attributes(data, :without_protection => true)
68
68
  record.save(:validate => false) || raise(ActiveRecord::RecordNotSaved)
69
69
  record
70
70
  end
@@ -1,4 +1,4 @@
1
1
  module SeedFu
2
2
  # The current version of Seed Fu
3
- VERSION = '2.0.1'
3
+ VERSION = '2.1.0'
4
4
  end
@@ -25,11 +25,6 @@ namespace :db do
25
25
  rake db:seed FIXTURE_PATH=features/fixtures
26
26
  EOS
27
27
  task :seed_fu => :environment do
28
- if ENV["SEED"]
29
- puts "DEPRECATED: The SEED option to db:seed_fu is deprecated. Please use FILTER instead."
30
- ENV["FILTER"] = ENV["SEED"]
31
- end
32
-
33
28
  if ENV["FILTER"]
34
29
  filter = /#{ENV["FILTER"].gsub(/,/, "|")}/
35
30
  end
metadata CHANGED
@@ -1,146 +1,128 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: seed-fu
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 2
7
- - 0
8
- - 1
9
- version: 2.0.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.1.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Michael Bleigh
13
9
  - Jon Leighton
14
10
  autorequire:
15
11
  bindir: bin
16
12
  cert_chain: []
17
-
18
- date: 2010-11-05 00:00:00 +00:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
13
+ date: 2011-10-04 00:00:00.000000000Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
22
16
  name: activerecord
17
+ requirement: &8163260 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: 3.1.0
23
+ type: :runtime
23
24
  prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
+ version_requirements: *8163260
26
+ - !ruby/object:Gem::Dependency
27
+ name: activesupport
28
+ requirement: &8162740 !ruby/object:Gem::Requirement
25
29
  none: false
26
- requirements:
30
+ requirements:
27
31
  - - ~>
28
- - !ruby/object:Gem::Version
29
- segments:
30
- - 3
31
- - 0
32
- - 0
33
- version: 3.0.0
32
+ - !ruby/object:Gem::Version
33
+ version: 3.1.0
34
34
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: rspec
38
35
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
36
+ version_requirements: *8162740
37
+ - !ruby/object:Gem::Dependency
38
+ name: rspec
39
+ requirement: &8162280 !ruby/object:Gem::Requirement
40
40
  none: false
41
- requirements:
41
+ requirements:
42
42
  - - ~>
43
- - !ruby/object:Gem::Version
44
- segments:
45
- - 2
46
- - 0
47
- - 0
48
- version: 2.0.0
43
+ - !ruby/object:Gem::Version
44
+ version: '2.0'
49
45
  type: :development
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: pg
53
46
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
47
+ version_requirements: *8162280
48
+ - !ruby/object:Gem::Dependency
49
+ name: pg
50
+ requirement: &8161800 !ruby/object:Gem::Requirement
55
51
  none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- segments:
60
- - 0
61
- version: "0"
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
62
56
  type: :development
63
- version_requirements: *id003
64
- - !ruby/object:Gem::Dependency
65
- name: mysql2
66
57
  prerelease: false
67
- requirement: &id004 !ruby/object:Gem::Requirement
58
+ version_requirements: *8161800
59
+ - !ruby/object:Gem::Dependency
60
+ name: mysql2
61
+ requirement: &8161340 !ruby/object:Gem::Requirement
68
62
  none: false
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- segments:
73
- - 0
74
- version: "0"
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
75
67
  type: :development
76
- version_requirements: *id004
77
- - !ruby/object:Gem::Dependency
78
- name: sqlite3
79
68
  prerelease: false
80
- requirement: &id005 !ruby/object:Gem::Requirement
69
+ version_requirements: *8161340
70
+ - !ruby/object:Gem::Dependency
71
+ name: sqlite3
72
+ requirement: &8160920 !ruby/object:Gem::Requirement
81
73
  none: false
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- segments:
86
- - 0
87
- version: "0"
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
88
78
  type: :development
89
- version_requirements: *id005
90
- description: Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.
91
- email:
79
+ prerelease: false
80
+ version_requirements: *8160920
81
+ description: Seed Fu is an attempt to once and for all solve the problem of inserting
82
+ and maintaining seed data in a database. It uses a variety of techniques gathered
83
+ from various places around the web and combines them to create what is hopefully
84
+ the most robust seed data system around.
85
+ email:
92
86
  - michael@intridea.com
93
87
  - j@jonathanleighton.com
94
88
  executables: []
95
-
96
89
  extensions: []
97
-
98
90
  extra_rdoc_files: []
99
-
100
- files:
101
- - lib/tasks/seed_fu.rake
102
- - lib/seed-fu/block_hash.rb
103
- - lib/seed-fu/runner.rb
91
+ files:
104
92
  - lib/seed-fu/active_record_extension.rb
105
- - lib/seed-fu/seeder.rb
106
- - lib/seed-fu/railtie.rb
107
- - lib/seed-fu/version.rb
108
93
  - lib/seed-fu/writer.rb
94
+ - lib/seed-fu/version.rb
95
+ - lib/seed-fu/railtie.rb
96
+ - lib/seed-fu/runner.rb
97
+ - lib/seed-fu/seeder.rb
98
+ - lib/seed-fu/block_hash.rb
109
99
  - lib/seed-fu.rb
100
+ - lib/tasks/seed_fu.rake
110
101
  - LICENSE
111
102
  - README.md
112
103
  - CHANGELOG.md
113
- has_rdoc: true
114
104
  homepage: http://github.com/mbleigh/seed-fu
115
105
  licenses: []
116
-
117
106
  post_install_message:
118
107
  rdoc_options: []
119
-
120
- require_paths:
108
+ require_paths:
121
109
  - lib
122
- required_ruby_version: !ruby/object:Gem::Requirement
110
+ required_ruby_version: !ruby/object:Gem::Requirement
123
111
  none: false
124
- requirements:
125
- - - ">="
126
- - !ruby/object:Gem::Version
127
- segments:
128
- - 0
129
- version: "0"
130
- required_rubygems_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ! '>='
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
131
117
  none: false
132
- requirements:
133
- - - ">="
134
- - !ruby/object:Gem::Version
135
- segments:
136
- - 0
137
- version: "0"
118
+ requirements:
119
+ - - ! '>='
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
138
122
  requirements: []
139
-
140
123
  rubyforge_project:
141
- rubygems_version: 1.3.7
124
+ rubygems_version: 1.8.6
142
125
  signing_key:
143
126
  specification_version: 3
144
127
  summary: Easily manage seed data in your Active Record application
145
128
  test_files: []
146
-