crest 1.0.0 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbe18f619bc95f0eb929c699184702b55f595cdd81f2287a8ef964e0b121b3dd
4
- data.tar.gz: ee2f37cc8c25e057db03c6c3f7cb92d68164e278427cea28ac44dd733228ee8e
3
+ metadata.gz: 28799533fae1fefc8071f54283d6710b6292b57d47b8cd0334a9f15b365618a2
4
+ data.tar.gz: 0e55d110c7b6c14f7520ead220333577678dbdb56d211006aa955ce21ffafb5f
5
5
  SHA512:
6
- metadata.gz: a2fc6523bd91f1d421ffe6806f9d4a30ae4bcd280b75e76aa35719db24bb9f7d51c054b99e227816815363b8969721bddda64619b96406a9e5bf877d7a43d453
7
- data.tar.gz: '06169a97517d48d394d24b6b578e1424bddb2c52e3c6b11cef6c81bb46a2dff9e1e22d6fdabfc970f2bb40ad6cd82fc255b1e5b5b1d49f7a1d9d762173e39c42'
6
+ metadata.gz: 89380958ae6d6684e335234daf24d8868c8f66fe2b879eae1ab0928a692246c60ddd936f3d032115f56a9dba3870043a6138d862751c288d90c48119f40638e2
7
+ data.tar.gz: 643597a59bce3fd12608cc041aed13d67791fb69256211fea6b299ff1bc99e0dd4cb3ee4c439fc8ae8c02ec2cadfa851ff73c663db21b70fddc25a2d1b44fcf2
data/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ For more information about changelogs, check [Keep a Changelog](http://keepachan
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## 1.0.1 - 2026-09-11
11
+
12
+ * [Fix] Let Ruby autoload `Crest::CardsController` when a request first names it, rather than
13
+ requiring it from a `to_prepare` block. `to_prepare` runs before the host has finished
14
+ initializing, so the require pulled in `ActionController::Base` there -- which costs a host
15
+ its boot time and which Rails reports as a prematurely executed load hook
16
+
10
17
  ## 1.0.0 - 2026-09-11
11
18
 
12
19
  * [Breaking change] Answer `Crest::Photo#property` where `#to_s` used to answer, and leave a
data/lib/crest/railtie.rb CHANGED
@@ -1,14 +1,15 @@
1
1
  require 'crest/routes'
2
2
 
3
3
  module Crest
4
- # Teaches a host's routes file the `crest` method, and loads the controller that answers it.
4
+ # Left to Ruby to load when a request first names it. Requiring it at boot would load
5
+ # ActionController::Base before the host had finished initializing, which costs boot time and
6
+ # which Rails reports as a prematurely executed load hook.
7
+ autoload :CardsController, 'crest/cards_controller'
8
+
9
+ # Teaches a host's routes file the `crest` method.
5
10
  class Railtie < ::Rails::Railtie
6
- initializer 'crest.routes' do |app|
11
+ initializer 'crest.routes' do
7
12
  ActionDispatch::Routing::Mapper.include Crest::Routes
8
-
9
- # Loaded once the routes are drawn, so the controller inherits the host's own URL helpers
10
- # the way a controller the host wrote does.
11
- app.config.to_prepare { require 'crest/cards_controller' }
12
13
  end
13
14
  end
14
15
  end
data/lib/crest/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Crest
2
2
  # The version of this gem, as RubyGems knows it.
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo