usa 0.4.0 → 0.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +1 -1
- data/lib/usa/engine.rb +6 -1
- data/lib/usa/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: d8275113ba717d4dcd16a6ab69e75c3d2a0ae317138d4da57d3b6ceb5e534408
|
|
4
|
+
data.tar.gz: 4182c9028362c42327acd46f14cbad052c5074594820a7db581cf3aa9445561d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 14589ea7e3c01ec46a705f3777c38bc11a0670733b6fd8c2551499955a32e274516c37d93f8668c632ade9c2aca925ea556e08ef5ce9344126bc4b51e22a2768
|
|
7
|
+
data.tar.gz: 6cecb88f8f456ad77f6a353ed1cafba16fb369ef46d4aa71b95af0e6e971dd9a1bc943042edab8d5e0e6496ec48c9d59274ad74cadff5d61773da31fba37e0ea
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,15 @@ For more information about changelogs, check [Keep a Changelog](http://keepachan
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## 0.4.1 - 2026-09-16
|
|
11
|
+
|
|
12
|
+
* [Fix] The check that refuses a host's own class where one of these models should be is asked
|
|
13
|
+
when Active Record loads rather than while the app boots. It ran in a `to_prepare` block, and
|
|
14
|
+
reaching for `State` there pulled Active Record in behind it before initialization was over --
|
|
15
|
+
which Rails warns about on every boot that does not eager load: a `rake` task, a Heroku release
|
|
16
|
+
command, a development console. The check itself is unchanged, and still refuses before any of
|
|
17
|
+
these models is used
|
|
18
|
+
|
|
10
19
|
## 0.4.0 - 2026-09-15
|
|
11
20
|
|
|
12
21
|
* [Breaking change] The models are `State`, `County`, `City`, `CityCounty` and `ZIP`, at the
|
data/README.md
CHANGED
|
@@ -12,7 +12,7 @@ To install on your system, run
|
|
|
12
12
|
|
|
13
13
|
To use inside a bundled Ruby project, add this line to the `Gemfile`:
|
|
14
14
|
|
|
15
|
-
gem 'usa', '~> 0.4.
|
|
15
|
+
gem 'usa', '~> 0.4.1'
|
|
16
16
|
|
|
17
17
|
Below 1.0 the pin stops at the next minor rather than the next major, because that is where a
|
|
18
18
|
breaking change may still land. It becomes `~> 1.0` once the API is settled on purpose.
|
data/lib/usa/engine.rb
CHANGED
|
@@ -4,6 +4,11 @@ require 'rails/engine'
|
|
|
4
4
|
module USA
|
|
5
5
|
# Teaches Rails where this gem's models live, and refuses a host that has taken their names.
|
|
6
6
|
class Engine < ::Rails::Engine
|
|
7
|
-
|
|
7
|
+
# Asked when Active Record loads rather than while the app boots: reaching for these
|
|
8
|
+
# models pulls Active Record in behind them, and pulling it in before initialization is
|
|
9
|
+
# over slows every boot and can reorder a host's own -- which is what Rails warns about.
|
|
10
|
+
ActiveSupport.on_load(:active_record) do
|
|
11
|
+
USA.verify_models ::State, ::County, ::City, ::CityCounty, ::ZIP
|
|
12
|
+
end
|
|
8
13
|
end
|
|
9
14
|
end
|
data/lib/usa/version.rb
CHANGED