grape 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/grape/dsl/inside_route.rb +5 -3
- data/lib/grape/validations/params_scope.rb +7 -1
- data/lib/grape/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 172d51f08cb655e030afc83ecc06cb13ad5c72c9ad1d6f63d6f87d8b45a52772
|
4
|
+
data.tar.gz: 2d946a6526a7cc848e441fac2d4e0169a0762025d34445307f3945abeeef2b72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb1ec3cd146f8e4a3f12314159e68177b92548fb7ea3eeac47a425addc3fa04a38c61c566ed3a0655d325bd5d24044b020449aa5702f997d746eef2c5d493928
|
7
|
+
data.tar.gz: 8c44c721a9e0acbb00997ac40ea4b491c4a3c0315e6f4cc1432a2ea5cff102887e028e10df883eba0b50645219918a3fc5a3a66f36068a9d6abc81b29b75c61f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
### 2.1.3 (2024-07-13)
|
2
|
+
|
3
|
+
#### Fixes
|
4
|
+
|
5
|
+
* [#2467](https://github.com/ruby-grape/grape/pull/2467): Fix repo coverage - [@ericproulx](https://github.com/ericproulx).
|
6
|
+
* [#2468](https://github.com/ruby-grape/grape/pull/2468): Align `error!` method signatures across different places - [@numbata](https://github.com/numbata).
|
7
|
+
* [#2469](https://github.com/ruby-grape/grape/pull/2469): Fix full path building for lateral scopes - [@numbata](https://github.com/numbata).
|
8
|
+
|
1
9
|
### 2.1.2 (2024-06-28)
|
2
10
|
|
3
11
|
#### Fixes
|
data/README.md
CHANGED
@@ -157,7 +157,7 @@ Grape is a REST-like API framework for Ruby. It's designed to run on Rack or com
|
|
157
157
|
|
158
158
|
## Stable Release
|
159
159
|
|
160
|
-
You're reading the documentation for the stable release of Grape, **2.1.
|
160
|
+
You're reading the documentation for the stable release of Grape, **2.1.3**.
|
161
161
|
Please read [UPGRADING](UPGRADING.md) when upgrading from a previous version.
|
162
162
|
|
163
163
|
## Project Resources
|
@@ -163,12 +163,14 @@ module Grape
|
|
163
163
|
# end user with the specified message.
|
164
164
|
#
|
165
165
|
# @param message [String] The message to display.
|
166
|
-
# @param status [Integer]
|
166
|
+
# @param status [Integer] The HTTP Status Code. Defaults to default_error_status, 500 if not set.
|
167
167
|
# @param additional_headers [Hash] Addtional headers for the response.
|
168
|
-
|
168
|
+
# @param backtrace [Array<String>] The backtrace of the exception that caused the error.
|
169
|
+
# @param original_exception [Exception] The original exception that caused the error.
|
170
|
+
def error!(message, status = nil, additional_headers = nil, backtrace = nil, original_exception = nil)
|
169
171
|
status = self.status(status || namespace_inheritable(:default_error_status))
|
170
172
|
headers = additional_headers.present? ? header.merge(additional_headers) : header
|
171
|
-
throw :error, message: message, status: status, headers: headers
|
173
|
+
throw :error, message: message, status: status, headers: headers, backtrace: backtrace, original_exception: original_exception
|
172
174
|
end
|
173
175
|
|
174
176
|
# Creates a Rack response based on the provided message, status, and headers.
|
@@ -190,7 +190,13 @@ module Grape
|
|
190
190
|
#
|
191
191
|
# @return [Array<Symbol>] the nesting/path of the current parameter scope
|
192
192
|
def full_path
|
193
|
-
nested?
|
193
|
+
if nested?
|
194
|
+
(@parent.full_path + [@element])
|
195
|
+
elsif lateral?
|
196
|
+
@parent.full_path
|
197
|
+
else
|
198
|
+
[]
|
199
|
+
end
|
194
200
|
end
|
195
201
|
|
196
202
|
private
|
data/lib/grape/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bleigh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -251,9 +251,9 @@ licenses:
|
|
251
251
|
- MIT
|
252
252
|
metadata:
|
253
253
|
bug_tracker_uri: https://github.com/ruby-grape/grape/issues
|
254
|
-
changelog_uri: https://github.com/ruby-grape/grape/blob/v2.1.
|
255
|
-
documentation_uri: https://www.rubydoc.info/gems/grape/2.1.
|
256
|
-
source_code_uri: https://github.com/ruby-grape/grape/tree/v2.1.
|
254
|
+
changelog_uri: https://github.com/ruby-grape/grape/blob/v2.1.3/CHANGELOG.md
|
255
|
+
documentation_uri: https://www.rubydoc.info/gems/grape/2.1.3
|
256
|
+
source_code_uri: https://github.com/ruby-grape/grape/tree/v2.1.3
|
257
257
|
post_install_message:
|
258
258
|
rdoc_options: []
|
259
259
|
require_paths:
|