grape 0.13.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grape might be problematic. Click here for more details.

Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/Appraisals +9 -4
  3. data/CHANGELOG.md +28 -0
  4. data/Gemfile +0 -1
  5. data/Gemfile.lock +166 -0
  6. data/README.md +305 -163
  7. data/Rakefile +30 -33
  8. data/UPGRADING.md +31 -0
  9. data/benchmark/simple.rb +27 -0
  10. data/gemfiles/rack_1.5.2.gemfile +13 -0
  11. data/gemfiles/rails_3.gemfile +2 -2
  12. data/gemfiles/rails_4.gemfile +1 -2
  13. data/grape.gemspec +5 -4
  14. data/lib/grape.rb +9 -5
  15. data/lib/grape/dsl/configuration.rb +5 -2
  16. data/lib/grape/dsl/helpers.rb +8 -3
  17. data/lib/grape/dsl/inside_route.rb +67 -44
  18. data/lib/grape/dsl/parameters.rb +21 -12
  19. data/lib/grape/dsl/request_response.rb +1 -1
  20. data/lib/grape/dsl/routing.rb +3 -4
  21. data/lib/grape/endpoint.rb +63 -28
  22. data/lib/grape/error_formatter/base.rb +6 -6
  23. data/lib/grape/exceptions/base.rb +5 -5
  24. data/lib/grape/exceptions/invalid_version_header.rb +10 -0
  25. data/lib/grape/formatter/serializable_hash.rb +3 -2
  26. data/lib/grape/locale/en.yml +4 -1
  27. data/lib/grape/middleware/auth/base.rb +2 -2
  28. data/lib/grape/middleware/auth/dsl.rb +1 -1
  29. data/lib/grape/middleware/auth/strategies.rb +1 -1
  30. data/lib/grape/middleware/base.rb +7 -4
  31. data/lib/grape/middleware/error.rb +3 -2
  32. data/lib/grape/middleware/filter.rb +1 -1
  33. data/lib/grape/middleware/formatter.rb +47 -44
  34. data/lib/grape/middleware/globals.rb +3 -3
  35. data/lib/grape/middleware/versioner/accept_version_header.rb +5 -7
  36. data/lib/grape/middleware/versioner/header.rb +113 -50
  37. data/lib/grape/middleware/versioner/param.rb +5 -8
  38. data/lib/grape/middleware/versioner/parse_media_type_patch.rb +20 -0
  39. data/lib/grape/middleware/versioner/path.rb +3 -6
  40. data/lib/grape/path.rb +3 -3
  41. data/lib/grape/request.rb +40 -0
  42. data/lib/grape/util/content_types.rb +9 -9
  43. data/lib/grape/util/env.rb +22 -0
  44. data/lib/grape/util/strict_hash_configuration.rb +2 -1
  45. data/lib/grape/validations/attributes_iterator.rb +8 -3
  46. data/lib/grape/validations/params_scope.rb +83 -15
  47. data/lib/grape/validations/types.rb +144 -0
  48. data/lib/grape/validations/types/build_coercer.rb +53 -0
  49. data/lib/grape/validations/types/custom_type_coercer.rb +183 -0
  50. data/lib/grape/validations/types/file.rb +28 -0
  51. data/lib/grape/validations/types/json.rb +65 -0
  52. data/lib/grape/validations/types/multiple_type_coercer.rb +76 -0
  53. data/lib/grape/validations/types/variant_collection_coercer.rb +59 -0
  54. data/lib/grape/validations/types/virtus_collection_patch.rb +16 -0
  55. data/lib/grape/validations/validators/all_or_none.rb +1 -1
  56. data/lib/grape/validations/validators/allow_blank.rb +3 -3
  57. data/lib/grape/validations/validators/base.rb +7 -0
  58. data/lib/grape/validations/validators/coerce.rb +31 -42
  59. data/lib/grape/validations/validators/presence.rb +2 -3
  60. data/lib/grape/validations/validators/regexp.rb +2 -4
  61. data/lib/grape/validations/validators/values.rb +3 -3
  62. data/lib/grape/version.rb +1 -1
  63. data/pkg/grape-0.13.0.gem +0 -0
  64. data/spec/grape/api/custom_validations_spec.rb +5 -4
  65. data/spec/grape/api/deeply_included_options_spec.rb +7 -7
  66. data/spec/grape/api/nested_helpers_spec.rb +4 -2
  67. data/spec/grape/api/shared_helpers_spec.rb +8 -8
  68. data/spec/grape/api_spec.rb +88 -54
  69. data/spec/grape/dsl/configuration_spec.rb +13 -0
  70. data/spec/grape/dsl/helpers_spec.rb +16 -2
  71. data/spec/grape/dsl/inside_route_spec.rb +3 -2
  72. data/spec/grape/dsl/parameters_spec.rb +0 -6
  73. data/spec/grape/dsl/routing_spec.rb +1 -1
  74. data/spec/grape/endpoint_spec.rb +61 -20
  75. data/spec/grape/entity_spec.rb +10 -8
  76. data/spec/grape/exceptions/invalid_accept_header_spec.rb +1 -15
  77. data/spec/grape/integration/rack_spec.rb +3 -2
  78. data/spec/grape/middleware/base_spec.rb +7 -5
  79. data/spec/grape/middleware/error_spec.rb +16 -15
  80. data/spec/grape/middleware/exception_spec.rb +45 -43
  81. data/spec/grape/middleware/formatter_spec.rb +34 -0
  82. data/spec/grape/middleware/versioner/header_spec.rb +79 -47
  83. data/spec/grape/path_spec.rb +10 -10
  84. data/spec/grape/presenters/presenter_spec.rb +2 -2
  85. data/spec/grape/request_spec.rb +100 -0
  86. data/spec/grape/validations/params_scope_spec.rb +11 -9
  87. data/spec/grape/validations/types_spec.rb +95 -0
  88. data/spec/grape/validations/validators/coerce_spec.rb +335 -2
  89. data/spec/grape/validations/validators/values_spec.rb +15 -15
  90. data/spec/grape/validations_spec.rb +53 -24
  91. data/spec/shared/versioning_examples.rb +2 -2
  92. data/spec/spec_helper.rb +0 -1
  93. data/spec/support/versioned_helpers.rb +2 -2
  94. metadata +51 -13
  95. data/.gitignore +0 -46
  96. data/.rspec +0 -2
  97. data/.rubocop.yml +0 -7
  98. data/.rubocop_todo.yml +0 -84
  99. data/.travis.yml +0 -20
  100. data/.yardopts +0 -2
  101. data/lib/grape/http/request.rb +0 -35
  102. data/lib/grape/util/parameter_types.rb +0 -58
  103. data/spec/grape/util/parameter_types_spec.rb +0 -54
@@ -1,22 +1,22 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Grape::Validations::ValuesValidator do
4
- class ValuesModel
5
- DEFAULT_VALUES = ['valid-type1', 'valid-type2', 'valid-type3']
6
- class << self
7
- def values
8
- @values ||= []
9
- [DEFAULT_VALUES + @values].flatten.uniq
10
- end
4
+ module ValidationsSpec
5
+ class ValuesModel
6
+ DEFAULT_VALUES = ['valid-type1', 'valid-type2', 'valid-type3']
7
+ class << self
8
+ def values
9
+ @values ||= []
10
+ [DEFAULT_VALUES + @values].flatten.uniq
11
+ end
11
12
 
12
- def add_value(value)
13
- @values ||= []
14
- @values << value
13
+ def add_value(value)
14
+ @values ||= []
15
+ @values << value
16
+ end
15
17
  end
16
18
  end
17
- end
18
19
 
19
- module ValidationsSpec
20
20
  module ValuesValidatorSpec
21
21
  class API < Grape::API
22
22
  default_format :json
@@ -129,7 +129,7 @@ describe Grape::Validations::ValuesValidator do
129
129
  end
130
130
 
131
131
  it 'does not validate updated values without proc' do
132
- ValuesModel.add_value('valid-type4')
132
+ ValidationsSpec::ValuesModel.add_value('valid-type4')
133
133
 
134
134
  get('/', type: 'valid-type4')
135
135
  expect(last_response.status).to eq 400
@@ -137,7 +137,7 @@ describe Grape::Validations::ValuesValidator do
137
137
  end
138
138
 
139
139
  it 'validates against values in a proc' do
140
- ValuesModel.add_value('valid-type4')
140
+ ValidationsSpec::ValuesModel.add_value('valid-type4')
141
141
 
142
142
  get('/lambda', type: 'valid-type4')
143
143
  expect(last_response.status).to eq 200
@@ -163,7 +163,7 @@ describe Grape::Validations::ValuesValidator do
163
163
  it 'raises IncompatibleOptionValues on an invalid default value from proc' do
164
164
  subject = Class.new(Grape::API)
165
165
  expect do
166
- subject.params { optional :type, values: ['valid-type1', 'valid-type2', 'valid-type3'], default: ValuesModel.values.sample + '_invalid' }
166
+ subject.params { optional :type, values: ['valid-type1', 'valid-type2', 'valid-type3'], default: ValidationsSpec::ValuesModel.values.sample + '_invalid' }
167
167
  end.to raise_error Grape::Exceptions::IncompatibleOptionValues
168
168
  end
169
169
 
@@ -318,6 +318,35 @@ describe Grape::Validations do
318
318
  end
319
319
  end
320
320
 
321
+ context 'hash with a required param with validation' do
322
+ before do
323
+ subject.params do
324
+ requires :items, type: Hash do
325
+ requires :key, type: String, values: %w(a b)
326
+ end
327
+ end
328
+ subject.get '/required' do
329
+ 'required works'
330
+ end
331
+ end
332
+
333
+ it 'errors when param is not a Hash' do
334
+ get '/required', items: 'not a hash'
335
+ expect(last_response.status).to eq(400)
336
+ expect(last_response.body).to eq('items is invalid, items[key] is missing, items[key] is invalid')
337
+
338
+ get '/required', items: [{ key: 'hash in array' }]
339
+ expect(last_response.status).to eq(400)
340
+ expect(last_response.body).to eq('items is invalid, items[0][key] does not have a valid value')
341
+ end
342
+
343
+ it 'works when all params match' do
344
+ get '/required', items: { key: 'a' }
345
+ expect(last_response.status).to eq(200)
346
+ expect(last_response.body).to eq('required works')
347
+ end
348
+ end
349
+
321
350
  context 'group' do
322
351
  before do
323
352
  subject.params do
@@ -374,10 +403,11 @@ describe Grape::Validations do
374
403
  end
375
404
 
376
405
  context 'custom validator for a Hash' do
377
- module DateRangeValidations
378
- class DateRangeValidator < Grape::Validations::Base
379
- def validate_param!(attr_name, params)
380
- unless params[attr_name][:from] <= params[attr_name][:to]
406
+ module ValuesSpec
407
+ module DateRangeValidations
408
+ class DateRangeValidator < Grape::Validations::Base
409
+ def validate_param!(attr_name, params)
410
+ return if params[attr_name][:from] <= params[attr_name][:to]
381
411
  fail Grape::Exceptions::Validation, params: [@scope.full_name(attr_name)], message: "'from' must be lower or equal to 'to'"
382
412
  end
383
413
  end
@@ -462,7 +492,7 @@ describe Grape::Validations do
462
492
  # NOTE: with body parameters in json or XML or similar this
463
493
  # should actually fail with: children[parents][name] is missing.
464
494
  expect(last_response.status).to eq(400)
465
- expect(last_response.body).to eq('children[parents] is missing')
495
+ expect(last_response.body).to eq('children[0][parents] is missing')
466
496
  end
467
497
 
468
498
  it 'safely handles empty arrays and blank parameters' do
@@ -473,7 +503,7 @@ describe Grape::Validations do
473
503
  expect(last_response.body).to eq('children is missing')
474
504
  get '/within_array', children: [name: 'Jay']
475
505
  expect(last_response.status).to eq(400)
476
- expect(last_response.body).to eq('children[parents] is missing')
506
+ expect(last_response.body).to eq('children[0][parents] is missing')
477
507
  end
478
508
 
479
509
  it 'errors when param is not an Array' do
@@ -488,7 +518,7 @@ describe Grape::Validations do
488
518
 
489
519
  get '/within_array', children: [name: 'Jay', parents: { name: 'Fred' }]
490
520
  expect(last_response.status).to eq(400)
491
- expect(last_response.body).to eq('children[parents] is invalid')
521
+ expect(last_response.body).to eq('children[0][parents] is invalid')
492
522
  end
493
523
  end
494
524
 
@@ -614,7 +644,7 @@ describe Grape::Validations do
614
644
  { name: 'Job', parents: [{ name: 'Joy' }] }
615
645
  ]
616
646
  expect(last_response.status).to eq(400)
617
- expect(last_response.body).to eq('children[parents][name] is missing')
647
+ expect(last_response.body).to eq('children[0][parents][0][name] is missing')
618
648
  end
619
649
 
620
650
  it 'safely handles empty arrays and blank parameters' do
@@ -622,7 +652,7 @@ describe Grape::Validations do
622
652
  expect(last_response.status).to eq(200)
623
653
  put_with_json '/within_array', children: [name: 'Jay']
624
654
  expect(last_response.status).to eq(400)
625
- expect(last_response.body).to eq('children[parents] is missing')
655
+ expect(last_response.body).to eq('children[0][parents] is missing')
626
656
  end
627
657
  end
628
658
 
@@ -653,7 +683,7 @@ describe Grape::Validations do
653
683
  it 'errors when group is present, but required param is not' do
654
684
  get '/optional_group', items: [{ not_key: 'foo' }]
655
685
  expect(last_response.status).to eq(400)
656
- expect(last_response.body).to eq('items[key] is missing')
686
+ expect(last_response.body).to eq('items[0][key] is missing')
657
687
  end
658
688
 
659
689
  it "errors when param is present but isn't an Array" do
@@ -697,7 +727,7 @@ describe Grape::Validations do
697
727
  it 'does internal validations if the outer group is present' do
698
728
  get '/nested_optional_group', items: [{ key: 'foo' }]
699
729
  expect(last_response.status).to eq(400)
700
- expect(last_response.body).to eq('items[required_subitems] is missing')
730
+ expect(last_response.body).to eq('items[0][required_subitems] is missing')
701
731
 
702
732
  get '/nested_optional_group', items: [{ key: 'foo', required_subitems: [{ value: 'bar' }] }]
703
733
  expect(last_response.status).to eq(200)
@@ -707,7 +737,7 @@ describe Grape::Validations do
707
737
  it 'handles deep nesting' do
708
738
  get '/nested_optional_group', items: [{ key: 'foo', required_subitems: [{ value: 'bar' }], optional_subitems: [{ not_value: 'baz' }] }]
709
739
  expect(last_response.status).to eq(400)
710
- expect(last_response.body).to eq('items[optional_subitems][value] is missing')
740
+ expect(last_response.body).to eq('items[0][optional_subitems][0][value] is missing')
711
741
 
712
742
  get '/nested_optional_group', items: [{ key: 'foo', required_subitems: [{ value: 'bar' }], optional_subitems: [{ value: 'baz' }] }]
713
743
  expect(last_response.status).to eq(200)
@@ -717,7 +747,7 @@ describe Grape::Validations do
717
747
  it 'handles validation within arrays' do
718
748
  get '/nested_optional_group', items: [{ key: 'foo' }]
719
749
  expect(last_response.status).to eq(400)
720
- expect(last_response.body).to eq('items[required_subitems] is missing')
750
+ expect(last_response.body).to eq('items[0][required_subitems] is missing')
721
751
 
722
752
  get '/nested_optional_group', items: [{ key: 'foo', required_subitems: [{ value: 'bar' }] }]
723
753
  expect(last_response.status).to eq(200)
@@ -725,7 +755,7 @@ describe Grape::Validations do
725
755
 
726
756
  get '/nested_optional_group', items: [{ key: 'foo', required_subitems: [{ value: 'bar' }], optional_subitems: [{ not_value: 'baz' }] }]
727
757
  expect(last_response.status).to eq(400)
728
- expect(last_response.body).to eq('items[optional_subitems][value] is missing')
758
+ expect(last_response.body).to eq('items[0][optional_subitems][0][value] is missing')
729
759
  end
730
760
 
731
761
  it 'adds to declared parameters' do
@@ -763,9 +793,8 @@ describe Grape::Validations do
763
793
  module CustomValidations
764
794
  class Customvalidator < Grape::Validations::Base
765
795
  def validate_param!(attr_name, params)
766
- unless params[attr_name] == 'im custom'
767
- fail Grape::Exceptions::Validation, params: [@scope.full_name(attr_name)], message: 'is not custom!'
768
- end
796
+ return if params[attr_name] == 'im custom'
797
+ fail Grape::Exceptions::Validation, params: [@scope.full_name(attr_name)], message: 'is not custom!'
769
798
  end
770
799
  end
771
800
  end
@@ -912,9 +941,8 @@ describe Grape::Validations do
912
941
  module CustomValidations
913
942
  class CustomvalidatorWithOptions < Grape::Validations::Base
914
943
  def validate_param!(attr_name, params)
915
- unless params[attr_name] == @option[:text]
916
- fail Grape::Exceptions::Validation, params: [@scope.full_name(attr_name)], message: @option[:error_message]
917
- end
944
+ return if params[attr_name] == @option[:text]
945
+ fail Grape::Exceptions::Validation, params: [@scope.full_name(attr_name)], message: @option[:error_message]
918
946
  end
919
947
  end
920
948
  end
@@ -950,25 +978,26 @@ describe Grape::Validations do
950
978
  end
951
979
 
952
980
  it 'in helper module which kind of Grape::DSL::Helpers::BaseHelper' do
953
- module SharedParams
981
+ shared_params = Module.new do
954
982
  extend Grape::DSL::Helpers::BaseHelper
955
983
  params :pagination do
956
984
  end
957
985
  end
958
- subject.helpers SharedParams
986
+ subject.helpers shared_params
959
987
  end
960
988
  end
961
989
 
962
990
  context 'can be included in usual params' do
963
991
  before do
964
- module SharedParams
992
+ shared_params = Module.new do
965
993
  extend Grape::DSL::Helpers::BaseHelper
966
994
  params :period do
967
995
  optional :start_date
968
996
  optional :end_date
969
997
  end
970
998
  end
971
- subject.helpers SharedParams
999
+
1000
+ subject.helpers shared_params
972
1001
 
973
1002
  subject.helpers do
974
1003
  params :pagination do
@@ -3,7 +3,7 @@ shared_examples_for 'versioning' do
3
3
  subject.format :txt
4
4
  subject.version 'v1', macro_options
5
5
  subject.get :hello do
6
- "Version: #{request.env['api.version'] }"
6
+ "Version: #{request.env['api.version']}"
7
7
  end
8
8
  versioned_get '/hello', 'v1', macro_options
9
9
  expect(last_response.body).to eql 'Version: v1'
@@ -14,7 +14,7 @@ shared_examples_for 'versioning' do
14
14
  subject.prefix 'api'
15
15
  subject.version 'v1', macro_options
16
16
  subject.get :hello do
17
- "Version: #{request.env['api.version'] }"
17
+ "Version: #{request.env['api.version']}"
18
18
  end
19
19
  versioned_get '/hello', 'v1', macro_options.merge(prefix: 'api')
20
20
  expect(last_response.body).to eql 'Version: v1'
@@ -12,7 +12,6 @@ require 'json'
12
12
  require 'rack/test'
13
13
  require 'base64'
14
14
  require 'cookiejar'
15
- require 'json'
16
15
  require 'mime/types'
17
16
 
18
17
  Dir["#{File.dirname(__FILE__)}/support/*.rb"].each do |file|
@@ -26,13 +26,13 @@ def versioned_headers(options)
26
26
  when :header
27
27
  {
28
28
  'HTTP_ACCEPT' => [
29
- "application/vnd.#{options[:vendor] }-#{options[:version] }",
29
+ "application/vnd.#{options[:vendor]}-#{options[:version]}",
30
30
  options[:format]
31
31
  ].compact.join('+')
32
32
  }
33
33
  when :accept_version_header
34
34
  {
35
- 'HTTP_ACCEPT_VERSION' => "#{options[:version] }"
35
+ 'HTTP_ACCEPT_VERSION' => "#{options[:version]}"
36
36
  }
37
37
  else
38
38
  fail ArgumentError.new("unknown versioning strategy: #{options[:using]}")
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: 0.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bleigh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-10 00:00:00.000000000 Z
11
+ date: 2015-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -264,6 +264,20 @@ dependencies:
264
264
  version: '0'
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: mime-types
267
+ requirement: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - <
270
+ - !ruby/object:Gem::Version
271
+ version: '3.0'
272
+ type: :development
273
+ prerelease: false
274
+ version_requirements: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - <
277
+ - !ruby/object:Gem::Version
278
+ version: '3.0'
279
+ - !ruby/object:Gem::Dependency
280
+ name: appraisal
267
281
  requirement: !ruby/object:Gem::Requirement
268
282
  requirements:
269
283
  - - '>='
@@ -277,7 +291,7 @@ dependencies:
277
291
  - !ruby/object:Gem::Version
278
292
  version: '0'
279
293
  - !ruby/object:Gem::Dependency
280
- name: appraisal
294
+ name: benchmark-ips
281
295
  requirement: !ruby/object:Gem::Requirement
282
296
  requirements:
283
297
  - - '>='
@@ -290,6 +304,20 @@ dependencies:
290
304
  - - '>='
291
305
  - !ruby/object:Gem::Version
292
306
  version: '0'
307
+ - !ruby/object:Gem::Dependency
308
+ name: rubocop
309
+ requirement: !ruby/object:Gem::Requirement
310
+ requirements:
311
+ - - '='
312
+ - !ruby/object:Gem::Version
313
+ version: 0.35.1
314
+ type: :development
315
+ prerelease: false
316
+ version_requirements: !ruby/object:Gem::Requirement
317
+ requirements:
318
+ - - '='
319
+ - !ruby/object:Gem::Version
320
+ version: 0.35.1
293
321
  description: A Ruby framework for rapid API development with great conventions.
294
322
  email:
295
323
  - michael@intridea.com
@@ -297,22 +325,19 @@ executables: []
297
325
  extensions: []
298
326
  extra_rdoc_files: []
299
327
  files:
300
- - .gitignore
301
- - .rspec
302
- - .rubocop.yml
303
- - .rubocop_todo.yml
304
- - .travis.yml
305
- - .yardopts
306
328
  - Appraisals
307
329
  - CHANGELOG.md
308
330
  - CONTRIBUTING.md
309
331
  - Gemfile
332
+ - Gemfile.lock
310
333
  - Guardfile
311
334
  - LICENSE
312
335
  - README.md
313
336
  - RELEASING.md
314
337
  - Rakefile
315
338
  - UPGRADING.md
339
+ - benchmark/simple.rb
340
+ - gemfiles/rack_1.5.2.gemfile
316
341
  - gemfiles/rails_3.gemfile
317
342
  - gemfiles/rails_4.gemfile
318
343
  - grape.gemspec
@@ -342,6 +367,7 @@ files:
342
367
  - lib/grape/exceptions/invalid_accept_header.rb
343
368
  - lib/grape/exceptions/invalid_formatter.rb
344
369
  - lib/grape/exceptions/invalid_message_body.rb
370
+ - lib/grape/exceptions/invalid_version_header.rb
345
371
  - lib/grape/exceptions/invalid_versioner_option.rb
346
372
  - lib/grape/exceptions/invalid_with_option_for_represent.rb
347
373
  - lib/grape/exceptions/missing_group_type.rb
@@ -360,7 +386,6 @@ files:
360
386
  - lib/grape/formatter/txt.rb
361
387
  - lib/grape/formatter/xml.rb
362
388
  - lib/grape/http/headers.rb
363
- - lib/grape/http/request.rb
364
389
  - lib/grape/locale/en.yml
365
390
  - lib/grape/middleware/auth/base.rb
366
391
  - lib/grape/middleware/auth/dsl.rb
@@ -375,6 +400,7 @@ files:
375
400
  - lib/grape/middleware/versioner/accept_version_header.rb
376
401
  - lib/grape/middleware/versioner/header.rb
377
402
  - lib/grape/middleware/versioner/param.rb
403
+ - lib/grape/middleware/versioner/parse_media_type_patch.rb
378
404
  - lib/grape/middleware/versioner/path.rb
379
405
  - lib/grape/namespace.rb
380
406
  - lib/grape/parser/base.rb
@@ -382,17 +408,26 @@ files:
382
408
  - lib/grape/parser/xml.rb
383
409
  - lib/grape/path.rb
384
410
  - lib/grape/presenters/presenter.rb
411
+ - lib/grape/request.rb
385
412
  - lib/grape/route.rb
386
413
  - lib/grape/util/content_types.rb
414
+ - lib/grape/util/env.rb
387
415
  - lib/grape/util/file_response.rb
388
416
  - lib/grape/util/inheritable_setting.rb
389
417
  - lib/grape/util/inheritable_values.rb
390
- - lib/grape/util/parameter_types.rb
391
418
  - lib/grape/util/stackable_values.rb
392
419
  - lib/grape/util/strict_hash_configuration.rb
393
420
  - lib/grape/validations.rb
394
421
  - lib/grape/validations/attributes_iterator.rb
395
422
  - lib/grape/validations/params_scope.rb
423
+ - lib/grape/validations/types.rb
424
+ - lib/grape/validations/types/build_coercer.rb
425
+ - lib/grape/validations/types/custom_type_coercer.rb
426
+ - lib/grape/validations/types/file.rb
427
+ - lib/grape/validations/types/json.rb
428
+ - lib/grape/validations/types/multiple_type_coercer.rb
429
+ - lib/grape/validations/types/variant_collection_coercer.rb
430
+ - lib/grape/validations/types/virtus_collection_patch.rb
396
431
  - lib/grape/validations/validators/all_or_none.rb
397
432
  - lib/grape/validations/validators/allow_blank.rb
398
433
  - lib/grape/validations/validators/at_least_one_of.rb
@@ -406,6 +441,7 @@ files:
406
441
  - lib/grape/validations/validators/regexp.rb
407
442
  - lib/grape/validations/validators/values.rb
408
443
  - lib/grape/version.rb
444
+ - pkg/grape-0.13.0.gem
409
445
  - spec/grape/api/custom_validations_spec.rb
410
446
  - spec/grape/api/deeply_included_options_spec.rb
411
447
  - spec/grape/api/nested_helpers_spec.rb
@@ -449,13 +485,14 @@ files:
449
485
  - spec/grape/middleware/versioner_spec.rb
450
486
  - spec/grape/path_spec.rb
451
487
  - spec/grape/presenters/presenter_spec.rb
488
+ - spec/grape/request_spec.rb
452
489
  - spec/grape/util/inheritable_setting_spec.rb
453
490
  - spec/grape/util/inheritable_values_spec.rb
454
- - spec/grape/util/parameter_types_spec.rb
455
491
  - spec/grape/util/stackable_values_spec.rb
456
492
  - spec/grape/util/strict_hash_configuration_spec.rb
457
493
  - spec/grape/validations/attributes_iterator_spec.rb
458
494
  - spec/grape/validations/params_scope_spec.rb
495
+ - spec/grape/validations/types_spec.rb
459
496
  - spec/grape/validations/validators/all_or_none_spec.rb
460
497
  - spec/grape/validations/validators/allow_blank_spec.rb
461
498
  - spec/grape/validations/validators/at_least_one_of_spec.rb
@@ -543,13 +580,14 @@ test_files:
543
580
  - spec/grape/middleware/versioner_spec.rb
544
581
  - spec/grape/path_spec.rb
545
582
  - spec/grape/presenters/presenter_spec.rb
583
+ - spec/grape/request_spec.rb
546
584
  - spec/grape/util/inheritable_setting_spec.rb
547
585
  - spec/grape/util/inheritable_values_spec.rb
548
- - spec/grape/util/parameter_types_spec.rb
549
586
  - spec/grape/util/stackable_values_spec.rb
550
587
  - spec/grape/util/strict_hash_configuration_spec.rb
551
588
  - spec/grape/validations/attributes_iterator_spec.rb
552
589
  - spec/grape/validations/params_scope_spec.rb
590
+ - spec/grape/validations/types_spec.rb
553
591
  - spec/grape/validations/validators/all_or_none_spec.rb
554
592
  - spec/grape/validations/validators/allow_blank_spec.rb
555
593
  - spec/grape/validations/validators/at_least_one_of_spec.rb