grape 3.3.3 → 3.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/lib/grape/validations/validations_spec.rb +7 -2
- data/lib/grape/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d4db45369305583b4816671ba1e0934dc034bda07ad61bc68b1b9d09d67d776
|
|
4
|
+
data.tar.gz: fcb5fc7921a0f619f3d644a8c7caee4e306f71215c05f01770df4a94d301db34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ea6e0e3bab2b7f79e395e2aa649d5a15bfc0fef1d22be86465a650d1c92c73ed3cb6133fbb67d184aad3cf9ba0f7e920ec507e5d94bc3fb55b7ca9d0c54ea89a
|
|
7
|
+
data.tar.gz: ab97e8a2ed312cfce30641914ed08986aeee8bad45742deabea86b7b41177c402daab21ffd16f023ea7be8e83d1e202407ad10bbbcf41703a0834ad9183f82cd
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
### 3.3.4 (2026-07-25)
|
|
2
|
+
|
|
3
|
+
#### Fixes
|
|
4
|
+
|
|
5
|
+
* [#2812](https://github.com/ruby-grape/grape/pull/2813): Fix `type: Array` combined with `values: [...]` list coercing to the guessed element type instead of `Array` - [@schinery](https://github.com/schinery).
|
|
6
|
+
|
|
1
7
|
### 3.3.3 (2026-07-17)
|
|
2
8
|
|
|
3
9
|
#### Fixes
|
data/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Grape is a REST-like API framework for Ruby. It's designed to run on Rack or com
|
|
|
10
10
|
|
|
11
11
|
## Stable Release
|
|
12
12
|
|
|
13
|
-
You're reading the documentation for the stable release of Grape, 3.3.
|
|
13
|
+
You're reading the documentation for the stable release of Grape, 3.3.4.
|
|
14
14
|
|
|
15
15
|
## Project Resources
|
|
16
16
|
|
|
@@ -51,7 +51,7 @@ module Grape
|
|
|
51
51
|
@allow_blank = resolve_value(raw[:allow_blank])
|
|
52
52
|
@fail_fast = raw[:fail_fast] || false
|
|
53
53
|
|
|
54
|
-
@
|
|
54
|
+
@guessed_coerce_type = guess_coerce_type(@coerce_type, @values, @except_values)
|
|
55
55
|
@shared_opts = { allow_blank: @allow_blank, fail_fast: @fail_fast }.freeze
|
|
56
56
|
@validator_entries = build_validator_entries(raw)
|
|
57
57
|
|
|
@@ -74,9 +74,14 @@ module Grape
|
|
|
74
74
|
# construction so an incoherent spec (e.g. a +default+ outside +values+,
|
|
75
75
|
# or +values+ whose elements don't match +type+) can never exist —
|
|
76
76
|
# callers no longer have to remember to invoke these separately.
|
|
77
|
+
#
|
|
78
|
+
# NB. +@guessed_coerce_type+ is used only for this check, never for
|
|
79
|
+
# +coerce_options+ — a bare +type: Array+ combined with scalar
|
|
80
|
+
# +values:+ must still coerce to +Array+ at runtime (only the elements
|
|
81
|
+
# are scalar), so the real +@coerce_type+ is never overwritten by it.
|
|
77
82
|
def validate!
|
|
78
83
|
check_incompatible_option_values(@default, @values, @except_values)
|
|
79
|
-
validate_value_coercion(@
|
|
84
|
+
validate_value_coercion(@guessed_coerce_type, @values, @except_values)
|
|
80
85
|
end
|
|
81
86
|
|
|
82
87
|
def check_incompatible_option_values(default, values, except_values)
|
data/lib/grape/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: grape
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.3.
|
|
4
|
+
version: 3.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Bleigh
|
|
@@ -282,9 +282,9 @@ licenses:
|
|
|
282
282
|
- MIT
|
|
283
283
|
metadata:
|
|
284
284
|
bug_tracker_uri: https://github.com/ruby-grape/grape/issues
|
|
285
|
-
changelog_uri: https://github.com/ruby-grape/grape/blob/v3.3.
|
|
286
|
-
documentation_uri: https://www.rubydoc.info/gems/grape/3.3.
|
|
287
|
-
source_code_uri: https://github.com/ruby-grape/grape/tree/v3.3.
|
|
285
|
+
changelog_uri: https://github.com/ruby-grape/grape/blob/v3.3.4/CHANGELOG.md
|
|
286
|
+
documentation_uri: https://www.rubydoc.info/gems/grape/3.3.4
|
|
287
|
+
source_code_uri: https://github.com/ruby-grape/grape/tree/v3.3.4
|
|
288
288
|
rubygems_mfa_required: 'true'
|
|
289
289
|
rdoc_options: []
|
|
290
290
|
require_paths:
|