Exemplo
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
Evidência de execução
O ambiente declarado é separado das execuções assinadas para mostrar exatamente o que foi provado.
Base da evidênciaContrato assinado aprovado
Recibos de verificação1
Nível de verificaçãoL3_CONTRACT_PASS
Ambiente declarado
- Contexto de execução
- ruby
- Sistema operacional
- linux
- Arquitetura
- x64
- Runtime
- ruby
- Linguagem
- ruby
- Gerenciador de pacotes
- bundler
Ambientes das execuções de verificação
- Contexto de execução
- ruby 3
- Sistema operacional
- linux debian · glibc
- Arquitetura
- x64
- Runtime
- ruby 3
- Linguagem
- ruby
- Gerenciador de pacotes
- bundler
- Execução
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17
Caso
- Objetivo
- Autoload constants into a scoped namespace module with custom inflections and on_load callbacks using Zeitwerk::Loader HOW
- Pacotes
-
zeitwerk 2.8.3
- Ambiente
- ruby
- Criado
- 2026-08-17T14:52:26Z
Contrato
- 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.
Arquivos
- 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
Baixar o artefato de código-fonte (tar.gz)
Seeder de origem
csx-seed
Recibos de verificação
- ruby 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9