seeder 0.1.2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9ea65dfd79d4cec471d7647fca069f0832fb20440ecadd49a98b6bf6c2eda4c7
4
+ data.tar.gz: f23fef0a61436474b44d974ff4405b444a636923fdcac6acb049273666824850
5
+ SHA512:
6
+ metadata.gz: c9f31951b96c3a15eac31938527c350122e2c4d6cc1ff0864bdd2d359588121f434c5cff71811cbd4052eac662624c94a64b059375d004801c9d8feb6ab10379
7
+ data.tar.gz: 5ddd997b90e114659d2082480f38d2c2d29790ab0f604f708d66316420a61a8dac07b3310974389b2fcf3debb3981f349530cdcc7b1374fcbc1b1ce1b8659276
@@ -0,0 +1,2 @@
1
+ Gemfile.lock
2
+ gemfiles/*.lock
@@ -0,0 +1,45 @@
1
+ language: ruby
2
+ cache: bundler
3
+ services:
4
+ - mysql
5
+ rvm:
6
+ - 2.1.10
7
+ - 2.2.7
8
+ - 2.3.4
9
+ - 2.4.1
10
+ - 2.5.8
11
+ - 2.6.6
12
+ - 2.7.1
13
+ gemfile:
14
+ - gemfiles/5.0.gemfile
15
+ - gemfiles/5.1.gemfile
16
+ - gemfiles/5.2.gemfile
17
+ - gemfiles/6.0.gemfile
18
+ matrix:
19
+ exclude:
20
+ - rvm: 2.2.7
21
+ gemfile: gemfiles/6.0.gemfile
22
+
23
+ - rvm: 2.1.10
24
+ gemfile: gemfiles/5.0.gemfile
25
+ - rvm: 2.1.10
26
+ gemfile: gemfiles/5.1.gemfile
27
+ - rvm: 2.1.10
28
+ gemfile: gemfiles/5.2.gemfile
29
+ - rvm: 2.1.10
30
+ gemfile: gemfiles/6.0.gemfile
31
+
32
+ - rvm: 2.3.4
33
+ gemfile: gemfiles/6.0.gemfile
34
+
35
+ - rvm: 2.4.1
36
+ gemfile: gemfiles/6.0.gemfile
37
+
38
+ - rvm: 2.7.1
39
+ gemfile: gemfiles/5.0.gemfile
40
+ - rvm: 2.7.1
41
+ gemfile: gemfiles/5.1.gemfile
42
+ - rvm: 2.7.1
43
+ gemfile: gemfiles/5.2.gemfile
44
+ before_script:
45
+ - mysql -e 'create database seeder_test;'
@@ -0,0 +1,19 @@
1
+ appraise '5.0' do
2
+ gem 'activerecord', '~> 5.0.0'
3
+ gem 'mysql2', '~> 0.4.0'
4
+ end
5
+
6
+ appraise '5.1' do
7
+ gem 'activerecord', '~>5.1.0'
8
+ gem 'mysql2', '~> 0.4.0'
9
+ end
10
+
11
+ appraise '5.2' do
12
+ gem 'activerecord', '~> 5.2.0'
13
+ gem 'mysql2', '~> 0.4.0'
14
+ end
15
+
16
+ appraise '6.0' do
17
+ gem 'activerecord', '~> 6.0.3.3'
18
+ gem 'mysql2', '~> 0.4.0'
19
+ end
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
3
+
4
+ gem 'appraisal'
data/README.md CHANGED
@@ -1,49 +1,95 @@
1
- Description
2
- ===========
1
+ # seeder
3
2
 
4
- Seeder provides a way for your app to plant seed data in its database.
5
- It respects unique keys in your database, so that it does the equivalent of
6
- MySQL's "on duplicate key update" (but this is database agnostic)
3
+ Seeder provides a way for your app to plant seed data in its database. A
4
+ primary benefit of using this gem is that it gives you an easy way to manage
5
+ updating and deleting seed data, in addition to just creating it.
7
6
 
7
+ ## Install
8
8
 
9
- Install
10
- =======
9
+ ```
10
+ gem install seeder
11
+ ```
12
+
13
+ ## Motivation
14
+
15
+ Seed data refers to data stored in your database that is not generated
16
+ dynamically through your application. You can generate your seed data via
17
+ `rake db:seed`, which runs the contents of your `db/seeds.rb` file.
18
+
19
+ Generating seed data is easy enough. But as your application grows and
20
+ changes, you may find that you need to modify existing seed data.
21
+
22
+ You could run migrations to modify seed data, but you would need to make sure
23
+ to adjust the seeds.rb file in a consistent way. It is very easy to forget to
24
+ do this, or to make a mistake along the way.
25
+
26
+ Seeder allows you to manage all of your seeds via the seeds.rb file, without
27
+ needing to use migrations when you have to change existing seed data.
28
+
29
+ You provide a set of attributes associated with your seed data for a given
30
+ model. You also specify which attributes of the model should be treated as
31
+ "identifying attributes" - that is, which attributes should be used to
32
+ determine if an existing database row needs to be updated, or if a new row
33
+ needs to be added. Seeder then synchronizes the contents of the database table
34
+ to the attributes it is given.
35
+
36
+ ## Usage
37
+
38
+ Suppose you have a `DataField` model, with attributes `data_type`, `name`, and
39
+ `description`.
11
40
 
12
- $ gem install seeder
41
+ To seed your database with a couple data fields, you would just include the
42
+ following in your seeds.rb file:
13
43
 
14
- Usage
15
- =====
44
+ ```ruby
45
+ seeds = [
46
+ { data_type: "Oil", name: "btu", description: "Oil usage" },
47
+ { data_type: "Water", name: "gallons", description: "Water usage" }
48
+ ]
49
+
50
+ Seeder.create(seeds, [:data_type, :name], DataField)
51
+ ```
52
+
53
+ In the example above, the `data_type` and `name` attributes will be used to
54
+ identify records that already exist in the database. The first time you seed
55
+ data, there are no existing records so two new records will be created. If you
56
+ re-seed the database, Seeder will not do anything, since the records already
57
+ exist in the database, and no attributes have changed.
16
58
 
17
- Suppose you have a `User` model
59
+ Suppose the database has already been seeded, and you decide to change the
60
+ description of the Oil btu data field. All you need to do is update the
61
+ seeds.rb file and rerun the `db:seed` Rake task. Seeder will know to update the
62
+ _existing_ database record associated with Oil btu:
18
63
 
19
- And suppose that user model has fields "name", "age", "address", "gender"
64
+ ```ruby
65
+ seeds = [
66
+ { data_type: "Oil", name: "btu", description: "Fuel oil usage" },
67
+ { data_type: "Water", name: "gallons", description: "Water usage" }
68
+ ]
20
69
 
21
- Finally, suppose you've set up your database to have a unique key on the fields
22
- "name" and "address" (so two people can have the same name or live at the
23
- same address, but not both)
70
+ Seeder.create(seeds, [:data_type, :name], DataField)
71
+ ```
24
72
 
25
- If you wanted to seed your data with a couple users you could do the following:
73
+ If you then want to add an Oil therms DataField record to the db, you could
74
+ just add a line to your seeds.rb file:
26
75
 
27
76
  ```ruby
28
- seed_users = [
29
- {
30
- :name => "J'onn J'onzz",
31
- :age => 94,
32
- :address => 'Mars',
33
- :gender => 'Male'
34
- },
35
- {
36
- :name => "Barbara Gordon",
37
- :age => 35,
38
- :address => '14 Gotham Heights',
39
- :gender => 'Female'
40
- }
77
+ seeds = [
78
+ { data_type: "Oil", name: "btu", description: "Fuel oil usage (btu)" },
79
+ { data_type: "Oil", name: "therms", description: "Fuel oil usage (therms)" },
80
+ { data_type: "Water", name: "gallons", description: "Water usage" }
41
81
  ]
42
82
 
43
- SeedData.create {'User' => seed_users}, [:name, :address], User
83
+ Seeder.create(seeds, [:data_type, :name], DataField)
44
84
  ```
45
85
 
46
- License
47
- =======
86
+ The above code would adjust the description of the existing Oil btu database
87
+ row, and create a new one for Oil therms.
88
+
89
+ Now let's say you changed your mind and decided that you don't need an
90
+ Oil therms entry in the database. You could just delete the corresponding row
91
+ from seeds.rb, and Seeder will know to delete that entry from the database.
92
+
93
+ ## License
48
94
 
49
95
  See LICENSE.txt
data/Rakefile CHANGED
@@ -1,36 +1,3 @@
1
- require 'rake'
2
- require 'fileutils'
3
-
4
- def gemspec_name
5
- @gemspec_name ||= Dir['*.gemspec'][0]
6
- end
7
-
8
- def gemspec
9
- @gemspec ||= eval(File.read(gemspec_name), binding, gemspec_name)
10
- end
11
-
12
- desc "Build the gem"
13
- task :gem=>:gemspec do
14
- sh "gem build #{gemspec_name}"
15
- FileUtils.mkdir_p 'pkg'
16
- FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", 'pkg'
17
- end
18
-
19
- desc "Install the gem locally"
20
- task :install => :gem do
21
- sh %{gem install pkg/#{gemspec.name}-#{gemspec.version}}
22
- end
23
-
24
- desc "Generate the gemspec"
25
- task :generate do
26
- puts gemspec.to_ruby
27
- end
28
-
29
- desc "Validate the gemspec"
30
- task :gemspec do
31
- gemspec.validate
32
- end
33
-
34
1
  desc 'Run tests'
35
2
  task :test do |t|
36
3
  sh 'rspec spec'
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "activerecord", "~> 5.0.0"
7
+ gem "mysql2", "~> 0.4.0"
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "activerecord", "~>5.1.0"
7
+ gem "mysql2", "~> 0.4.0"
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "activerecord", "~> 5.2.0"
7
+ gem "mysql2", "~> 0.4.0"
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "activerecord", "~> 6.0.3.3"
7
+ gem "mysql2", "~> 0.4.0"
8
+
9
+ gemspec path: "../"
@@ -1,78 +1,66 @@
1
1
  class Seeder
2
+ attr_reader :keys, :data, :model
2
3
 
3
- class << self
4
- QUOTING = {
5
- "ActiveRecord::ConnectionAdapters::MysqlAdapter" => "`",
6
- "ActiveRecord::ConnectionAdapters::Mysql2Adapter" => "`"
7
- }
4
+ def self.create(data, keys, model)
5
+ new(data, keys, model).create
6
+ end
8
7
 
9
- def existing_data_keys(ar_model)
10
- keys = @primary_keys[ar_model.name]
11
- ar_model.all.map{|item| item.attributes.symbolize_keys.values_at(*keys) }
12
- end
8
+ def initialize(data, keys, model)
9
+ @keys = keys.map(&:to_sym)
10
+ @data = data.map(&:symbolize_keys)
11
+ @model = model
12
+ end
13
13
 
14
- def seed_data_keys(ar_model)
15
- keys = @primary_keys[ar_model.name]
16
- @data[ar_model.name].collect{|attributes| attributes.values_at(*keys) }
14
+ def create
15
+ model.transaction do
16
+ delete_outdated_records
17
+ update_existing_records
18
+ create_new_records
17
19
  end
20
+ end
18
21
 
19
- def items_to_delete(ar_model)
20
- existing_data_keys(ar_model) - seed_data_keys(ar_model)
21
- end
22
+ def delete_outdated_records
23
+ return unless records_to_delete.present?
24
+ model.where(id: records_to_delete).delete_all
25
+ end
22
26
 
23
- def value_to_sql(value)
24
- if value.nil? then 'NULL'
25
- elsif value.is_a?(String) then "'#{value}'"
26
- elsif value == false then 0
27
- elsif value == true then 1
28
- else value
29
- end
30
- end
27
+ def update_existing_records
28
+ existing_records_keys_hash.each do |record_keys, record|
29
+ attributes = data_keys_hash[record_keys]
30
+ next unless attributes
31
31
 
32
- def quote(value)
33
- q = QUOTING[ActiveRecord::Base.connection.class.to_s] || '"'
34
- "#{q}#{value}#{q}"
32
+ record.attributes = attributes
33
+ record.save! if record.changed?
35
34
  end
35
+ end
36
36
 
37
- def add_new_or_changed_data(ar_model)
38
- keys = @primary_keys[ar_model.name]
39
- find_method = "find_by_#{keys.join('_and_')}"
40
-
41
- @data[ar_model.name].collect do |attributes|
42
- relevant_keys = attributes.keys & ar_model.column_names.map(&:to_sym)
43
- existing = ar_model.send(find_method, *attributes.values_at(*keys))
44
- values = attributes.values_at(*relevant_keys)
37
+ def create_new_records
38
+ new_keys = data_keys_hash.keys - existing_records_keys_hash.keys
45
39
 
46
- if existing
47
- updates = attributes.slice(*relevant_keys).map { |k,v| "#{quote(k)} = #{value_to_sql(v)}" }.join(", ")
48
- conditions = keys.map { |k| "#{quote(k)} = #{value_to_sql(existing.send(k))}" }.join(" AND ")
49
- %(UPDATE #{ar_model.table_name} SET #{updates} WHERE #{conditions})
50
- else
51
- columns = relevant_keys.join(", ")
52
- inserts = attributes.slice(*relevant_keys).values.map { |v| value_to_sql(v) }.join(", ")
53
- %(INSERT INTO #{ar_model.table_name} (#{columns}) VALUES (#{inserts}))
54
- end
55
- end.compact
40
+ data_keys_hash.values_at(*new_keys).each do |attributes|
41
+ model.create!(attributes)
56
42
  end
43
+ end
57
44
 
58
- def delete_outdated_data(ar_model)
59
- keys = @primary_keys[ar_model.name]
60
- items_to_delete(ar_model).collect do |field_to_delete|
61
- conditions = field_to_delete.to_enum.with_index.collect{|value, index| "#{keys[index]} = '#{value}'"}.join(' AND ')
62
- %{ DELETE FROM #{ar_model.table_name} WHERE #{conditions} }
63
- end.compact
45
+ private
46
+
47
+ def data_keys_hash
48
+ @data_keys_hash ||= data.inject({}) do |hash, attributes|
49
+ hash.merge!(attributes.values_at(*keys) => attributes)
64
50
  end
51
+ end
65
52
 
66
- def create(data, keys, models)
67
- @data, @primary_keys = data, keys
68
- models.each {|model|
69
- delete_outdated_data(model).each{|query| sql(query)}
70
- add_new_or_changed_data(model).each{|query| sql(query)}
71
- }
53
+ def existing_records_keys_hash
54
+ @existing_records_keys_hash ||= model.all.inject({}) do |hash, record|
55
+ record_keys = keys.map { |key| record.public_send(key) }
56
+ hash.merge!(record_keys => record)
72
57
  end
58
+ end
73
59
 
74
- def sql(sql_command)
75
- ActiveRecord::Base.connection.execute(sql_command)
60
+ def records_to_delete
61
+ @records_to_delete ||= begin
62
+ keys_to_delete = existing_records_keys_hash.keys - data_keys_hash.keys
63
+ existing_records_keys_hash.values_at(*keys_to_delete)
76
64
  end
77
65
  end
78
66
  end
@@ -1,3 +1,3 @@
1
1
  class Seeder
2
- VERSION = '0.1.2'
2
+ VERSION = '1.3.0'
3
3
  end
@@ -3,16 +3,21 @@ require 'rubygems' unless defined? Gem
3
3
  require File.dirname(__FILE__) + "/lib/seeder/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = "seeder"
7
- s.version = Seeder::VERSION
8
- s.authors = ["Barun Singh", "Gabriel Horner"]
9
- s.email = "bsingh@wegowise.com"
10
- s.homepage = "http://github.com/wegowise/seeder"
11
- s.summary = "Seed your data"
12
- s.description = "Keep your app's seed data in one file and update it easily, while respecting key constraints"
6
+ s.name = "seeder"
7
+ s.version = Seeder::VERSION
8
+ s.authors = ["Barun Singh"]
9
+ s.email = "bsingh@wegowise.com"
10
+ s.homepage = "http://github.com/wegowise/seeder"
11
+ s.summary = "Manage seed data for your Rails app"
12
+ s.description = "Keep your app's seed data in one file and update it easily"
13
13
  s.required_rubygems_version = ">= 1.3.6"
14
- s.files = Dir.glob(%w[{lib,spec}/**/*.rb [A-Z]*.{txt,rdoc,md} *.gemspec]) + %w{Rakefile}
14
+ s.files = `git ls-files`.split("\n")
15
15
  s.extra_rdoc_files = ["README.md", "LICENSE.txt"]
16
16
  s.license = 'MIT'
17
- s.add_development_dependency 'rspec', '~> 2.6.0'
17
+
18
+ s.add_dependency('activerecord', '>= 5.0', '< 6.1')
19
+
20
+ s.add_development_dependency('mysql2', '>= 0.4.4', '< 0.6.0')
21
+ s.add_development_dependency('rspec', '~> 3.0')
22
+ s.add_development_dependency('rake', '>= 10.4')
18
23
  end
@@ -0,0 +1,110 @@
1
+ require 'active_record'
2
+ require 'support/setup'
3
+ require 'seeder'
4
+
5
+ describe Seeder do
6
+ before(:each) { Grade.delete_all }
7
+
8
+ let(:seeder) do
9
+ Seeder.new(
10
+ [{ 'student_id' => 1, 'course_id' => 1, 'grade' => 90 },
11
+ { 'student_id' => 1, 'course_id' => 2, 'grade' => 80 }],
12
+ %w[student_id course_id],
13
+ Grade
14
+ )
15
+ end
16
+
17
+ describe '.create' do
18
+ it 'should call create on a new instance' do
19
+ seeder = double
20
+ expect(Seeder).to receive(:new).with(:data, :keys, :model)
21
+ .and_return(seeder)
22
+ expect(seeder).to receive(:create)
23
+
24
+ Seeder.create(:data, :keys, :model)
25
+ end
26
+ end
27
+
28
+ describe '#new' do
29
+ specify { expect(seeder.model).to eq Grade }
30
+ specify { expect(seeder.keys).to eq [:student_id, :course_id] }
31
+ specify do
32
+ expect(seeder.data).to eq(
33
+ [{ student_id: 1, course_id: 1, grade: 90 },
34
+ { student_id: 1, course_id: 2, grade: 80 }]
35
+ )
36
+ end
37
+ end
38
+
39
+ describe '#delete_outdated_records' do
40
+ before do
41
+ Grade.create!(student_id: 1, course_id: 3)
42
+ Grade.create!(student_id: 1, course_id: 1)
43
+ end
44
+
45
+ it 'should delete outdated records' do
46
+ expect { seeder.delete_outdated_records }.to change { Grade.count }.to(1)
47
+ expect(Grade.first.course_id).to eq 1
48
+ end
49
+ end
50
+
51
+ describe '#update_existing_records' do
52
+ let!(:existing_grade) { Grade.create!(student_id: 1, course_id: 1) }
53
+
54
+ it 'should delete outdated records' do
55
+ expect { seeder.update_existing_records }
56
+ .to change { existing_grade.reload.grade }.to(90)
57
+ end
58
+ end
59
+
60
+ describe '#create_new_records' do
61
+ let!(:existing_grade) { Grade.create!(student_id: 1, course_id: 1) }
62
+
63
+ it 'should create new records when there are no existing records with
64
+ matching keys' do
65
+ expect { seeder.create_new_records }.to change { Grade.count }.to(2)
66
+ expect(Grade.last.course_id).to eq 2
67
+ end
68
+ end
69
+
70
+ describe '#create' do
71
+ it 'calls the delete, update and create methods in order' do
72
+ expect(seeder).to receive(:delete_outdated_records).ordered
73
+ expect(seeder).to receive(:update_existing_records).ordered
74
+ expect(seeder).to receive(:create_new_records).ordered
75
+ seeder.create
76
+ end
77
+
78
+ it 'aborts when an exception is raised' do
79
+ allow(seeder)
80
+ .to receive(:create_new_records)
81
+ .and_raise(ActiveRecord::RecordInvalid.new(Grade.new))
82
+ initial_attributes = Grade.all.map(&:attributes)
83
+
84
+ expect { seeder.create }.to raise_error(ActiveRecord::RecordInvalid)
85
+
86
+ expect(Grade.all.map(&:attributes)).to eq(initial_attributes)
87
+ end
88
+
89
+ it 'produces the appropriate results' do
90
+ grade1 = Grade.create!(student_id: 1, course_id: 3)
91
+ grade2 = Grade.create!(student_id: 1, course_id: 1)
92
+
93
+ seeder.create
94
+
95
+ expect(Grade.count).to eq(2)
96
+ expect(Grade.exists?(grade1.id)).to eq(false)
97
+
98
+ grade2.reload
99
+ expect(grade2.student_id).to eq(1)
100
+ expect(grade2.course_id).to eq(1)
101
+ expect(grade2.grade).to eq(90)
102
+
103
+ grade3 = Grade.last
104
+ expect(grade3.student_id).to eq(1)
105
+ expect(grade3.course_id).to eq(2)
106
+ expect(grade3.grade).to eq(80)
107
+ end
108
+ end
109
+
110
+ end
@@ -0,0 +1,9 @@
1
+ # Patch support for MySQL 5.7+ onto ActiveRecord < 4.1.
2
+ if ActiveRecord::VERSION::MAJOR < 4 ||
3
+ (ActiveRecord::VERSION::MAJOR == 4 && ActiveRecord::VERSION::MINOR < 1)
4
+
5
+ require 'active_record/connection_adapters/abstract_mysql_adapter'
6
+ class ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter
7
+ NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY"
8
+ end
9
+ end
@@ -0,0 +1,24 @@
1
+ require 'support/active_record/connection_adapters/abstract_mysql_adapter'
2
+
3
+ ActiveRecord::Base.establish_connection({
4
+ adapter: 'mysql2',
5
+ username: 'travis',
6
+ database: 'seeder_test'
7
+ })
8
+
9
+ tables_method = ActiveRecord::VERSION::MAJOR >= 5 ? :data_sources : :tables
10
+
11
+ ActiveRecord::Base.connection.public_send(tables_method).each do |table|
12
+ ActiveRecord::Base.connection.drop_table table
13
+ end
14
+
15
+ ActiveRecord::Schema.define do
16
+ create_table :grades do |t|
17
+ t.integer :student_id
18
+ t.integer :course_id
19
+ t.integer :grade
20
+ end
21
+ end
22
+
23
+ class Grade < ActiveRecord::Base
24
+ end
metadata CHANGED
@@ -1,30 +1,84 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seeder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
5
- prerelease:
4
+ version: 1.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Barun Singh
9
- - Gabriel Horner
10
- autorequire:
8
+ autorequire:
11
9
  bindir: bin
12
10
  cert_chain: []
13
- date: 2011-09-19 00:00:00.000000000Z
11
+ date: 2020-11-23 00:00:00.000000000 Z
14
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activerecord
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '5.0'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '6.1'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '5.0'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '6.1'
33
+ - !ruby/object:Gem::Dependency
34
+ name: mysql2
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 0.4.4
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: 0.6.0
43
+ type: :development
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 0.4.4
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: 0.6.0
15
53
  - !ruby/object:Gem::Dependency
16
54
  name: rspec
17
- requirement: &2165235660 !ruby/object:Gem::Requirement
18
- none: false
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '3.0'
60
+ type: :development
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '3.0'
67
+ - !ruby/object:Gem::Dependency
68
+ name: rake
69
+ requirement: !ruby/object:Gem::Requirement
19
70
  requirements:
20
- - - ~>
71
+ - - ">="
21
72
  - !ruby/object:Gem::Version
22
- version: 2.6.0
73
+ version: '10.4'
23
74
  type: :development
24
75
  prerelease: false
25
- version_requirements: *2165235660
26
- description: Keep your app's seed data in one file and update it easily, while respecting
27
- key constraints
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '10.4'
81
+ description: Keep your app's seed data in one file and update it easily
28
82
  email: bsingh@wegowise.com
29
83
  executables: []
30
84
  extensions: []
@@ -32,36 +86,45 @@ extra_rdoc_files:
32
86
  - README.md
33
87
  - LICENSE.txt
34
88
  files:
35
- - lib/seeder/version.rb
36
- - lib/seeder.rb
89
+ - ".gitignore"
90
+ - ".travis.yml"
91
+ - Appraisals
37
92
  - CHANGELOG.txt
93
+ - Gemfile
38
94
  - LICENSE.txt
39
95
  - README.md
40
- - seeder.gemspec
41
96
  - Rakefile
97
+ - gemfiles/5.0.gemfile
98
+ - gemfiles/5.1.gemfile
99
+ - gemfiles/5.2.gemfile
100
+ - gemfiles/6.0.gemfile
101
+ - lib/seeder.rb
102
+ - lib/seeder/version.rb
103
+ - seeder.gemspec
104
+ - spec/seeder_spec.rb
105
+ - spec/support/active_record/connection_adapters/abstract_mysql_adapter.rb
106
+ - spec/support/setup.rb
42
107
  homepage: http://github.com/wegowise/seeder
43
108
  licenses:
44
109
  - MIT
45
- post_install_message:
110
+ metadata: {}
111
+ post_install_message:
46
112
  rdoc_options: []
47
113
  require_paths:
48
114
  - lib
49
115
  required_ruby_version: !ruby/object:Gem::Requirement
50
- none: false
51
116
  requirements:
52
- - - ! '>='
117
+ - - ">="
53
118
  - !ruby/object:Gem::Version
54
119
  version: '0'
55
120
  required_rubygems_version: !ruby/object:Gem::Requirement
56
- none: false
57
121
  requirements:
58
- - - ! '>='
122
+ - - ">="
59
123
  - !ruby/object:Gem::Version
60
124
  version: 1.3.6
61
125
  requirements: []
62
- rubyforge_project:
63
- rubygems_version: 1.8.10
64
- signing_key:
65
- specification_version: 3
66
- summary: Seed your data
126
+ rubygems_version: 3.1.2
127
+ signing_key:
128
+ specification_version: 4
129
+ summary: Manage seed data for your Rails app
67
130
  test_files: []