Skip to content

Commit 2ae31b1

Browse files
authored
Fix CI by pinning json gem below 3.0 (#992)
json just released 3.0.0, which drops support for the quirks_mode: keyword. multi_json's json_gem adapter still passes that option by default, and Grape transparently resolves its Grape::Json wrapper to MultiJson whenever the gem is loaded in the process - so any spec exercising JSON request parsing crashes with "ArgumentError: unknown keyword: quirks_mode". A fix for this already landed on multi_json's main branch but hasn't been released as a gem yet, so pinning json < 3.0 is the only lever available until multi_json cuts a new release. CI runs bundle update with no lockfile pinning, which is why this surfaced now.
1 parent ebfec8b commit 2ae31b1

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
* [#986](https://github.com/ruby-grape/grape-swagger/pull/986): Read a route's tags through `route.tags` instead of `route.options`; a blank `tags:` (`nil` or `[]`) now means "not specified" and derives the tag from the path. See [UPGRADING](UPGRADING.md) - [@ericproulx](https://github.com/ericproulx).
1010
* [#988](https://github.com/ruby-grape/grape-swagger/pull/988): Fix CI by replacing single-statement `rubocop:disable`/`enable` pairs with `rubocop:disable-next`, per rubocop 1.90's new `Style/DirectiveScope` cop - [@numbata](https://github.com/numbata).
11+
* [#992](https://github.com/ruby-grape/grape-swagger/pull/992): Fix CI by pinning `json` to `< 3.0` in the Gemfile; `json` 3.0 dropped support for the `quirks_mode:` keyword that `multi_json`'s adapter still passes by default, breaking JSON request parsing wherever Grape resolves `Grape::Json` to `MultiJson` - [@numbata](https://github.com/numbata).
1112
* Your contribution here.
1213

1314
### 2.2.0 (2026-08-06)

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ group :development, :test do
2929
end
3030

3131
gem 'cgi'
32+
# multi_json's json_gem adapter still passes quirks_mode: true by default,
33+
# a keyword json 3.0 dropped support for (https://github.com/intridea/multi_json/issues/163).
34+
gem 'json', '< 3.0'
3235
gem 'multi_json'
3336
gem 'rack-cors'
3437
gem 'rack-test'

0 commit comments

Comments
 (0)