샘플
Configure Sinatra application settings, Hash option merging, dynamic Proc evaluation, method override tunneling, and environment variable resolution without swallowed options or callable argument errors
sha256:5e9ddf97d864052fc422fb182fa2b8a3153312906c32895d2b1885072700c195
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Configure Sinatra application settings, Hash option merging, dynamic Proc evaluation, method override tunneling, and environment variable resolution without swallowed options or callable argument errors HOW
- 패키지
- sinatra 4.2.1 rack-test 2.2.0 rack 3.2.7 rack-protection 4.2.1 mustermann 3.1.1
- 환경
- ruby
- 생성일
- 2026-08-16T16:57:30Z
흔히 이렇게 알고 있다
Configuring settings with Sinatra's set method replaces existing Hash configurations, stores Proc and lambda values as callable objects on the settings object, and passes form HTTP verb overrides through to DELETE and PUT route handlers by default.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- Sinatra::Base.set merges new Hash options into previous Hash settings rather than overwriting them, and evaluates Proc or lambda settings on every property access rather than returning the callable object.
- assert storing a parameterized lambda directly via set fails with ArgumentError on access unless wrapped in a proc returning the lambda
- assert zero-arity proc settings execute dynamically on every settings access, returning fresh values
- assert Sinatra::Base defaults method_override to false, ignoring _method form parameters unless enable :method_override is set
- assert Sinatra::Base captures environment at load time, ignoring post-require ENV['RACK_ENV'] mutations unless explicitly reconfigured with set :environment
- assert development environment enables host_authorization by default, returning 403 Forbidden for non-localhost Host headers
파일
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- src/app.rb
- test/contract.rb
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-16 · ed25519:d91480838ac982c9