Ejemplo
Expand patterns with extra parameters using :append or :ignore mode and handle splat array captures and 0-indexed match results
sha256:0e8601385466c7cb8202d018a4f507e1647f9fae76799eec75b6ba880b0ed328
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Expand patterns with extra parameters using :append or :ignore mode and handle splat array captures and 0-indexed match results HOW
- Paquetes
- mustermann 4.0.0
- Entorno
- ruby
- Creado
- 2026-08-16T15:52:59Z
Contrato
- Mustermann.new('/users/:id').expand(id: 42, tab: 'profile') raises Mustermann::ExpandError in default mode when unknown keys are passed
- Mustermann.new('/users/:id').expand(:append, id: 42, tab: 'profile') serializes extra parameters as query string '/users/42?tab=profile'
- Mustermann.new('/users/:id').expand(:ignore, id: 42, tab: 'profile') drops extra parameters returning '/users/42'
- Mustermann.new('/files/*').params('/files/docs/report.pdf')['splat'] returns an Array ['docs/report.pdf'] rather than a String
- Mustermann.new('/users/:id').match('/users/42')[0] returns the first capture '42' instead of the full matched path
Archivos
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-16 · ed25519:d91480838ac982c9