activerecord-minimizer 0.1.2 → 0.1.3
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/ar_minimizer/railtie.rb +6 -0
- data/lib/ar_minimizer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd5b6b67995d6c1cbf665637d1c06d7bba3a481906a2dfab3478c1f7e9e303b0
|
|
4
|
+
data.tar.gz: f9a99422b743b0942a7e07d8de0fb43273f4ec2fdc9e9f1e34c0021e196a6aee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1bc117e578665279e838e5ce2ea05d915c271a435224b21824e4ce51af8ac01a53248c2c7c3532f9fca3c46c2927927ff81d5b65a1db5dc93aa4dd267836fbb2
|
|
7
|
+
data.tar.gz: 8895e58f378594e9b92df76e98c72d6d377f6b6c2e1f9a77441677efc1ecdef23a15d2640cac6584940c0d7c5128ac8f563d225bbd471d5d1e5f8d58aa6652c2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.3 (2026-10-18)
|
|
4
|
+
|
|
5
|
+
- `ar_minimizer:manifest` stops, saying why, when no model's table exists (a database not set up yet), instead of writing a manifest that describes no models.
|
|
6
|
+
|
|
3
7
|
## 0.1.2 (2026-10-18)
|
|
4
8
|
|
|
5
9
|
- Strict mode no longer breaks what gems and Rails call by name, so a keep
|
data/lib/ar_minimizer/railtie.rb
CHANGED
|
@@ -82,6 +82,12 @@ module ArMinimizer
|
|
|
82
82
|
Rails.application.eager_load!
|
|
83
83
|
path = Rails.root.join("config/ar_minimizer.json")
|
|
84
84
|
index = ArMinimizer::Index.from_models
|
|
85
|
+
# Models whose tables can't be read are left out: with none readable
|
|
86
|
+
# (no database set up yet), the manifest would describe no models.
|
|
87
|
+
if ActiveRecord::Base.descendants.any? { !it.abstract_class? } &&
|
|
88
|
+
ActiveRecord::Base.descendants.none? { !it.abstract_class? && ArMinimizer::Index.table?(it) }
|
|
89
|
+
abort "ar_minimizer: no model's table exists in the #{Rails.env} database; set it up (bin/rails db:prepare) first"
|
|
90
|
+
end
|
|
85
91
|
File.write(path, ArMinimizer::Manifest.dump(index))
|
|
86
92
|
puts "ar_minimizer: #{path.relative_path_from(Rails.root)} (#{index.size} methods, #{ArMinimizer::Manifest.digest(index)})"
|
|
87
93
|
end
|
data/lib/ar_minimizer/version.rb
CHANGED