live_fixtures 0.3.1 → 2.2.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: b30af4bf80a77296eab60dbddfd2ff1240ca52b7
4
- data.tar.gz: 2c24a1898e6ec545603ba57dc8f3c5f674f5169b
2
+ SHA256:
3
+ metadata.gz: 5eeba979242569ec0f94e990bae7d73b5dc35bac27b15ad7efff6f073de3589e
4
+ data.tar.gz: 54cebba2b0a73a58c916e4e416d66127e3fa0d625c2eaf1cfdac83e2cab2c441
5
5
  SHA512:
6
- metadata.gz: 39f4ea9917b27ad09739d524d578d5a8cdaa2247b0dc7b78cbdb6873ab30e959be08b88f4570860529cdb99628d1c97d64951b6edb35be2f37ebafdb859910dd
7
- data.tar.gz: a7f9561e6f244a615c4a7df18cd3d6e01fa1774b37c01607577246a5fcb13c67a20235b8544fa970232d36735f53def6a4207238e25dfbb9116f5045387b2d47
6
+ metadata.gz: 1373aa766f1c8772a3d6e72f501320efd919396876ec276c50c4a661ac714b99a65fa815e86b01a41943bcc5323530bd52a72e5a98f29ba4188cacef25c4b57f
7
+ data.tar.gz: 70d4d8b975c414de07b1255416f6ef7128a4a622db16afd00a670e3879fe1f48ad5e16fc9d92ffba3c8803d500d303e5faac8d705d50734c416609767bdf3cec
@@ -2,6 +2,42 @@
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.2.0] - 2020-12-09
6
+ ### Added
7
+ support rails 6, ruby 1.66, 1.7.2
8
+
9
+ ### Removed
10
+ drop support for legacy rubies. Chose not to do a major version bump BUT MAYBE I WAS WRONG!
11
+
12
+
13
+ ## [2.1.0] - 2020-12-09
14
+ ### Added
15
+ support for selectively import tables with custom callbacks per table (#34)
16
+
17
+ ## [2.0.0] - 2020-11-11
18
+ ### Breaking changes
19
+ 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.
20
+
21
+ ### Added
22
+ - compute insert_order automatically (#33)
23
+
24
+ ## [1.0.1] - 2019-04-10
25
+ ### Fixed
26
+ - fixed incompatibility with mysql
27
+
28
+ ### Added
29
+ - mysql regression test, confirmation that this gem doesn't work with psotgres
30
+
31
+ ## [1.0.0] - 2019-02-15
32
+ ### Breaking changes
33
+ - drop support for rails 4.2, ruby < 2.3
34
+
35
+ ### Fixed
36
+ - support for rails 5
37
+
38
+ ### Added
39
+ - None
40
+
5
41
  ## [0.3.1] - 2018-03-28
6
42
  ### Breaking changes
7
43
  - None
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
@@ -1,3 +1,4 @@
1
+ require 'fileutils'
1
2
  # This module is meant to be `include`ed into your export class.
2
3
  #
3
4
  # 1. Call #set_export_dir to set the dir where files should be created.
@@ -55,10 +56,15 @@ module LiveFixtures::Export
55
56
  # @yieldparam model [ActiveRecord::Base] each successive model.
56
57
  # @yieldreturn [Hash{String => Object}] a hash of attributes to be merged and saved with the model's attributes.
57
58
  def export_fixtures(models, with_references = [])
58
- return unless models.present?
59
+ return [] unless models.present?
59
60
 
60
- table_name = models.first.class.table_name
61
- File.open(File.join(@dir, table_name + '.yml'), 'w') do |file|
61
+ model_class = models.first.class
62
+
63
+ File.open(File.join(@dir, model_class.table_name + '.yml'), 'w') do |file|
64
+ file.write <<~PRELUDE
65
+ _fixture:
66
+ model_class: #{model_class.name}
67
+ PRELUDE
62
68
 
63
69
  iterator = export_options[:show_progress] ? ProgressBarIterator : SimpleIterator
64
70
 
@@ -66,7 +72,6 @@ module LiveFixtures::Export
66
72
  more_attributes = block_given? ? yield(model) : {}
67
73
  file.write Fixture.to_yaml(model, with_references, more_attributes)
68
74
  end
69
-
70
75
  end
71
76
  end
72
77
 
@@ -47,7 +47,7 @@ module LiveFixtures::Export::Fixture
47
47
  attribute_type = model.class.type_for_attribute(name)
48
48
 
49
49
  if attribute_type.is_a?(ActiveRecord::Type::Serialized)
50
- value = attribute_type.type_cast_for_database(value) unless value.is_a?(String)
50
+ value = attribute_type.serialize(value) unless value.is_a?(String)
51
51
 
52
52
  "#{name}: |-\n#{value.to_s.indent(4)}" unless value.nil?
53
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.1"
2
+ VERSION = "2.2.0"
3
3
  end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: live_fixtures
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 2.2.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: 2018-03-28 00:00:00.000000000 Z
11
+ date: 2020-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '5.2'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '4.2'
22
+ version: 7.0.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '5.2'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '4.2'
32
+ version: 7.0.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: ruby-progressbar
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -38,62 +44,76 @@ dependencies:
38
44
  - - ">="
39
45
  - !ruby/object:Gem::Version
40
46
  version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: appraisal
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: 2.3.0
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: 2.3.0
41
61
  - !ruby/object:Gem::Dependency
42
62
  name: bundler
43
63
  requirement: !ruby/object:Gem::Requirement
44
64
  requirements:
45
65
  - - "~>"
46
66
  - !ruby/object:Gem::Version
47
- version: '1.11'
67
+ version: '2.1'
48
68
  type: :development
49
69
  prerelease: false
50
70
  version_requirements: !ruby/object:Gem::Requirement
51
71
  requirements:
52
72
  - - "~>"
53
73
  - !ruby/object:Gem::Version
54
- version: '1.11'
74
+ version: '2.1'
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: rake
57
77
  requirement: !ruby/object:Gem::Requirement
58
78
  requirements:
59
79
  - - "~>"
60
80
  - !ruby/object:Gem::Version
61
- version: '10.0'
81
+ version: '13.0'
62
82
  type: :development
63
83
  prerelease: false
64
84
  version_requirements: !ruby/object:Gem::Requirement
65
85
  requirements:
66
86
  - - "~>"
67
87
  - !ruby/object:Gem::Version
68
- version: '10.0'
88
+ version: '13.0'
69
89
  - !ruby/object:Gem::Dependency
70
90
  name: rspec
71
91
  requirement: !ruby/object:Gem::Requirement
72
92
  requirements:
73
93
  - - "~>"
74
94
  - !ruby/object:Gem::Version
75
- version: '3.0'
95
+ version: '3.10'
76
96
  type: :development
77
97
  prerelease: false
78
98
  version_requirements: !ruby/object:Gem::Requirement
79
99
  requirements:
80
100
  - - "~>"
81
101
  - !ruby/object:Gem::Version
82
- version: '3.0'
102
+ version: '3.10'
83
103
  - !ruby/object:Gem::Dependency
84
104
  name: temping
85
105
  requirement: !ruby/object:Gem::Requirement
86
106
  requirements:
87
107
  - - "~>"
88
108
  - !ruby/object:Gem::Version
89
- version: '3.0'
109
+ version: '3.10'
90
110
  type: :development
91
111
  prerelease: false
92
112
  version_requirements: !ruby/object:Gem::Requirement
93
113
  requirements:
94
114
  - - "~>"
95
115
  - !ruby/object:Gem::Version
96
- version: '3.0'
116
+ version: '3.10'
97
117
  - !ruby/object:Gem::Dependency
98
118
  name: byebug
99
119
  requirement: !ruby/object:Gem::Requirement
@@ -110,6 +130,34 @@ dependencies:
110
130
  version: '0'
111
131
  - !ruby/object:Gem::Dependency
112
132
  name: sqlite3
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - "~>"
136
+ - !ruby/object:Gem::Version
137
+ version: '1.4'
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: '1.4'
145
+ - !ruby/object:Gem::Dependency
146
+ name: mysql2
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ - !ruby/object:Gem::Dependency
160
+ name: pg
113
161
  requirement: !ruby/object:Gem::Requirement
114
162
  requirements:
115
163
  - - ">="
@@ -150,7 +198,7 @@ dependencies:
150
198
  - - ">="
151
199
  - !ruby/object:Gem::Version
152
200
  version: '0'
153
- description:
201
+ description:
154
202
  email:
155
203
  - josh@noredink.com
156
204
  executables: []
@@ -165,12 +213,13 @@ files:
165
213
  - lib/live_fixtures/export/fixture.rb
166
214
  - lib/live_fixtures/import.rb
167
215
  - lib/live_fixtures/import/fixtures.rb
216
+ - lib/live_fixtures/import/insertion_order_computer.rb
168
217
  - lib/live_fixtures/version.rb
169
- homepage:
218
+ homepage:
170
219
  licenses:
171
220
  - MIT
172
221
  metadata: {}
173
- post_install_message:
222
+ post_install_message:
174
223
  rdoc_options: []
175
224
  require_paths:
176
225
  - lib
@@ -185,9 +234,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
234
  - !ruby/object:Gem::Version
186
235
  version: '0'
187
236
  requirements: []
188
- rubyforge_project:
189
- rubygems_version: 2.4.8
190
- signing_key:
237
+ rubygems_version: 3.1.5
238
+ signing_key:
191
239
  specification_version: 4
192
240
  summary: Tools for exporting and importing between databases managed by ActiveRecord.
193
241
  test_files: []