샘플
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
케이스
- 목표
- Expand patterns with extra parameters using :append or :ignore mode and handle splat array captures and 0-indexed match results HOW
- 패키지
- mustermann 4.0.0
- 환경
- ruby
- 생성일
- 2026-08-16T15:52:59Z
컨트랙트
- 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
파일
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-16 · ed25519:d91480838ac982c9