• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ruby-grape / grape / 30209520640 / 25
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: fix/adversarial-sweep-2026-08
DEFAULT BRANCH: master
Ran 26 Jul 2026 04:05PM UTC
Files 166
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Jul 2026 04:01PM UTC coverage: 55.878% (+0.01%) from 55.867%
30209520640.25

push

github

ericproulx
Move stackable settings storage onto InheritableSetting

Stackable registrations now live on `Grape::Util::InheritableSetting`
itself — one plain `key => Array` Hash per scope, allocated on first
write — and inheritance is resolved by walking `#parent`, the same
recursion `#rescue_handlers` already used. Previously they lived in a
`StackableValues` instance that maintained its own parallel chain via
`#inherited_values`, so every scope carried two links to its parent and
every registration read as an assignment (`store[:helpers] = mod`) that
actually appended.

The 28 raw store pokes inside the class become a two-method seam:
`stack(key, value)` to append and `stacked(key)` to read the chain
(plus `unstack` / `stacked_keys`). `stack` returns the registered value
because it replaced an assignment expression, whose value the `add_*`
writers — and `DSL::Routing#namespace` through them — silently returned.

`StackableValues` is kept as a read-only view, rebuilt on demand by
`#namespace_stackable`, purely because grape-swagger reads that store
directly: it walks the `#inherited_values` chain and reads each level's
`#new_values` to recover per-scope registrations, which no semantic
accessor exposes. Its `#[]=` and `#delete` are gone and its constructor
now takes `(new_values, inherited_values)`. Once grape-swagger reads the
accessors instead, deleting the class is a one-file change.

`Grape::Util::BaseInheritable` is removed: it only existed to share
plumbing between the two stores, and with `StackableValues` no longer a
store it had one subclass and one now-dead method (`#keys`). Its
contents moved into `Grape::Util::InheritableValues` unchanged.

Settings semantics are otherwise identical, verified against the
previous commit by diffing grape-swagger's generated swagger doc for a
nested `route_param` API. Two pre-existing quirks are preserved rather
than fixed, and are now documented: stack readers hand back the backing
Array when only one scope registered... (continued)

271 of 1248 branches covered (21.71%)

Branch coverage included in aggregate %.

2576 of 3847 relevant lines covered (66.96%)

9.65 hits per line

Source Files on job run-4.0-gemfiles/grape_swagger.gemfile - 30209520640.25
  • Tree
  • List 166
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 30209520640
  • 099c4a62 on github
  • Prev Job for on internalize-stackable-storage (#30206834055.1)
  • Next Job for on internalize-stackable-storage (#30209553439.9)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc