seed_dump 3.3.1 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,9 +6,20 @@ class SeedDump
6
6
 
7
7
  models = retrieve_models(env) - retrieve_models_exclude(env)
8
8
 
9
- limit = retrieve_limit_value(env)
9
+ # Sort models by foreign key dependencies (issues #78, #83)
10
+ # This ensures models are dumped in the correct order so that
11
+ # seeds can be imported without foreign key violations.
12
+ models = sort_models_by_dependencies(models)
13
+
14
+ global_limit = retrieve_limit_value(env)
15
+ model_limits = retrieve_model_limits_value(env)
10
16
  append = retrieve_append_value(env)
11
17
  models.each do |model|
18
+ # Determine the limit to apply for this model:
19
+ # 1. Check MODEL_LIMITS for a per-model override
20
+ # 2. Fall back to global LIMIT
21
+ # 3. If neither, no limit is applied
22
+ limit = limit_for_model(model, model_limits, global_limit)
12
23
  model = model.limit(limit) if limit.present?
13
24
 
14
25
  SeedDump.dump(model,
@@ -16,7 +27,11 @@ class SeedDump
16
27
  batch_size: retrieve_batch_size_value(env),
17
28
  exclude: retrieve_exclude_value(env),
18
29
  file: retrieve_file_value(env),
19
- import: retrieve_import_value(env))
30
+ group_sti_by_class: retrieve_group_sti_by_class_value(env),
31
+ header: retrieve_header_value(env),
32
+ import: retrieve_import_value(env),
33
+ insert_all: retrieve_insert_all_value(env),
34
+ upsert_all: retrieve_upsert_all_value(env))
20
35
 
21
36
  append = true # Always append for every model after the first
22
37
  # (append for the first model is determined by
@@ -60,7 +75,7 @@ class SeedDump
60
75
  # model classes in the project.
61
76
  models = if models_env
62
77
  models_env.split(',')
63
- .collect {|x| x.strip.underscore.singularize.camelize.constantize }
78
+ .collect {|x| model_name_to_constant(x.strip) }
64
79
  else
65
80
  ActiveRecord::Base.descendants
66
81
  end
@@ -69,13 +84,171 @@ class SeedDump
69
84
  # Filter the set of models to exclude:
70
85
  # - The ActiveRecord::SchemaMigration model which is internal to Rails
71
86
  # and should not be part of the dumped data.
87
+ # - Classes that don't respond to table_exists? or exists? (e.g., abstract
88
+ # classes or non-model descendants of ActiveRecord::Base).
72
89
  # - Models that don't have a corresponding table in the database.
73
90
  # - Models whose corresponding database tables are empty.
74
91
  filtered_models = models.select do |model|
75
- !ACTIVE_RECORD_INTERNAL_MODELS.include?(model.to_s) && \
76
- model.table_exists? && \
77
- model.exists?
92
+ begin
93
+ !ACTIVE_RECORD_INTERNAL_MODELS.include?(model.to_s) && \
94
+ model.table_exists? && \
95
+ model.exists?
96
+ rescue NoMethodError
97
+ # Skip classes that don't properly respond to table_exists? or exists?
98
+ # This can happen with abstract classes or other non-model descendants
99
+ false
100
+ end
78
101
  end
102
+
103
+ # Deduplicate HABTM models that share the same table (issues #26, #114).
104
+ # Rails creates two auto-generated models for each HABTM association
105
+ # (e.g., User::HABTM_Roles and Role::HABTM_Users) that both point to
106
+ # the same join table. We only want to dump one of them.
107
+ deduped_habtm = deduplicate_habtm_models(filtered_models)
108
+
109
+ # Deduplicate STI models that share the same table (issue #120).
110
+ # With STI, subclasses (e.g., AdminUser < User) share the same table as
111
+ # their parent. We only want to dump the base class, which will include
112
+ # all records including subclass records with proper type discrimination.
113
+ deduplicate_sti_models(deduped_habtm)
114
+ end
115
+
116
+ # Internal: Deduplicates HABTM models that share the same table.
117
+ #
118
+ # When using has_and_belongs_to_many, Rails creates auto-generated models
119
+ # like User::HABTM_Roles and Role::HABTM_Users that both reference the same
120
+ # join table. Without deduplication, the join table data would be dumped twice.
121
+ #
122
+ # models - Array of ActiveRecord model classes.
123
+ #
124
+ # Returns the Array with duplicate HABTM models removed.
125
+ def deduplicate_habtm_models(models)
126
+ habtm, non_habtm = models.partition { |m| m.to_s.include?('HABTM_') }
127
+ non_habtm + habtm.uniq(&:table_name)
128
+ end
129
+
130
+ # Internal: Deduplicates STI models that share the same table.
131
+ #
132
+ # With Single Table Inheritance, subclasses like AdminUser < User share the
133
+ # same database table as their parent. Without deduplication, each STI class
134
+ # would be dumped separately, creating duplicate records.
135
+ #
136
+ # The solution is to keep only the base class for each STI hierarchy, which
137
+ # will include all records (base and subclass) with proper type discrimination.
138
+ #
139
+ # models - Array of ActiveRecord model classes.
140
+ #
141
+ # Returns the Array with STI subclasses removed (only base classes kept).
142
+ def deduplicate_sti_models(models)
143
+ models.select do |model|
144
+ # Keep the model only if it IS its own base class
145
+ # For STI subclasses, base_class returns the parent (e.g., AdminUser.base_class => User)
146
+ # For non-STI models, base_class returns self
147
+ model.base_class == model
148
+ end
149
+ end
150
+
151
+ # Internal: Sorts models by foreign key dependencies using topological sort.
152
+ #
153
+ # Models with foreign keys (belongs_to associations) depend on the models
154
+ # they reference. This method ensures that referenced models are dumped
155
+ # before the models that depend on them, preventing foreign key violations
156
+ # when importing seeds (issues #78, #83).
157
+ #
158
+ # For example, if Book belongs_to Author, Author will be sorted before Book.
159
+ #
160
+ # Uses Kahn's algorithm for topological sorting. If there are circular
161
+ # dependencies, the remaining models are appended in their original order.
162
+ #
163
+ # models - Array of ActiveRecord model classes to sort.
164
+ #
165
+ # Returns a new Array with models sorted by dependencies (dependencies first).
166
+ def sort_models_by_dependencies(models)
167
+ return models if models.empty?
168
+
169
+ # Build a lookup for models by table name for faster dependency resolution
170
+ model_by_table = models.each_with_object({}) do |model, hash|
171
+ hash[model.table_name] = model
172
+ end
173
+
174
+ # Build dependency graph: model -> models it depends on (via belongs_to)
175
+ dependencies = {}
176
+ models.each do |model|
177
+ dependencies[model] = find_model_dependencies(model, model_by_table)
178
+ end
179
+
180
+ # Topological sort using Kahn's algorithm
181
+ topological_sort(models, dependencies)
182
+ end
183
+
184
+ # Internal: Finds the models that a given model depends on via belongs_to.
185
+ #
186
+ # model - The ActiveRecord model class to find dependencies for.
187
+ # model_by_table - Hash mapping table names to model classes.
188
+ #
189
+ # Returns an Array of model classes that this model depends on.
190
+ def find_model_dependencies(model, model_by_table)
191
+ deps = []
192
+
193
+ # Check belongs_to associations for foreign key dependencies
194
+ model.reflect_on_all_associations(:belongs_to).each do |assoc|
195
+ # Get the table name this association points to
196
+ # Use the association's class_name if available, otherwise infer from name
197
+ begin
198
+ referenced_class = assoc.klass
199
+ referenced_table = referenced_class.table_name
200
+
201
+ # Only add as dependency if it's in our set of models to dump
202
+ if model_by_table.key?(referenced_table)
203
+ dep_model = model_by_table[referenced_table]
204
+ deps << dep_model unless dep_model == model
205
+ end
206
+ rescue NameError, ArgumentError
207
+ # Skip if we can't resolve the class (e.g., polymorphic without type)
208
+ next
209
+ end
210
+ end
211
+
212
+ deps.uniq
213
+ end
214
+
215
+ # Internal: Performs topological sort on models based on their dependencies.
216
+ #
217
+ # Uses Kahn's algorithm:
218
+ # 1. Find all models with no dependencies (no incoming edges)
219
+ # 2. Add them to the result and remove them from the graph
220
+ # 3. Repeat until all models are sorted or a cycle is detected
221
+ #
222
+ # models - Array of model classes.
223
+ # dependencies - Hash mapping each model to its dependencies.
224
+ #
225
+ # Returns an Array of models in topologically sorted order.
226
+ def topological_sort(models, dependencies)
227
+ result = []
228
+ remaining = models.dup
229
+
230
+ # Calculate in-degree (number of models depending on each model)
231
+ # We need to track which models are "ready" (all their dependencies satisfied)
232
+ while remaining.any?
233
+ # Find models whose dependencies have all been processed
234
+ ready = remaining.select do |model|
235
+ dependencies[model].all? { |dep| result.include?(dep) }
236
+ end
237
+
238
+ if ready.empty?
239
+ # Circular dependency detected - add remaining in original order
240
+ result.concat(remaining)
241
+ break
242
+ end
243
+
244
+ # Add ready models to result (maintain relative order for stability)
245
+ ready.each do |model|
246
+ result << model
247
+ remaining.delete(model)
248
+ end
249
+ end
250
+
251
+ result
79
252
  end
80
253
 
81
254
  # Internal: Returns a Boolean indicating whether the value for the "APPEND"
@@ -92,13 +265,74 @@ class SeedDump
92
265
  parse_boolean_value(env['IMPORT'])
93
266
  end
94
267
 
268
+ # Internal: Returns a Boolean indicating whether the value for the "INSERT_ALL"
269
+ # key in the given Hash is equal to the String "true" (ignoring case),
270
+ # false if no value exists. INSERT_ALL uses Rails 6+ insert_all for faster
271
+ # bulk inserts that bypass validations and callbacks.
272
+ def retrieve_insert_all_value(env)
273
+ parse_boolean_value(env['INSERT_ALL'])
274
+ end
275
+
276
+ # Internal: Returns a Boolean indicating whether the value for the "UPSERT_ALL"
277
+ # key in the given Hash is equal to the String "true" (ignoring case),
278
+ # false if no value exists. UPSERT_ALL uses Rails 6+ upsert_all to preserve
279
+ # original record IDs, which fixes foreign key reference issues when parent
280
+ # records have been deleted (issue #104).
281
+ def retrieve_upsert_all_value(env)
282
+ parse_boolean_value(env['UPSERT_ALL'])
283
+ end
284
+
285
+ # Internal: Returns a Boolean indicating whether the value for the "HEADER"
286
+ # key in the given Hash is equal to the String "true" (ignoring case),
287
+ # false if no value exists. HEADER adds a comment at the top of the seed file
288
+ # showing when and how it was generated for traceability (issue #126).
289
+ def retrieve_header_value(env)
290
+ parse_boolean_value(env['HEADER'])
291
+ end
292
+
293
+ # Internal: Returns a Boolean indicating whether the value for the "GROUP_STI_BY_CLASS"
294
+ # key in the given Hash is equal to the String "true" (ignoring case),
295
+ # false if no value exists. GROUP_STI_BY_CLASS groups STI records by their actual
296
+ # class instead of base_class to fix enum issues (issue #170).
297
+ def retrieve_group_sti_by_class_value(env)
298
+ parse_boolean_value(env['GROUP_STI_BY_CLASS'])
299
+ end
300
+
95
301
  # Internal: Retrieves an Array of Class constants parsed from the value for
96
302
  # the "MODELS_EXCLUDE" key in the given Hash, and an empty Array if such
97
303
  # key exists.
98
304
  def retrieve_models_exclude(env)
99
305
  env['MODELS_EXCLUDE'].to_s
100
306
  .split(',')
101
- .collect { |x| x.strip.underscore.singularize.camelize.constantize }
307
+ .collect { |x| model_name_to_constant(x.strip) }
308
+ end
309
+
310
+ # Internal: Converts a model name string to a constant.
311
+ #
312
+ # This method handles the issue where model names ending in 's' (like "Boss")
313
+ # were incorrectly singularized to "Bos" by older Rails versions (issue #121).
314
+ #
315
+ # The strategy is:
316
+ # 1. Try camelized form first (handles "Boss", "boss", "user_profile")
317
+ # 2. Fall back to underscore.singularize.camelize for plural table names
318
+ #
319
+ # model_name - String name of the model (e.g., "Boss", "boss", "users")
320
+ #
321
+ # Returns the Class constant for the model.
322
+ # Raises NameError if the model cannot be found.
323
+ def model_name_to_constant(model_name)
324
+ # First, try the camelized version directly
325
+ # This handles: "Boss" -> Boss, "boss" -> Boss, "user_profile" -> UserProfile
326
+ camelized = model_name.camelize
327
+ begin
328
+ return camelized.constantize
329
+ rescue NameError
330
+ # Fall through to try singularized version
331
+ end
332
+
333
+ # Fall back to traditional approach for plural names
334
+ # This handles: "users" -> User, "bosses" -> Boss
335
+ model_name.underscore.singularize.camelize.constantize
102
336
  end
103
337
 
104
338
  # Internal: Retrieves an Integer from the value for the "LIMIT" key in the
@@ -107,10 +341,71 @@ class SeedDump
107
341
  retrieve_integer_value('LIMIT', env)
108
342
  end
109
343
 
344
+ # Internal: Parses the MODEL_LIMITS environment variable into a Hash.
345
+ #
346
+ # MODEL_LIMITS allows per-model limit overrides to prevent LIMIT from
347
+ # breaking associations (issue #142). Format: "Model1:limit1,Model2:limit2"
348
+ #
349
+ # A limit of 0 means "unlimited" (dump all records for that model).
350
+ #
351
+ # Example: MODEL_LIMITS="Teacher:0,Student:50"
352
+ # - Teacher: dumps all records (0 = unlimited)
353
+ # - Student: dumps 50 records
354
+ # - Other models: fall back to global LIMIT or dump all if no LIMIT set
355
+ #
356
+ # env - Hash of environment variables.
357
+ #
358
+ # Returns a Hash mapping model names (String) to limits (Integer), or
359
+ # empty Hash if MODEL_LIMITS is not set.
360
+ def retrieve_model_limits_value(env)
361
+ return {} unless env['MODEL_LIMITS']
362
+
363
+ env['MODEL_LIMITS'].split(',').each_with_object({}) do |pair, hash|
364
+ model_name, limit = pair.split(':').map(&:strip)
365
+ hash[model_name] = limit.to_i if model_name && limit
366
+ end
367
+ end
368
+
369
+ # Internal: Determines the limit to apply for a given model.
370
+ #
371
+ # Precedence:
372
+ # 1. Per-model limit from MODEL_LIMITS (0 means unlimited)
373
+ # 2. Global LIMIT
374
+ # 3. nil (no limit, dump all records)
375
+ #
376
+ # model - The ActiveRecord model class.
377
+ # model_limits - Hash of per-model limits from MODEL_LIMITS.
378
+ # global_limit - The global LIMIT value (Integer or nil).
379
+ #
380
+ # Returns an Integer limit or nil if no limit should be applied.
381
+ def limit_for_model(model, model_limits, global_limit)
382
+ model_name = model.to_s
383
+
384
+ if model_limits.key?(model_name)
385
+ limit = model_limits[model_name]
386
+ # 0 means unlimited - return nil to skip applying limit
387
+ limit == 0 ? nil : limit
388
+ else
389
+ global_limit
390
+ end
391
+ end
392
+
110
393
  # Internal: Retrieves an Array of Symbols from the value for the "EXCLUDE"
111
394
  # key from the given Hash, and nil if no such key exists.
395
+ #
396
+ # If INCLUDE_ALL is set to 'true', returns an empty array to disable
397
+ # the default exclusion of id, created_at, updated_at columns. This provides
398
+ # a cleaner alternative to EXCLUDE="" (issue #147).
399
+ #
400
+ # Note that explicit EXCLUDE values take precedence over INCLUDE_ALL.
112
401
  def retrieve_exclude_value(env)
113
- env['EXCLUDE'] ? env['EXCLUDE'].split(',').map {|e| e.strip.to_sym} : nil
402
+ if env['EXCLUDE']
403
+ env['EXCLUDE'].split(',').map { |e| e.strip.to_sym }
404
+ elsif parse_boolean_value(env['INCLUDE_ALL'])
405
+ []
406
+ else
407
+ nil
408
+ end
114
409
  end
115
410
 
116
411
  # Internal: Retrieves the value for the "FILE" key from the given Hash, and
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seed_dump
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 3.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Halff
8
8
  - Ryan Oblak
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-05-08 00:00:00.000000000 Z
12
+ date: 2025-12-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: activesupport
15
+ name: activerecord
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ">="
@@ -26,7 +26,7 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: '4'
28
28
  - !ruby/object:Gem::Dependency
29
- name: activerecord
29
+ name: activesupport
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - ">="
@@ -45,44 +45,58 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '2.0'
48
+ version: '11.1'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '2.0'
55
+ version: '11.1'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: factory_bot
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: 4.8.2
62
+ version: '6.1'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: 4.8.2
69
+ version: '6.1'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: activerecord-import
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: '0.4'
76
+ version: '0.28'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '0.28'
84
+ - !ruby/object:Gem::Dependency
85
+ name: rspec
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '3.13'
77
91
  type: :development
78
92
  prerelease: false
79
93
  version_requirements: !ruby/object:Gem::Requirement
80
94
  requirements:
81
95
  - - "~>"
82
96
  - !ruby/object:Gem::Version
83
- version: '0.4'
97
+ version: '3.13'
84
98
  - !ruby/object:Gem::Dependency
85
- name: jeweler
99
+ name: database_cleaner-active_record
86
100
  requirement: !ruby/object:Gem::Requirement
87
101
  requirements:
88
102
  - - "~>"
@@ -95,39 +109,124 @@ dependencies:
95
109
  - - "~>"
96
110
  - !ruby/object:Gem::Version
97
111
  version: '2.0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: appraisal
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '2.4'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '2.4'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rake
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ - !ruby/object:Gem::Dependency
141
+ name: sqlite3
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: '1.3'
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '1.3'
154
+ - !ruby/object:Gem::Dependency
155
+ name: mutex_m
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ - !ruby/object:Gem::Dependency
169
+ name: logger
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ type: :development
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ - !ruby/object:Gem::Dependency
183
+ name: benchmark
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ type: :development
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ - !ruby/object:Gem::Dependency
197
+ name: base64
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ type: :development
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - ">="
208
+ - !ruby/object:Gem::Version
209
+ version: '0'
98
210
  description: Dump (parts) of your database to db/seeds.rb to get a headstart creating
99
211
  a meaningful seeds.rb file
100
212
  email: rroblak@gmail.com
101
213
  executables: []
102
214
  extensions: []
103
- extra_rdoc_files:
104
- - README.md
215
+ extra_rdoc_files: []
105
216
  files:
106
- - ".rspec"
107
- - Gemfile
108
217
  - MIT-LICENSE
109
218
  - README.md
110
- - Rakefile
111
- - VERSION
112
219
  - lib/seed_dump.rb
113
220
  - lib/seed_dump/dump_methods.rb
114
221
  - lib/seed_dump/dump_methods/enumeration.rb
115
222
  - lib/seed_dump/environment.rb
116
223
  - lib/seed_dump/railtie.rb
117
224
  - lib/tasks/seed_dump.rake
118
- - seed_dump.gemspec
119
- - spec/dump_methods_spec.rb
120
- - spec/environment_spec.rb
121
- - spec/factories/another_samples.rb
122
- - spec/factories/samples.rb
123
- - spec/factories/yet_another_samples.rb
124
- - spec/helpers.rb
125
- - spec/spec_helper.rb
126
225
  homepage: https://github.com/rroblak/seed_dump
127
226
  licenses:
128
227
  - MIT
129
228
  metadata: {}
130
- post_install_message:
229
+ post_install_message:
131
230
  rdoc_options: []
132
231
  require_paths:
133
232
  - lib
@@ -142,9 +241,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
241
  - !ruby/object:Gem::Version
143
242
  version: '0'
144
243
  requirements: []
145
- rubyforge_project:
146
- rubygems_version: 2.7.6
147
- signing_key:
244
+ rubygems_version: 3.5.22
245
+ signing_key:
148
246
  specification_version: 4
149
- summary: "{Seed Dumper for Rails}"
247
+ summary: Seed Dumper for Rails
150
248
  test_files: []
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --format progress
data/Gemfile DELETED
@@ -1,20 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activesupport', '>= 4'
4
- gem 'activerecord', '>= 4'
5
-
6
- group :development, :test do
7
- gem 'byebug', '~> 2.0'
8
- gem 'factory_bot', '~> 4.8.2'
9
- gem 'activerecord-import', '~> 0.4'
10
- end
11
-
12
- group :development do
13
- gem 'jeweler', '~> 2.0'
14
- end
15
-
16
- group :test do
17
- gem 'rspec', '~> 3.7.0'
18
- gem 'sqlite3', '~> 1.0'
19
- gem 'database_cleaner', '~> 1.0'
20
- end
data/Rakefile DELETED
@@ -1,32 +0,0 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "seed_dump"
8
- gem.summary = "{Seed Dumper for Rails}"
9
- gem.description = %Q{Dump (parts) of your database to db/seeds.rb to get a headstart creating a meaningful seeds.rb file}
10
- gem.email = 'rroblak@gmail.com'
11
- gem.homepage = 'https://github.com/rroblak/seed_dump'
12
- gem.authors = ['Rob Halff', 'Ryan Oblak']
13
- gem.license = 'MIT'
14
- end
15
- Jeweler::GemcutterTasks.new
16
- rescue LoadError
17
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
18
- end
19
-
20
- require 'rdoc/task'
21
- Rake::RDocTask.new do |rdoc|
22
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
23
-
24
- rdoc.rdoc_dir = 'rdoc'
25
- rdoc.title = "seed_dump #{version}"
26
- rdoc.rdoc_files.include('README*')
27
- rdoc.rdoc_files.include('lib/**/*.rb')
28
- end
29
-
30
- require 'rspec/core/rake_task'
31
- RSpec::Core::RakeTask.new(:spec)
32
- task :default => :spec
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 3.3.1