support_table_data 1.2.2 → 1.2.4

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
2
  SHA256:
3
- metadata.gz: 8719f2da306b1e4803e773daca19142c381227b2697f5549e3666f962e1e6896
4
- data.tar.gz: 6cdb23dd575e02d73168ae6498719df66bbf42608498c25994c00011accf1d88
3
+ metadata.gz: 25c555ca2a0e07c825f2b13c70224cf4e4ae27e489bad54e4e9f5983fa26df8a
4
+ data.tar.gz: b033e09b4eac22c923dc489d8d9762ffad9fdfec65f8fe25f20d13bd76339a48
5
5
  SHA512:
6
- metadata.gz: 283969dba42d61ccdcfcf8614b40492a20e42e05775a0e0a9397ffc275a83a9a5dd3a2abdf639694413a423cd1731c0a0aca811ca58f51fee18c75da7ff99d27
7
- data.tar.gz: b63681662984a4a0673eeb7d2ec8ada7d4368dcc903acab201331c1270f966ca1dc3de44579a0c5323e59afdecf1c022cdfa728136fa194ea3c7aa8e2329f3f5
6
+ metadata.gz: ad12a5e0be457211552148035f0102b484ac27d17868f7a41d471b95b65b2e933e95e6179068f9fd6f4e09987e005bcf22bdef9748dbb8e04e566cc30053f542
7
+ data.tar.gz: a891b014ff3d7b92d26375223e61cf0f8419f05bbb0f55b2a16d8602b634c36f9f8d3449e301bc1fd23a03defadb24150c64902ea0f5530914db8d62780279a5
data/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 1.2.4
8
+
9
+ ### Fixed
10
+
11
+ - Fixed issue with `sync_all!` finding obsolete classes that are no longer defined as support tables in development or test environments.
12
+
13
+ ## 1.2.3
14
+
15
+ ### Fixed
16
+
17
+ - Made loading data from the data files thread safe.
18
+
7
19
  ## 1.2.2
8
20
 
9
21
  ### Fixed
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.2
1
+ 1.2.4
@@ -370,7 +370,8 @@ module SupportTableData
370
370
  # Eager load any classes defined in the default data directory by guessing class names
371
371
  # from the file names.
372
372
  if SupportTableData.data_directory && File.exist?(SupportTableData.data_directory) && File.directory?(SupportTableData.data_directory)
373
- Dir.chdir(SupportTableData.data_directory) { Dir.glob(File.join("**", "*")) }.each do |file_name|
373
+ Dir.glob(File.join(SupportTableData.data_directory, "**", "*")).sort.each do |file_name|
374
+ file_name = file_name.delete_prefix("#{SupportTableData.data_directory}#{File::SEPARATOR}")
374
375
  class_name = file_name.sub(/\.[^.]*/, "").singularize.camelize
375
376
  class_name.safe_constantize
376
377
  end
@@ -379,6 +380,7 @@ module SupportTableData
379
380
  active_record_classes = ActiveRecord::Base.descendants.reject { |klass| klass.name.nil? }
380
381
  active_record_classes.sort_by(&:name).each do |klass|
381
382
  next unless klass.include?(SupportTableData)
383
+ next unless klass.instance_variable_defined?(:@support_table_data_files) && klass.instance_variable_get(:@support_table_data_files).is_a?(Array)
382
384
  next if klass.abstract_class?
383
385
  next if classes.include?(klass)
384
386
  classes << klass
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: support_table_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Durand
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-21 00:00:00.000000000 Z
11
+ date: 2024-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord