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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac9fdc749f4dcad72fa8baacf0b07fa0fa499552521c789dd8e84439554ce275
4
- data.tar.gz: 075b2bc7e75e7b0240973086cdae37cd2adf10ef4a4c419dc2cccd7a2741a3cd
3
+ metadata.gz: bda9361933fff7f38c7b6e6f5196d1b245336179a527addf3bfd3aa67c6ec544
4
+ data.tar.gz: 71a93ff4542fe59fb985ab0cfba591267b9901171e293988020df381d5377504
5
5
  SHA512:
6
- metadata.gz: b845801e8c95ceee643853fd306c1513ce0611ebd535f3e2f058e95b4c491da08f58bcbd33b8d42d2cd8f1432d619dda203f8243fcc72e2b808ec4d0e15bc81c
7
- data.tar.gz: ccdf098f65e4331fc35eaab564fbaf8d7411d1ae6f394f4cf4e0fdfa4f4871092e60b23a8a3a60ffc95680e3287446cac343932b0ef2af6b0745b91422d1d0a4
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, 1.5.2.
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
@@ -76,6 +76,7 @@ module Grape
76
76
  autoload :InvalidVersionHeader
77
77
  autoload :MethodNotAllowed
78
78
  autoload :InvalidResponse
79
+ autoload :EmptyMessageBody
79
80
  end
80
81
  end
81
82
 
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 << setup_step
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)
@@ -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, header.merge('Allow' => allowed_methods) unless options?
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
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Grape
4
+ module Exceptions
5
+ class EmptyMessageBody < Base
6
+ def initialize(body_format)
7
+ super(message: compose_message(:empty_message_body, body_format: body_format), status: 400)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -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
-
@@ -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, 'application/json'
11
+ raise Grape::Exceptions::InvalidMessageBody.new('application/json')
12
12
  end
13
13
  end
14
14
  end
@@ -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, 'application/xml'
11
+ raise Grape::Exceptions::InvalidMessageBody.new('application/xml')
12
12
  end
13
13
  end
14
14
  end
data/lib/grape/request.rb CHANGED
@@ -15,6 +15,8 @@ module Grape
15
15
 
16
16
  def params
17
17
  @params ||= build_params
18
+ rescue EOFError
19
+ raise Grape::Exceptions::EmptyMessageBody.new(content_type)
18
20
  end
19
21
 
20
22
  def headers
@@ -52,8 +52,6 @@ module Grape
52
52
  # this should always be a string.
53
53
  # @return [Object] the coerced result
54
54
  def call(val)
55
- return if val.nil?
56
-
57
55
  coerced_val = @method.call(val)
58
56
 
59
57
  return coerced_val if coerced_val.is_a?(InvalidValue)
@@ -55,7 +55,7 @@ module Grape
55
55
  end
56
56
  end
57
57
 
58
- raise Grape::Exceptions::ValidationArrayErrors, array_errors if array_errors.any?
58
+ raise Grape::Exceptions::ValidationArrayErrors.new(array_errors) if array_errors.any?
59
59
  end
60
60
 
61
61
  def self.convert_to_short_name(klass)
@@ -16,7 +16,7 @@ module Grape
16
16
  end
17
17
  end
18
18
 
19
- raise Grape::Exceptions::ValidationArrayErrors, array_errors if array_errors.any?
19
+ raise Grape::Exceptions::ValidationArrayErrors.new(array_errors) if array_errors.any?
20
20
  end
21
21
 
22
22
  private
data/lib/grape/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Grape
4
4
  # The current version of Grape.
5
- VERSION = '1.5.2'
5
+ VERSION = '1.5.3'
6
6
  end
@@ -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
@@ -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.2
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-02-06 00:00:00.000000000 Z
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.2/CHANGELOG.md
374
- documentation_uri: https://www.rubydoc.info/gems/grape/1.5.2
375
- source_code_uri: https://github.com/ruby-grape/grape/tree/v1.5.2
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.2
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/api/namespace_parameters_in_route_spec.rb
406
- - spec/grape/api/routes_with_requirements_spec.rb
407
- - spec/grape/api/nested_helpers_spec.rb
408
- - spec/grape/api/required_parameters_in_route_spec.rb
409
- - spec/grape/api/shared_helpers_exactly_one_of_spec.rb
410
- - spec/grape/api/parameters_modification_spec.rb
411
- - spec/grape/api/optional_parameters_in_route_spec.rb
412
- - spec/grape/api/inherited_helpers_spec.rb
413
- - spec/grape/api/required_parameters_with_invalid_method_spec.rb
414
- - spec/grape/api/custom_validations_spec.rb
415
- - spec/grape/api/defines_boolean_in_params_spec.rb
416
- - spec/grape/api/shared_helpers_spec.rb
417
- - spec/grape/api/invalid_format_spec.rb
418
- - spec/grape/api/deeply_included_options_spec.rb
419
- - spec/grape/api/instance_spec.rb
420
- - spec/grape/api/patch_method_helpers_spec.rb
421
- - spec/grape/api/recognize_path_spec.rb
422
- - spec/grape/api_remount_spec.rb
423
- - spec/grape/validations/types_spec.rb
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/allow_blank_spec.rb
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/integration/rack_spec.rb
469
- - spec/grape/integration/rack_sendfile_spec.rb
470
- - spec/grape/integration/global_namespace_function_spec.rb
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/presenters/presenter_spec.rb
473
- - spec/grape/endpoint_spec.rb
474
- - spec/grape/api_spec.rb
475
- - spec/grape/middleware/exception_spec.rb
476
- - spec/grape/middleware/versioner/param_spec.rb
477
- - spec/grape/middleware/versioner/header_spec.rb
478
- - spec/grape/middleware/versioner/path_spec.rb
479
- - spec/grape/middleware/versioner/accept_version_header_spec.rb
480
- - spec/grape/middleware/globals_spec.rb
481
- - spec/grape/middleware/stack_spec.rb
482
- - spec/grape/middleware/formatter_spec.rb
483
- - spec/grape/middleware/error_spec.rb
484
- - spec/grape/middleware/auth/dsl_spec.rb
485
- - spec/grape/middleware/auth/strategies_spec.rb
486
- - spec/grape/middleware/auth/base_spec.rb
487
- - spec/grape/middleware/versioner_spec.rb
488
- - spec/grape/middleware/base_spec.rb
489
- - spec/grape/entity_spec.rb
490
- - spec/grape/dsl/settings_spec.rb
491
- - spec/grape/dsl/callbacks_spec.rb
492
- - spec/grape/dsl/middleware_spec.rb
493
- - spec/grape/dsl/inside_route_spec.rb
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/request_response_spec.rb
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/validations_spec.rb
502
- - spec/grape/dsl/desc_spec.rb
503
- - spec/grape/validations_spec.rb
504
- - spec/grape/named_api_spec.rb
505
- - spec/grape/loading_spec.rb
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