grape 1.5.2 → 1.5.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 +3 -1
- data/UPGRADING.md +27 -0
- data/lib/grape.rb +1 -0
- data/lib/grape/api.rb +1 -1
- data/lib/grape/endpoint.rb +1 -1
- data/lib/grape/exceptions/empty_message_body.rb +11 -0
- data/lib/grape/locale/en.yml +1 -1
- data/lib/grape/parser/json.rb +1 -1
- data/lib/grape/parser/xml.rb +1 -1
- data/lib/grape/request.rb +2 -0
- data/lib/grape/validations/types/custom_type_coercer.rb +0 -2
- data/lib/grape/validations/validators/base.rb +1 -1
- data/lib/grape/validations/validators/multiple_params_base.rb +1 -1
- data/lib/grape/version.rb +1 -1
- data/spec/grape/api_spec.rb +77 -0
- data/spec/grape/endpoint_spec.rb +13 -0
- data/spec/grape/validations/validators/coerce_spec.rb +76 -0
- metadata +106 -105
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bda9361933fff7f38c7b6e6f5196d1b245336179a527addf3bfd3aa67c6ec544
|
4
|
+
data.tar.gz: 71a93ff4542fe59fb985ab0cfba591267b9901171e293988020df381d5377504
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c54f78461188735df911a7463b3b4a15f0257d071ac8ca43b5e8539d7bce1098a4383b85b480eced6d3e60cef204e4d7405edf17b3ccdb13d30e3fefb9011ba1
|
7
|
+
data.tar.gz: e4051ac3c062e2972fb40f22cd95a6d902416b53422450dccef62e94ff20b2f447b86b4ef2d4596d69597da531446e735e53d50faeb0a6ab60996a584991950d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
### 1.5.3 (2021/03/07)
|
2
|
+
|
3
|
+
#### Fixes
|
4
|
+
|
5
|
+
* [#2161](https://github.com/ruby-grape/grape/pull/2157): Handle EOFError from Rack when given an empty multipart body - [@bschmeck](https://github.com/bschmeck).
|
6
|
+
* [#2162](https://github.com/ruby-grape/grape/pull/2162): Corrected a hash modification while iterating issue - [@Jack12816](https://github.com/Jack12816).
|
7
|
+
* [#2164](https://github.com/ruby-grape/grape/pull/2164): Fix: `coerce_with` is now called for params with `nil` value - [@braktar](https://github.com/braktar).
|
8
|
+
|
1
9
|
### 1.5.2 (2021/02/06)
|
2
10
|
|
3
11
|
#### Features
|
data/README.md
CHANGED
@@ -158,7 +158,8 @@ content negotiation, versioning and much more.
|
|
158
158
|
|
159
159
|
## Stable Release
|
160
160
|
|
161
|
-
You're reading the documentation for the stable release of Grape,
|
161
|
+
You're reading the documentation for the stable release of Grape, **v1.5.3**.
|
162
|
+
Please read [UPGRADING](UPGRADING.md) when upgrading from a previous version.
|
162
163
|
|
163
164
|
## Project Resources
|
164
165
|
|
@@ -1226,6 +1227,7 @@ params do
|
|
1226
1227
|
end
|
1227
1228
|
end
|
1228
1229
|
```
|
1230
|
+
Note that, a `nil` value will call the custom coercion method, while a missing parameter will not.
|
1229
1231
|
|
1230
1232
|
Example of use of `coerce_with` with a lambda (a class with a `parse` method could also have been used)
|
1231
1233
|
It will parse a string and return an Array of Integers, matching the `Array[Integer]` `type`.
|
data/UPGRADING.md
CHANGED
@@ -1,6 +1,33 @@
|
|
1
1
|
Upgrading Grape
|
2
2
|
===============
|
3
3
|
|
4
|
+
|
5
|
+
### Upgrading to >= 1.5.3
|
6
|
+
|
7
|
+
### Nil value and coercion
|
8
|
+
|
9
|
+
Prior to 1.2.5 version passing a `nil` value for a parameter with a custom coercer would invoke the coercer, and not passing a parameter would not invoke it.
|
10
|
+
This behavior was not tested or documented. Version 1.3.0 quietly changed this behavior, in such that `nil` values skipped the coercion. Version 1.5.3 fixes and documents this as follows:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
class Api < Grape::API
|
14
|
+
params do
|
15
|
+
optional :value, type: Integer, coerce_with: ->(val) { val || 0 }
|
16
|
+
end
|
17
|
+
|
18
|
+
get 'example' do
|
19
|
+
params[:my_param]
|
20
|
+
end
|
21
|
+
get '/example', params: { value: nil }
|
22
|
+
# 1.5.2 = nil
|
23
|
+
# 1.5.3 = 0
|
24
|
+
get '/example', params: {}
|
25
|
+
# 1.5.2 = nil
|
26
|
+
# 1.5.3 = nil
|
27
|
+
end
|
28
|
+
```
|
29
|
+
See [#2164](https://github.com/ruby-grape/grape/pull/2164) for more information.
|
30
|
+
|
4
31
|
### Upgrading to >= 1.5.1
|
5
32
|
|
6
33
|
#### Dependent params
|
data/lib/grape.rb
CHANGED
data/lib/grape/api.rb
CHANGED
@@ -141,7 +141,7 @@ module Grape
|
|
141
141
|
# Adds a new stage to the set up require to get a Grape::API up and running
|
142
142
|
def add_setup(method, *args, &block)
|
143
143
|
setup_step = { method: method, args: args, block: block }
|
144
|
-
@setup
|
144
|
+
@setup += [setup_step]
|
145
145
|
last_response = nil
|
146
146
|
@instances.each do |instance|
|
147
147
|
last_response = replay_step_on(instance, setup_step)
|
data/lib/grape/endpoint.rb
CHANGED
@@ -255,7 +255,7 @@ module Grape
|
|
255
255
|
run_filters befores, :before
|
256
256
|
|
257
257
|
if (allowed_methods = env[Grape::Env::GRAPE_ALLOWED_METHODS])
|
258
|
-
raise Grape::Exceptions::MethodNotAllowed
|
258
|
+
raise Grape::Exceptions::MethodNotAllowed.new(header.merge('Allow' => allowed_methods)) unless options?
|
259
259
|
header 'Allow', allowed_methods
|
260
260
|
response_object = ''
|
261
261
|
status 204
|
data/lib/grape/locale/en.yml
CHANGED
@@ -44,6 +44,7 @@ en:
|
|
44
44
|
"when specifying %{body_format} as content-type, you must pass valid
|
45
45
|
%{body_format} in the request's 'body'
|
46
46
|
"
|
47
|
+
empty_message_body: 'Empty message body supplied with %{body_format} content-type'
|
47
48
|
invalid_accept_header:
|
48
49
|
problem: 'Invalid accept header'
|
49
50
|
resolution: '%{message}'
|
@@ -51,4 +52,3 @@ en:
|
|
51
52
|
problem: 'Invalid version header'
|
52
53
|
resolution: '%{message}'
|
53
54
|
invalid_response: 'Invalid response'
|
54
|
-
|
data/lib/grape/parser/json.rb
CHANGED
@@ -8,7 +8,7 @@ module Grape
|
|
8
8
|
::Grape::Json.load(object)
|
9
9
|
rescue ::Grape::Json::ParseError
|
10
10
|
# handle JSON parsing errors via the rescue handlers or provide error message
|
11
|
-
raise Grape::Exceptions::InvalidMessageBody
|
11
|
+
raise Grape::Exceptions::InvalidMessageBody.new('application/json')
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
data/lib/grape/parser/xml.rb
CHANGED
@@ -8,7 +8,7 @@ module Grape
|
|
8
8
|
::Grape::Xml.parse(object)
|
9
9
|
rescue ::Grape::Xml::ParseError
|
10
10
|
# handle XML parsing errors via the rescue handlers or provide error message
|
11
|
-
raise Grape::Exceptions::InvalidMessageBody
|
11
|
+
raise Grape::Exceptions::InvalidMessageBody.new('application/xml')
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
data/lib/grape/request.rb
CHANGED
data/lib/grape/version.rb
CHANGED
data/spec/grape/api_spec.rb
CHANGED
@@ -4056,4 +4056,81 @@ XML
|
|
4056
4056
|
expect { get '/const/missing' }.to raise_error(NameError).with_message(/SomeRandomConstant/)
|
4057
4057
|
end
|
4058
4058
|
end
|
4059
|
+
|
4060
|
+
describe 'custom route helpers on nested APIs' do
|
4061
|
+
let(:shared_api_module) do
|
4062
|
+
Module.new do
|
4063
|
+
# rubocop:disable Style/ExplicitBlockArgument because this causes
|
4064
|
+
# the underlying issue in this form
|
4065
|
+
def uniqe_id_route
|
4066
|
+
params do
|
4067
|
+
use :unique_id
|
4068
|
+
end
|
4069
|
+
route_param(:id) do
|
4070
|
+
yield
|
4071
|
+
end
|
4072
|
+
end
|
4073
|
+
# rubocop:enable Style/ExplicitBlockArgument
|
4074
|
+
end
|
4075
|
+
end
|
4076
|
+
let(:shared_api_definitions) do
|
4077
|
+
Module.new do
|
4078
|
+
extend ActiveSupport::Concern
|
4079
|
+
|
4080
|
+
included do
|
4081
|
+
helpers do
|
4082
|
+
params :unique_id do
|
4083
|
+
requires :id, type: String,
|
4084
|
+
allow_blank: false,
|
4085
|
+
regexp: /\d+-\d+/
|
4086
|
+
end
|
4087
|
+
end
|
4088
|
+
end
|
4089
|
+
end
|
4090
|
+
end
|
4091
|
+
let(:orders_root) do
|
4092
|
+
shared = shared_api_definitions
|
4093
|
+
find = orders_find_endpoint
|
4094
|
+
Class.new(Grape::API) do
|
4095
|
+
include shared
|
4096
|
+
|
4097
|
+
namespace(:orders) do
|
4098
|
+
mount find
|
4099
|
+
end
|
4100
|
+
end
|
4101
|
+
end
|
4102
|
+
let(:orders_find_endpoint) do
|
4103
|
+
shared = shared_api_definitions
|
4104
|
+
Class.new(Grape::API) do
|
4105
|
+
include shared
|
4106
|
+
|
4107
|
+
uniqe_id_route do
|
4108
|
+
desc 'Fetch a single order' do
|
4109
|
+
detail 'While specifying the order id on the route'
|
4110
|
+
end
|
4111
|
+
get { params[:id] }
|
4112
|
+
end
|
4113
|
+
end
|
4114
|
+
end
|
4115
|
+
subject(:grape_api) do
|
4116
|
+
Class.new(Grape::API) do
|
4117
|
+
version 'v1', using: :path
|
4118
|
+
end
|
4119
|
+
end
|
4120
|
+
|
4121
|
+
before do
|
4122
|
+
Grape::API::Instance.extend(shared_api_module)
|
4123
|
+
subject.mount orders_root
|
4124
|
+
end
|
4125
|
+
|
4126
|
+
it 'returns an error when the id is bad' do
|
4127
|
+
get '/v1/orders/abc'
|
4128
|
+
expect(last_response.body).to be_eql('id is invalid')
|
4129
|
+
end
|
4130
|
+
|
4131
|
+
it 'returns the given id when it is valid' do
|
4132
|
+
get '/v1/orders/1-2'
|
4133
|
+
expect(last_response.body).to be_eql('1-2')
|
4134
|
+
end
|
4135
|
+
end
|
4059
4136
|
end
|
data/spec/grape/endpoint_spec.rb
CHANGED
@@ -420,6 +420,19 @@ describe Grape::Endpoint do
|
|
420
420
|
expect(last_response.status).to eq(201)
|
421
421
|
expect(last_response.body).to eq('Bob')
|
422
422
|
end
|
423
|
+
|
424
|
+
# Rack swallowed this error until v2.2.0
|
425
|
+
it 'returns a 400 if given an invalid multipart body', if: Gem::Version.new(Rack.release) >= Gem::Version.new('2.2.0') do
|
426
|
+
subject.params do
|
427
|
+
requires :file, type: Rack::Multipart::UploadedFile
|
428
|
+
end
|
429
|
+
subject.post '/upload' do
|
430
|
+
params[:file][:filename]
|
431
|
+
end
|
432
|
+
post '/upload', { file: '' }, 'CONTENT_TYPE' => 'multipart/form-data; boundary=foobar'
|
433
|
+
expect(last_response.status).to eq(400)
|
434
|
+
expect(last_response.body).to eq('Empty message body supplied with multipart/form-data; boundary=foobar content-type')
|
435
|
+
end
|
423
436
|
end
|
424
437
|
|
425
438
|
it 'responds with a 415 for an unsupported content-type' do
|
@@ -706,6 +706,44 @@ describe Grape::Validations::CoerceValidator do
|
|
706
706
|
expect(JSON.parse(last_response.body)).to eq([1, 1, 1, 1])
|
707
707
|
end
|
708
708
|
|
709
|
+
context 'Array type and coerce_with should' do
|
710
|
+
before do
|
711
|
+
subject.params do
|
712
|
+
optional :arr, type: Array, coerce_with: (lambda do |val|
|
713
|
+
if val.nil?
|
714
|
+
[]
|
715
|
+
else
|
716
|
+
val
|
717
|
+
end
|
718
|
+
end)
|
719
|
+
end
|
720
|
+
subject.get '/' do
|
721
|
+
params[:arr].class.to_s
|
722
|
+
end
|
723
|
+
end
|
724
|
+
|
725
|
+
it 'coerce nil value to array' do
|
726
|
+
get '/', arr: nil
|
727
|
+
|
728
|
+
expect(last_response.status).to eq(200)
|
729
|
+
expect(last_response.body).to eq('Array')
|
730
|
+
end
|
731
|
+
|
732
|
+
it 'not coerce missing field' do
|
733
|
+
get '/'
|
734
|
+
|
735
|
+
expect(last_response.status).to eq(200)
|
736
|
+
expect(last_response.body).to eq('NilClass')
|
737
|
+
end
|
738
|
+
|
739
|
+
it 'coerce array as array' do
|
740
|
+
get '/', arr: []
|
741
|
+
|
742
|
+
expect(last_response.status).to eq(200)
|
743
|
+
expect(last_response.body).to eq('Array')
|
744
|
+
end
|
745
|
+
end
|
746
|
+
|
709
747
|
it 'uses parse where available' do
|
710
748
|
subject.params do
|
711
749
|
requires :ints, type: Array, coerce_with: JSON do
|
@@ -754,6 +792,44 @@ describe Grape::Validations::CoerceValidator do
|
|
754
792
|
expect(last_response.body).to eq('3')
|
755
793
|
end
|
756
794
|
|
795
|
+
context 'Integer type and coerce_with should' do
|
796
|
+
before do
|
797
|
+
subject.params do
|
798
|
+
optional :int, type: Integer, coerce_with: (lambda do |val|
|
799
|
+
if val.nil?
|
800
|
+
0
|
801
|
+
else
|
802
|
+
val.to_i
|
803
|
+
end
|
804
|
+
end)
|
805
|
+
end
|
806
|
+
subject.get '/' do
|
807
|
+
params[:int].class.to_s
|
808
|
+
end
|
809
|
+
end
|
810
|
+
|
811
|
+
it 'coerce nil value to integer' do
|
812
|
+
get '/', int: nil
|
813
|
+
|
814
|
+
expect(last_response.status).to eq(200)
|
815
|
+
expect(last_response.body).to eq('Integer')
|
816
|
+
end
|
817
|
+
|
818
|
+
it 'not coerce missing field' do
|
819
|
+
get '/'
|
820
|
+
|
821
|
+
expect(last_response.status).to eq(200)
|
822
|
+
expect(last_response.body).to eq('NilClass')
|
823
|
+
end
|
824
|
+
|
825
|
+
it 'coerce integer as integer' do
|
826
|
+
get '/', int: 1
|
827
|
+
|
828
|
+
expect(last_response.status).to eq(200)
|
829
|
+
expect(last_response.body).to eq('Integer')
|
830
|
+
end
|
831
|
+
end
|
832
|
+
|
757
833
|
context 'Integer type and coerce_with potentially returning nil' do
|
758
834
|
before do
|
759
835
|
subject.params do
|
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: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bleigh
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -137,6 +137,7 @@ files:
|
|
137
137
|
- lib/grape/error_formatter/txt.rb
|
138
138
|
- lib/grape/error_formatter/xml.rb
|
139
139
|
- lib/grape/exceptions/base.rb
|
140
|
+
- lib/grape/exceptions/empty_message_body.rb
|
140
141
|
- lib/grape/exceptions/incompatible_option_values.rb
|
141
142
|
- lib/grape/exceptions/invalid_accept_header.rb
|
142
143
|
- lib/grape/exceptions/invalid_formatter.rb
|
@@ -370,10 +371,10 @@ licenses:
|
|
370
371
|
- MIT
|
371
372
|
metadata:
|
372
373
|
bug_tracker_uri: https://github.com/ruby-grape/grape/issues
|
373
|
-
changelog_uri: https://github.com/ruby-grape/grape/blob/v1.5.
|
374
|
-
documentation_uri: https://www.rubydoc.info/gems/grape/1.5.
|
375
|
-
source_code_uri: https://github.com/ruby-grape/grape/tree/v1.5.
|
376
|
-
post_install_message:
|
374
|
+
changelog_uri: https://github.com/ruby-grape/grape/blob/v1.5.3/CHANGELOG.md
|
375
|
+
documentation_uri: https://www.rubydoc.info/gems/grape/1.5.3
|
376
|
+
source_code_uri: https://github.com/ruby-grape/grape/tree/v1.5.3
|
377
|
+
post_install_message:
|
377
378
|
rdoc_options: []
|
378
379
|
require_paths:
|
379
380
|
- lib
|
@@ -388,123 +389,123 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
388
389
|
- !ruby/object:Gem::Version
|
389
390
|
version: '0'
|
390
391
|
requirements: []
|
391
|
-
rubygems_version: 3.1.
|
392
|
-
signing_key:
|
392
|
+
rubygems_version: 3.1.3
|
393
|
+
signing_key:
|
393
394
|
specification_version: 4
|
394
395
|
summary: A simple Ruby framework for building REST-like APIs.
|
395
396
|
test_files:
|
397
|
+
- spec/spec_helper.rb
|
398
|
+
- spec/integration/eager_load/eager_load_spec.rb
|
399
|
+
- spec/integration/multi_xml/xml_spec.rb
|
400
|
+
- spec/integration/multi_json/json_spec.rb
|
396
401
|
- spec/shared/versioning_examples.rb
|
402
|
+
- spec/support/basic_auth_encode_helpers.rb
|
403
|
+
- spec/support/endpoint_faker.rb
|
404
|
+
- spec/support/chunks.rb
|
405
|
+
- spec/support/file_streamer.rb
|
397
406
|
- spec/support/versioned_helpers.rb
|
398
407
|
- spec/support/content_type_helpers.rb
|
399
408
|
- spec/support/eager_load.rb
|
400
|
-
- spec/support/basic_auth_encode_helpers.rb
|
401
|
-
- spec/support/file_streamer.rb
|
402
|
-
- spec/support/chunks.rb
|
403
|
-
- spec/support/endpoint_faker.rb
|
404
409
|
- spec/support/integer_helpers.rb
|
405
|
-
- spec/grape/
|
406
|
-
- spec/grape/
|
407
|
-
- spec/grape/
|
408
|
-
- spec/grape/
|
409
|
-
- spec/grape/
|
410
|
-
- spec/grape/
|
411
|
-
- spec/grape/
|
412
|
-
- spec/grape/
|
413
|
-
- spec/grape/
|
414
|
-
- spec/grape/
|
415
|
-
- spec/grape/
|
416
|
-
- spec/grape/
|
417
|
-
- spec/grape/
|
418
|
-
- spec/grape/
|
419
|
-
- spec/grape/
|
420
|
-
- spec/grape/
|
421
|
-
- spec/grape/
|
422
|
-
- spec/grape/
|
423
|
-
- spec/grape/
|
410
|
+
- spec/grape/middleware/error_spec.rb
|
411
|
+
- spec/grape/middleware/globals_spec.rb
|
412
|
+
- spec/grape/middleware/formatter_spec.rb
|
413
|
+
- spec/grape/middleware/auth/strategies_spec.rb
|
414
|
+
- spec/grape/middleware/auth/dsl_spec.rb
|
415
|
+
- spec/grape/middleware/auth/base_spec.rb
|
416
|
+
- spec/grape/middleware/stack_spec.rb
|
417
|
+
- spec/grape/middleware/exception_spec.rb
|
418
|
+
- spec/grape/middleware/versioner_spec.rb
|
419
|
+
- spec/grape/middleware/versioner/accept_version_header_spec.rb
|
420
|
+
- spec/grape/middleware/versioner/header_spec.rb
|
421
|
+
- spec/grape/middleware/versioner/path_spec.rb
|
422
|
+
- spec/grape/middleware/versioner/param_spec.rb
|
423
|
+
- spec/grape/middleware/base_spec.rb
|
424
|
+
- spec/grape/config_spec.rb
|
425
|
+
- spec/grape/loading_spec.rb
|
426
|
+
- spec/grape/endpoint_spec.rb
|
427
|
+
- spec/grape/api_spec.rb
|
428
|
+
- spec/grape/util/reverse_stackable_values_spec.rb
|
429
|
+
- spec/grape/util/stackable_values_spec.rb
|
430
|
+
- spec/grape/util/inheritable_setting_spec.rb
|
431
|
+
- spec/grape/util/strict_hash_configuration_spec.rb
|
432
|
+
- spec/grape/util/inheritable_values_spec.rb
|
433
|
+
- spec/grape/integration/rack_spec.rb
|
434
|
+
- spec/grape/integration/rack_sendfile_spec.rb
|
435
|
+
- spec/grape/integration/global_namespace_function_spec.rb
|
436
|
+
- spec/grape/validations_spec.rb
|
437
|
+
- spec/grape/entity_spec.rb
|
438
|
+
- spec/grape/exceptions/validation_spec.rb
|
439
|
+
- spec/grape/exceptions/invalid_accept_header_spec.rb
|
440
|
+
- spec/grape/exceptions/missing_option_spec.rb
|
441
|
+
- spec/grape/exceptions/invalid_response_spec.rb
|
442
|
+
- spec/grape/exceptions/body_parse_errors_spec.rb
|
443
|
+
- spec/grape/exceptions/invalid_formatter_spec.rb
|
444
|
+
- spec/grape/exceptions/missing_mime_type_spec.rb
|
445
|
+
- spec/grape/exceptions/unknown_options_spec.rb
|
446
|
+
- spec/grape/exceptions/validation_errors_spec.rb
|
447
|
+
- spec/grape/exceptions/unknown_validator_spec.rb
|
448
|
+
- spec/grape/exceptions/invalid_versioner_option_spec.rb
|
449
|
+
- spec/grape/exceptions/base_spec.rb
|
450
|
+
- spec/grape/presenters/presenter_spec.rb
|
451
|
+
- spec/grape/validations/single_attribute_iterator_spec.rb
|
424
452
|
- spec/grape/validations/attributes_iterator_spec.rb
|
425
|
-
- spec/grape/validations/types/array_coercer_spec.rb
|
426
|
-
- spec/grape/validations/types/set_coercer_spec.rb
|
427
453
|
- spec/grape/validations/types/primitive_coercer_spec.rb
|
454
|
+
- spec/grape/validations/types/set_coercer_spec.rb
|
455
|
+
- spec/grape/validations/types/array_coercer_spec.rb
|
456
|
+
- spec/grape/validations/params_scope_spec.rb
|
457
|
+
- spec/grape/validations/instance_behaivour_spec.rb
|
458
|
+
- spec/grape/validations/multiple_attributes_iterator_spec.rb
|
459
|
+
- spec/grape/validations/types_spec.rb
|
428
460
|
- spec/grape/validations/validators/regexp_spec.rb
|
429
|
-
- spec/grape/validations/validators/default_spec.rb
|
430
|
-
- spec/grape/validations/validators/values_spec.rb
|
431
|
-
- spec/grape/validations/validators/same_as_spec.rb
|
432
461
|
- spec/grape/validations/validators/mutual_exclusion_spec.rb
|
433
|
-
- spec/grape/validations/validators/except_values_spec.rb
|
434
462
|
- spec/grape/validations/validators/exactly_one_of_spec.rb
|
435
|
-
- spec/grape/validations/validators/
|
436
|
-
- spec/grape/validations/validators/coerce_spec.rb
|
463
|
+
- spec/grape/validations/validators/except_values_spec.rb
|
437
464
|
- spec/grape/validations/validators/presence_spec.rb
|
465
|
+
- spec/grape/validations/validators/all_or_none_spec.rb
|
466
|
+
- spec/grape/validations/validators/allow_blank_spec.rb
|
467
|
+
- spec/grape/validations/validators/same_as_spec.rb
|
468
|
+
- spec/grape/validations/validators/default_spec.rb
|
469
|
+
- spec/grape/validations/validators/values_spec.rb
|
438
470
|
- spec/grape/validations/validators/at_least_one_of_spec.rb
|
471
|
+
- spec/grape/validations/validators/coerce_spec.rb
|
439
472
|
- spec/grape/validations/validators/zh-CN.yml
|
440
|
-
- spec/grape/validations/validators/all_or_none_spec.rb
|
441
|
-
- spec/grape/validations/params_scope_spec.rb
|
442
|
-
- spec/grape/validations/multiple_attributes_iterator_spec.rb
|
443
|
-
- spec/grape/validations/instance_behaivour_spec.rb
|
444
|
-
- spec/grape/validations/single_attribute_iterator_spec.rb
|
445
|
-
- spec/grape/config_spec.rb
|
446
|
-
- spec/grape/parser_spec.rb
|
447
|
-
- spec/grape/exceptions/body_parse_errors_spec.rb
|
448
|
-
- spec/grape/exceptions/missing_option_spec.rb
|
449
|
-
- spec/grape/exceptions/invalid_accept_header_spec.rb
|
450
|
-
- spec/grape/exceptions/validation_spec.rb
|
451
|
-
- spec/grape/exceptions/unknown_validator_spec.rb
|
452
|
-
- spec/grape/exceptions/validation_errors_spec.rb
|
453
|
-
- spec/grape/exceptions/invalid_response_spec.rb
|
454
|
-
- spec/grape/exceptions/unknown_options_spec.rb
|
455
|
-
- spec/grape/exceptions/invalid_formatter_spec.rb
|
456
|
-
- spec/grape/exceptions/invalid_versioner_option_spec.rb
|
457
|
-
- spec/grape/exceptions/missing_mime_type_spec.rb
|
458
|
-
- spec/grape/exceptions/base_spec.rb
|
459
|
-
- spec/grape/path_spec.rb
|
460
|
-
- spec/grape/util/stackable_values_spec.rb
|
461
|
-
- spec/grape/util/strict_hash_configuration_spec.rb
|
462
|
-
- spec/grape/util/inheritable_setting_spec.rb
|
463
|
-
- spec/grape/util/reverse_stackable_values_spec.rb
|
464
|
-
- spec/grape/util/inheritable_values_spec.rb
|
465
|
-
- spec/grape/extensions/param_builders/hash_with_indifferent_access_spec.rb
|
466
|
-
- spec/grape/extensions/param_builders/hash_spec.rb
|
467
473
|
- spec/grape/extensions/param_builders/hashie/mash_spec.rb
|
468
|
-
- spec/grape/
|
469
|
-
- spec/grape/
|
470
|
-
- spec/grape/
|
474
|
+
- spec/grape/extensions/param_builders/hash_spec.rb
|
475
|
+
- spec/grape/extensions/param_builders/hash_with_indifferent_access_spec.rb
|
476
|
+
- spec/grape/parser_spec.rb
|
477
|
+
- spec/grape/request_spec.rb
|
471
478
|
- spec/grape/endpoint/declared_spec.rb
|
472
|
-
- spec/grape/
|
473
|
-
- spec/grape/
|
474
|
-
- spec/grape/
|
475
|
-
- spec/grape/
|
476
|
-
- spec/grape/
|
477
|
-
- spec/grape/
|
478
|
-
- spec/grape/
|
479
|
-
- spec/grape/
|
480
|
-
- spec/grape/
|
481
|
-
- spec/grape/
|
482
|
-
- spec/grape/
|
483
|
-
- spec/grape/
|
484
|
-
- spec/grape/
|
485
|
-
- spec/grape/
|
486
|
-
- spec/grape/
|
487
|
-
- spec/grape/
|
488
|
-
- spec/grape/
|
489
|
-
- spec/grape/
|
490
|
-
- spec/grape/
|
491
|
-
- spec/grape/dsl/
|
492
|
-
- spec/grape/dsl/
|
493
|
-
- spec/grape/dsl/
|
479
|
+
- spec/grape/api/parameters_modification_spec.rb
|
480
|
+
- spec/grape/api/patch_method_helpers_spec.rb
|
481
|
+
- spec/grape/api/required_parameters_with_invalid_method_spec.rb
|
482
|
+
- spec/grape/api/nested_helpers_spec.rb
|
483
|
+
- spec/grape/api/defines_boolean_in_params_spec.rb
|
484
|
+
- spec/grape/api/invalid_format_spec.rb
|
485
|
+
- spec/grape/api/required_parameters_in_route_spec.rb
|
486
|
+
- spec/grape/api/instance_spec.rb
|
487
|
+
- spec/grape/api/namespace_parameters_in_route_spec.rb
|
488
|
+
- spec/grape/api/recognize_path_spec.rb
|
489
|
+
- spec/grape/api/shared_helpers_exactly_one_of_spec.rb
|
490
|
+
- spec/grape/api/inherited_helpers_spec.rb
|
491
|
+
- spec/grape/api/shared_helpers_spec.rb
|
492
|
+
- spec/grape/api/deeply_included_options_spec.rb
|
493
|
+
- spec/grape/api/routes_with_requirements_spec.rb
|
494
|
+
- spec/grape/api/custom_validations_spec.rb
|
495
|
+
- spec/grape/api/optional_parameters_in_route_spec.rb
|
496
|
+
- spec/grape/api_remount_spec.rb
|
497
|
+
- spec/grape/named_api_spec.rb
|
498
|
+
- spec/grape/dsl/request_response_spec.rb
|
499
|
+
- spec/grape/dsl/desc_spec.rb
|
500
|
+
- spec/grape/dsl/logger_spec.rb
|
494
501
|
- spec/grape/dsl/configuration_spec.rb
|
502
|
+
- spec/grape/dsl/validations_spec.rb
|
495
503
|
- spec/grape/dsl/parameters_spec.rb
|
496
|
-
- spec/grape/dsl/logger_spec.rb
|
497
504
|
- spec/grape/dsl/helpers_spec.rb
|
498
|
-
- spec/grape/dsl/
|
499
|
-
- spec/grape/dsl/routing_spec.rb
|
505
|
+
- spec/grape/dsl/middleware_spec.rb
|
500
506
|
- spec/grape/dsl/headers_spec.rb
|
501
|
-
- spec/grape/dsl/
|
502
|
-
- spec/grape/dsl/
|
503
|
-
- spec/grape/
|
504
|
-
- spec/grape/
|
505
|
-
- spec/grape/
|
506
|
-
- spec/grape/request_spec.rb
|
507
|
-
- spec/integration/eager_load/eager_load_spec.rb
|
508
|
-
- spec/integration/multi_xml/xml_spec.rb
|
509
|
-
- spec/integration/multi_json/json_spec.rb
|
510
|
-
- spec/spec_helper.rb
|
507
|
+
- spec/grape/dsl/callbacks_spec.rb
|
508
|
+
- spec/grape/dsl/settings_spec.rb
|
509
|
+
- spec/grape/dsl/routing_spec.rb
|
510
|
+
- spec/grape/dsl/inside_route_spec.rb
|
511
|
+
- spec/grape/path_spec.rb
|