live_fixtures 0.3.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a728fd952006fc7d03f41ba8a0e7680005937f08
4
- data.tar.gz: 169ea945ee73cc0d6183ddd590b72f520d851186
2
+ SHA256:
3
+ metadata.gz: 9414f9b5a408acaff1c2749f0f3127412f23f6d364988fcf1f75ce9a15b0cbe4
4
+ data.tar.gz: f6304bcef06ba8b4e153d7ff19744e9af837592ea0aa72a758a5446e3933055c
5
5
  SHA512:
6
- metadata.gz: e7b69490985e19b66e30726fda1d0a1c41f031a6f166512f1b1c929658453259ed7945237b926cd73991233284f35717dcb9a9076a5e307d80c8abed30b11a9f
7
- data.tar.gz: 2fc58a3b1b222bea1a9869269a5241cf269dec3447ad00c17dcec0a9f6a2ffa0e356795c84a88abfab3f793c6ddde7dcec9d4dec446c48eff4f62371e1eee2af
6
+ metadata.gz: 348ebda33ef0e11062c823ab14d64dc5b5c5947686f91d2a094836b7a1499061ff7e306a1e943824a27e958dad4e8ed4581b5626b835c191a5409a2d735f557b
7
+ data.tar.gz: 03eb2d921c1de9d75f144c99dd5166298d2ed67d79844bb5b2aac1b44acb31a00a2076ef4ec27e2a50a72b5f41de68d6168bb517786fb1fef7aadec8d610199f
@@ -2,6 +2,44 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
+ ## [2.1.0] - 2020-12-09
6
+ ### Added
7
+ support for selectively import tables with custom callbacks per table (#34)
8
+
9
+ ## [2.0.0] - 2020-11-11
10
+ ### Breaking changes
11
+ This is a breaking change because LiveFixtures::Import.new now needs to receive the class_names Hash to be able to correctly compute the insert_order in case there are some unconventional class names associations. And the class_names argument is removed from import_all. But this is the only change.
12
+
13
+ ### Added
14
+ - compute insert_order automatically (#33)
15
+
16
+ ## [1.0.1] - 2019-04-10
17
+ ### Fixed
18
+ - fixed incompatibility with mysql
19
+
20
+ ### Added
21
+ - mysql regression test, confirmation that this gem doesn't work with psotgres
22
+
23
+ ## [1.0.0] - 2019-02-15
24
+ ### Breaking changes
25
+ - drop support for rails 4.2, ruby < 2.3
26
+
27
+ ### Fixed
28
+ - support for rails 5
29
+
30
+ ### Added
31
+ - None
32
+
33
+ ## [0.3.1] - 2018-03-28
34
+ ### Breaking changes
35
+ - None
36
+
37
+ ### Fixed
38
+ - None
39
+
40
+ ### Added
41
+ - It is now possible to export an attribute named "id" when it is included among the [additional attributes](https://github.com/NoRedInk/live_fixtures/tree/3868aaddbeb1c0174261673855610c4f8d9e7842#additional-attributes). #25
42
+
5
43
  ## [0.3.0] - 2017-08-10
6
44
  ### Breaking changes
7
45
  - Imports now raise an error when unable to find a referenced model.
data/README.md CHANGED
@@ -13,6 +13,9 @@ LiveFixtures uses a different strategy that means it is safer to use in a live e
13
13
 
14
14
  For more information, see [the motivation section below](#motivation).
15
15
 
16
+ ## Compatibility
17
+ LiveFixtures is tested against Sqlite3 & mysql. It is known to be incompatible with postgres.
18
+
16
19
  ## Installation
17
20
 
18
21
  Add this line to your application's Gemfile:
@@ -73,7 +76,7 @@ The `LiveFixtures::Export` module is meant to be included into your export class
73
76
 
74
77
  ### Importing
75
78
 
76
- The `LiveFixtures::Import` class allows you to specify the location of your fixtures and the order in which to import them. Once you've done that, you can import them directly to your database.
79
+ The `LiveFixtures::Import` class allows you to specify the location of your fixtures and, optionally, the order in which to import them. If you don't specify an order, the order will be computed from the ActiveRecord models associations. Once you've done that, you can import them directly to your database.
77
80
 
78
81
 
79
82
  module Seed::User
@@ -1,9 +1,11 @@
1
1
  require "live_fixtures/version"
2
2
  require "live_fixtures/import"
3
3
  require "live_fixtures/import/fixtures"
4
+ require "live_fixtures/import/insertion_order_computer"
4
5
  require "live_fixtures/export"
5
6
  require "live_fixtures/export/fixture"
6
7
  require "ruby-progressbar"
8
+ require "yaml"
7
9
 
8
10
  module LiveFixtures
9
11
  module_function
@@ -55,10 +55,15 @@ module LiveFixtures::Export
55
55
  # @yieldparam model [ActiveRecord::Base] each successive model.
56
56
  # @yieldreturn [Hash{String => Object}] a hash of attributes to be merged and saved with the model's attributes.
57
57
  def export_fixtures(models, with_references = [])
58
- return unless models.present?
58
+ return [] unless models.present?
59
59
 
60
- table_name = models.first.class.table_name
61
- File.open(File.join(@dir, table_name + '.yml'), 'w') do |file|
60
+ model_class = models.first.class
61
+
62
+ File.open(File.join(@dir, model_class.table_name + '.yml'), 'w') do |file|
63
+ file.write <<~PRELUDE
64
+ _fixture:
65
+ model_class: #{model_class.name}
66
+ PRELUDE
62
67
 
63
68
  iterator = export_options[:show_progress] ? ProgressBarIterator : SimpleIterator
64
69
 
@@ -66,7 +71,6 @@ module LiveFixtures::Export
66
71
  more_attributes = block_given? ? yield(model) : {}
67
72
  file.write Fixture.to_yaml(model, with_references, more_attributes)
68
73
  end
69
-
70
74
  end
71
75
  end
72
76
 
@@ -36,8 +36,7 @@ module LiveFixtures::Export::Fixture
36
36
  end
37
37
 
38
38
  private_class_method def yml_attributes(model, more_attributes)
39
- model.attributes.merge(more_attributes).map do |name, value|
40
- next if %w{id}.include? name
39
+ model.attributes.except("id").merge(more_attributes).map do |name, value|
41
40
  next if value.nil?
42
41
 
43
42
  serialize_attribute(model, name, value)
@@ -48,7 +47,7 @@ module LiveFixtures::Export::Fixture
48
47
  attribute_type = model.class.type_for_attribute(name)
49
48
 
50
49
  if attribute_type.is_a?(ActiveRecord::Type::Serialized)
51
- value = attribute_type.type_cast_for_database(value) unless value.is_a?(String)
50
+ value = attribute_type.serialize(value) unless value.is_a?(String)
52
51
 
53
52
  "#{name}: |-\n#{value.to_s.indent(4)}" unless value.nil?
54
53
  elsif value.is_a? LiveFixtures::Export::Reference
@@ -1,36 +1,71 @@
1
+ require 'benchmark'
2
+
1
3
  # An object that facilitates the import of fixtures into a database.
2
4
  class LiveFixtures::Import
3
5
  NO_LABEL = nil
4
6
 
7
+ # Returns the insert order that was specified in the constructor or
8
+ # the inferred one if none was specified.
9
+ attr_reader :insert_order
10
+
11
+ # Map of table_name to import routine
12
+ # @return [Hash<String => Proc>]
13
+ attr_reader :alternate_imports
14
+
15
+ # Accessor for string label for a given fixture mapping to it's db id
16
+ attr_reader :label_to_id
17
+
5
18
  # Instantiate a new Import with the directory containing your fixtures, and
6
19
  # the order in which to import them. The order should ensure fixtures
7
20
  # containing references to another fixture are imported AFTER the referenced
8
21
  # fixture.
9
22
  # @raise [ArgumentError] raises an argument error if not every element in the insert_order has a corresponding yml file.
10
23
  # @param root_path [String] path to the directory containing the yml files to import.
11
- # @param insert_order [Array<String>] a list of yml files (without .yml extension) in the order they should be imported.
24
+ # @param insert_order [Array<String> | Nil] a list of yml files (without .yml extension) in the order they should be imported, or `nil` if these order is to be inferred by this class.
25
+ # @param class_names [Hash{Symbol => String}] a mapping table name => Model class, for any that don't follow convention.
12
26
  # @param [Hash] opts export configuration options
13
27
  # @option opts [Boolean] show_progress whether or not to show the progress bar
14
28
  # @option opts [Boolean] skip_missing_tables when false, an error will be raised if a yaml file isn't found for each table in insert_order
15
29
  # @option opts [Boolean] skip_missing_refs when false, an error will be raised if an ID isn't found for a label.
30
+ # @option opts [Boolean] use_insert_order_as_table_names when true, table names will be those passed in insert_order, not read from yaml files
16
31
  # @return [LiveFixtures::Import] an importer
17
32
  # @see LiveFixtures::Export::Reference
18
- def initialize(root_path, insert_order, **opts)
19
- defaut_options = { show_progress: true, skip_missing_tables: false, skip_missing_refs: false }
33
+ def initialize(root_path, insert_order = nil, class_names = {}, **opts)
34
+ defaut_options = {
35
+ show_progress: true,
36
+ skip_missing_tables: false,
37
+ skip_missing_refs: false,
38
+ use_insert_order_as_table_names: false,
39
+ }
20
40
  @options = defaut_options.merge(opts)
21
41
  @root_path = root_path
22
- @table_names = Dir.glob(File.join(@root_path, '{*,**}/*.yml')).map do |filepath|
23
- File.basename filepath, ".yml"
42
+
43
+ if insert_order && @options[:use_insert_order_as_table_names]
44
+ @table_names = insert_order
45
+ else
46
+ @table_names = Dir.glob(File.join(@root_path, '{*,**}/*.yml')).map do |filepath|
47
+ File.basename filepath, ".yml"
48
+ end
24
49
  end
25
- @table_names = insert_order.select {|table_name| @table_names.include? table_name}
26
- if @table_names.size < insert_order.size && !@options[:skip_missing_tables]
27
- raise ArgumentError, "table(s) mentioned in `insert_order` which has no yml file to import: #{insert_order - @table_names}"
50
+
51
+ @class_names = class_names
52
+ @table_names.each { |n|
53
+ @class_names[n.tr('/', '_').to_sym] ||= n.classify if n.include?('/')
54
+ }
55
+
56
+ @insert_order = insert_order
57
+ @insert_order ||= InsertionOrderComputer.compute(@table_names, @class_names, compute_polymorphic_associations)
58
+
59
+ @table_names = @insert_order.select {|table_name| @table_names.include? table_name}
60
+ if @table_names.size < @insert_order.size && !@options[:skip_missing_tables]
61
+ raise ArgumentError, "table(s) mentioned in `insert_order` which has no yml file to import: #{@insert_order - @table_names}"
28
62
  end
63
+
29
64
  @label_to_id = {}
65
+ @alternate_imports = {}
30
66
  end
31
67
 
32
68
  # Within a transaction, import all the fixtures into the database.
33
- # @param class_names [Hash{Symbol => String}] a mapping table name => Model class, for any that don't follow convention.
34
69
  #
35
70
  # The very similar method: ActiveRecord::FixtureSet.create_fixtures has the
36
71
  # unfortunate side effect of truncating each table!!
@@ -39,20 +74,25 @@ class LiveFixtures::Import
39
74
  # with calling {LiveFixtures::Import::Fixtures#each_table_row_with_label} instead of
40
75
  # `AR::Fixtures#table_rows`, and using those labels to populate `@label_to_id`.
41
76
  # @see https://github.com/rails/rails/blob/4-2-stable/activerecord/lib/active_record/fixtures.rb#L496
42
- def import_all(class_names = {})
43
- @table_names.each { |n|
44
- class_names[n.tr('/', '_').to_sym] ||= n.classify if n.include?('/')
45
- }
46
-
77
+ def import_all
47
78
  connection = ActiveRecord::Base.connection
79
+ show_progress = @options[:show_progress]
48
80
 
81
+ # TODO: should be additive with alternate_imports so we can delete the fixture file
49
82
  files_to_read = @table_names
50
83
 
51
- unless files_to_read.empty?
52
- connection.transaction(requires_new: true) do
53
- files_to_read.each do |path|
54
- table_name = path.tr '/', '_'
55
- class_name = class_names[table_name.to_sym] || table_name.classify
84
+ return if files_to_read.empty?
85
+
86
+ connection.transaction(requires_new: true) do
87
+ files_to_read.each do |path|
88
+ table_name = path.tr '/', '_'
89
+ if alternate = @alternate_imports[table_name]
90
+ time = Benchmark.ms do
91
+ alternate.call(@label_to_id)
92
+ end
93
+ puts "Imported %s in %.0fms" % [table_name, time] if show_progress
94
+ else
95
+ class_name = @class_names[table_name.to_sym] || table_name.classify
56
96
 
57
97
  ff = Fixtures.new(connection,
58
98
  table_name,
@@ -62,21 +102,76 @@ class LiveFixtures::Import
62
102
  skip_missing_refs: @options[:skip_missing_refs])
63
103
 
64
104
  conn = ff.model_connection || connection
65
- iterator = @options[:show_progress] ? ProgressBarIterator : SimpleIterator
66
- iterator.new(ff).each do |table_name, label, row|
67
- conn.insert_fixture(row, table_name)
68
- @label_to_id[label] = conn.last_inserted_id(table_name) unless label == NO_LABEL
105
+
106
+ iterator = show_progress ? ProgressBarIterator : SimpleIterator
107
+ iterator.new(ff).each do |tname, label, row|
108
+ conn.insert_fixture(row, tname)
109
+ @label_to_id[label] = conn.send(:last_inserted_id, tname) unless label == NO_LABEL
69
110
  end
70
111
  end
71
112
  end
72
113
  end
73
114
  end
74
115
 
116
+ # Override import of table using a callable object
117
+ # @param table_name [String] table to use callable instead of fixture file
118
+ # @param callable [Proc] Proc/lambda that will be called with @label_to_id
119
+ def override(table_name, callable)
120
+ @alternate_imports[table_name] = callable
121
+ self
122
+ end
123
+
124
+ private
125
+
126
+ # Here we go through each of the fixture YAML files to see what polymorphic
127
+ # dependencies exist for each of the models.
128
+ # We do this by inspecting the value of any field that ends with `_type`,
129
+ # for example `author_type`, `assignment_type`, etc.
130
+ # Becuase we can't know all the possible types of a polymorphic association
131
+ # we compute them from the YAML file contents.
132
+ # Returns a Hash[Class => Set[Class]]
133
+ def compute_polymorphic_associations
134
+ polymorphic_associations = Hash.new { |h, k| h[k] = Set.new }
135
+
136
+ connection = ActiveRecord::Base.connection
137
+ files_to_read = @table_names
138
+
139
+ files_to_read.each do |path|
140
+ table_name = path.tr '/', '_'
141
+ class_name = @class_names[table_name.to_sym] || table_name.classify
142
+
143
+ # Here we use the yaml file and YAML.load instead of ActiveRecord::FixtureSet.new
144
+ # because it's faster and we can also check whether we actually need to
145
+ # load the file: only if it includes "_type" in it, otherwise there will be
146
+ # no polymorphic types in there.
147
+
148
+ filename = ::File.join(@root_path, "#{path}.yml")
149
+ file = File.read(filename)
150
+ next unless file =~ /_type/
151
+
152
+ yaml = YAML.load(file)
153
+ yaml.each do |key, object|
154
+ object.each do |field, value|
155
+ next unless field.ends_with?("_type")
156
+
157
+ begin
158
+ polymorphic_associations[class_name.constantize] << value.constantize
159
+ rescue NameError
160
+ # It might be the case that the `..._type` field doesn't actually
161
+ # refer to a type name, so we just ignore it.
162
+ end
163
+ end
164
+ end
165
+ end
166
+
167
+ polymorphic_associations
168
+ end
169
+
75
170
  class ProgressBarIterator
76
171
  def initialize(ff)
77
172
  @ff = ff
78
173
  @bar = LiveFixtures.get_progress_bar(
79
- total:ff.fixtures.size,
174
+ total: ff.fixtures.size,
80
175
  title: ff.model_class.name
81
176
  )
82
177
  end
@@ -0,0 +1,127 @@
1
+ class LiveFixtures::Import
2
+ # :nodoc:
3
+ class InsertionOrderComputer
4
+ # :nodoc:
5
+ class Node
6
+ attr_reader :path
7
+ attr_reader :class_name
8
+ attr_reader :klass
9
+
10
+ # The classes this node depends on
11
+ attr_reader :dependencies
12
+
13
+ def initialize(path, class_name, klass)
14
+ @path = path
15
+ @class_name = class_name
16
+ @klass = klass
17
+ @dependencies = Set.new
18
+ end
19
+ end
20
+
21
+ def self.compute(table_names, class_names = {}, polymorphic_associations = {})
22
+ new(table_names, class_names, polymorphic_associations).compute
23
+ end
24
+
25
+ def initialize(table_names, class_names = {}, polymorphic_associations = {})
26
+ @table_names = table_names
27
+ @class_names = class_names
28
+ @polymorphic_associations = polymorphic_associations
29
+ end
30
+
31
+ def compute
32
+ nodes = build_nodes
33
+ compute_insert_order(nodes)
34
+ end
35
+
36
+ private
37
+
38
+ # Builds an Array of Nodes, each containing dependencies to other nodes
39
+ # using their class names.
40
+ def build_nodes
41
+ # Create a Hash[Class => Node] for each table/class
42
+ nodes = {}
43
+ @table_names.each do |path|
44
+ table_name = path.tr "/", "_"
45
+ class_name = @class_names[table_name.to_sym] || table_name.classify
46
+ klass = class_name.constantize
47
+ nodes[klass] = Node.new(path, class_name, klass)
48
+ end
49
+
50
+ # First iniitalize dependencies from polymorphic associations that we
51
+ # explicitly found in the yaml files.
52
+ @polymorphic_associations.each do |klass, associations|
53
+ associations.each do |association|
54
+ node = nodes[klass]
55
+ next unless node
56
+ next unless nodes.key?(association)
57
+
58
+ node.dependencies << association
59
+ end
60
+ end
61
+
62
+ # Compute dependencies between nodes/classes by reflecting on their
63
+ # ActiveRecord associations.
64
+ nodes.each do |_, node|
65
+ klass = node.klass
66
+ klass.reflect_on_all_associations.each do |assoc|
67
+ # We can't handle polymorphic associations, but the concrete types
68
+ # should have been deduced from the yaml files contents
69
+ next if assoc.polymorphic?
70
+
71
+ # Don't add a dependency if the class is not in the given table names
72
+ next unless nodes.key?(assoc.klass)
73
+
74
+ # A class might depend on itself, but we don't add it as a dependency
75
+ # because otherwise we'll never make it (the class can probably be created
76
+ # just fine and these dependencies are optional/nilable)
77
+ next if klass == assoc.klass
78
+
79
+ case assoc.macro
80
+ when :belongs_to
81
+ node.dependencies << assoc.klass
82
+ when :has_one, :has_many
83
+ # Skip `through` association becuase it will be already computed
84
+ # for the related `has_one`/`has_many` association
85
+ next if assoc.options[:through]
86
+
87
+ nodes[assoc.klass].dependencies << klass
88
+ end
89
+ end
90
+ end
91
+
92
+ # Finally sort all values by name for consistent results
93
+ nodes.values.sort_by { |node| node.klass.name }
94
+ end
95
+
96
+ def compute_insert_order(nodes)
97
+ insert_order = []
98
+
99
+ until nodes.empty?
100
+ # Pick a node that has no dependencies
101
+ free_node = nodes.find { |node| node.dependencies.empty? }
102
+
103
+ if free_node.nil?
104
+ msg = "Can't compute an insert order.\n\n"
105
+ msg << "These models seem to depend on each other:\n"
106
+ nodes.each do |node|
107
+ msg << " #{node.klass.name}\n"
108
+ msg << " - depends on: #{node.dependencies.map(&:name).join(", ")}\n"
109
+ end
110
+ raise msg
111
+ end
112
+
113
+ insert_order << free_node.path
114
+
115
+ # Delete this node from the other nodes' dependencies
116
+ nodes.each do |node|
117
+ node.dependencies.delete(free_node.klass)
118
+ end
119
+
120
+ # And delete this node because we are done with it
121
+ nodes.delete(free_node)
122
+ end
123
+
124
+ insert_order
125
+ end
126
+ end
127
+ end
@@ -1,3 +1,3 @@
1
1
  module LiveFixtures
2
- VERSION = "0.3.0"
2
+ VERSION = "2.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: live_fixtures
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jleven
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-10 00:00:00.000000000 Z
11
+ date: 1970-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.2'
19
+ version: '5.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.2'
26
+ version: '5.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ruby-progressbar
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,56 +44,56 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.11'
47
+ version: '2.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.11'
54
+ version: '2.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '12.3'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '12.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3.0'
75
+ version: '3.8'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '3.0'
82
+ version: '3.8'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: temping
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.0'
89
+ version: '3.10'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.0'
96
+ version: '3.10'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: byebug
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -110,6 +110,34 @@ dependencies:
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: sqlite3
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 1.3.13
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 1.3.13
125
+ - !ruby/object:Gem::Dependency
126
+ name: mysql2
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: pg
113
141
  requirement: !ruby/object:Gem::Requirement
114
142
  requirements:
115
143
  - - ">="
@@ -150,7 +178,7 @@ dependencies:
150
178
  - - ">="
151
179
  - !ruby/object:Gem::Version
152
180
  version: '0'
153
- description:
181
+ description:
154
182
  email:
155
183
  - josh@noredink.com
156
184
  executables: []
@@ -165,12 +193,13 @@ files:
165
193
  - lib/live_fixtures/export/fixture.rb
166
194
  - lib/live_fixtures/import.rb
167
195
  - lib/live_fixtures/import/fixtures.rb
196
+ - lib/live_fixtures/import/insertion_order_computer.rb
168
197
  - lib/live_fixtures/version.rb
169
- homepage:
198
+ homepage:
170
199
  licenses:
171
200
  - MIT
172
201
  metadata: {}
173
- post_install_message:
202
+ post_install_message:
174
203
  rdoc_options: []
175
204
  require_paths:
176
205
  - lib
@@ -185,9 +214,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
214
  - !ruby/object:Gem::Version
186
215
  version: '0'
187
216
  requirements: []
188
- rubyforge_project:
189
- rubygems_version: 2.4.8
190
- signing_key:
217
+ rubygems_version: 3.1.4
218
+ signing_key:
191
219
  specification_version: 4
192
220
  summary: Tools for exporting and importing between databases managed by ActiveRecord.
193
221
  test_files: []