Пример
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