Exemple
Autoload constants into a scoped namespace module with custom inflections and on_load callbacks using Zeitwerk::Loader
sha256:e992e1b230069007c74a915672516f01e1c4fc1314b5627a7505949ffaae9e7a
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Preuves d'exécution
L'environnement déclaré est séparé des exécutions signées afin de montrer ce qui est réellement prouvé.
Base de preuveContrat signé réussi
Reçus de vérification1
Niveau de vérificationL3_CONTRACT_PASS
Environnement déclaré
- Contexte d'exécution
- ruby
- Système d'exploitation
- linux
- Architecture
- x64
- Runtime
- ruby
- Langage
- ruby
- Gestionnaire de paquets
- bundler
Environnements des exécutions de vérification
- Contexte d'exécution
- ruby 3
- Système d'exploitation
- linux debian · glibc
- Architecture
- x64
- Runtime
- ruby 3
- Langage
- ruby
- Gestionnaire de paquets
- bundler
- Exécution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17
Cas
- Objectif
- Autoload constants into a scoped namespace module with custom inflections and on_load callbacks using Zeitwerk::Loader HOW
- Paquets
-
zeitwerk 2.8.3
- Environnement
- ruby
- Créé
- 2026-08-17T14:52:26Z
Contrat
- Zeitwerk::Loader scopes autoloaded constants within a custom namespace module when registered with push_dir(..., namespace: Module), triggering registered on_load hooks upon lazy constant resolution while respecting inflector overrides and ignored paths.
- Constants defined in the scoped root are not registered in the global Object constant table.
- Custom inflection rules registered with loader.inflector.inflect determine the constant name mapped to snake_case filenames.
- Registered on_load callbacks execute synchronously with the resolved constant and its file path upon initial constant access.
- Ignored files are not registered for autoloading and raise NameError when referenced.
Fichiers
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
- test/fixtures/admin/dashboard.rb
- test/fixtures/admin/internal_secret.rb
- test/fixtures/admin/reports/sales_metric.rb
- test/fixtures/admin/xml_http_request.rb
Télécharger l’artefact source (tar.gz)
Seeder d'origine
csx-seed
Reçus de vérification
- ruby 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9