grape 0.8.0 → 0.9.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 (78) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -2
  3. data/.rubocop_todo.yml +80 -0
  4. data/.travis.yml +2 -2
  5. data/CHANGELOG.md +21 -2
  6. data/Gemfile +1 -6
  7. data/Guardfile +1 -5
  8. data/README.md +110 -27
  9. data/Rakefile +1 -1
  10. data/UPGRADING.md +35 -0
  11. data/grape.gemspec +5 -2
  12. data/lib/grape.rb +20 -4
  13. data/lib/grape/api.rb +25 -467
  14. data/lib/grape/api/helpers.rb +7 -0
  15. data/lib/grape/dsl/callbacks.rb +27 -0
  16. data/lib/grape/dsl/configuration.rb +27 -0
  17. data/lib/grape/dsl/helpers.rb +86 -0
  18. data/lib/grape/dsl/inside_route.rb +227 -0
  19. data/lib/grape/dsl/middleware.rb +33 -0
  20. data/lib/grape/dsl/parameters.rb +79 -0
  21. data/lib/grape/dsl/request_response.rb +152 -0
  22. data/lib/grape/dsl/routing.rb +172 -0
  23. data/lib/grape/dsl/validations.rb +29 -0
  24. data/lib/grape/endpoint.rb +6 -226
  25. data/lib/grape/error_formatter/base.rb +28 -0
  26. data/lib/grape/error_formatter/json.rb +2 -0
  27. data/lib/grape/error_formatter/txt.rb +2 -0
  28. data/lib/grape/error_formatter/xml.rb +2 -0
  29. data/lib/grape/exceptions/base.rb +6 -0
  30. data/lib/grape/exceptions/validation.rb +3 -3
  31. data/lib/grape/exceptions/validation_errors.rb +19 -6
  32. data/lib/grape/locale/en.yml +5 -3
  33. data/lib/grape/middleware/auth/base.rb +28 -12
  34. data/lib/grape/middleware/auth/dsl.rb +35 -0
  35. data/lib/grape/middleware/auth/strategies.rb +24 -0
  36. data/lib/grape/middleware/auth/strategy_info.rb +15 -0
  37. data/lib/grape/validations.rb +3 -92
  38. data/lib/grape/validations/at_least_one_of.rb +25 -0
  39. data/lib/grape/validations/coerce.rb +2 -2
  40. data/lib/grape/validations/exactly_one_of.rb +2 -2
  41. data/lib/grape/validations/mutual_exclusion.rb +2 -2
  42. data/lib/grape/validations/presence.rb +1 -1
  43. data/lib/grape/validations/regexp.rb +1 -1
  44. data/lib/grape/validations/values.rb +1 -1
  45. data/lib/grape/version.rb +1 -1
  46. data/spec/grape/api/helpers_spec.rb +36 -0
  47. data/spec/grape/api_spec.rb +72 -19
  48. data/spec/grape/dsl/callbacks_spec.rb +44 -0
  49. data/spec/grape/dsl/configuration_spec.rb +37 -0
  50. data/spec/grape/dsl/helpers_spec.rb +54 -0
  51. data/spec/grape/dsl/inside_route_spec.rb +222 -0
  52. data/spec/grape/dsl/middleware_spec.rb +40 -0
  53. data/spec/grape/dsl/parameters_spec.rb +108 -0
  54. data/spec/grape/dsl/request_response_spec.rb +123 -0
  55. data/spec/grape/dsl/routing_spec.rb +132 -0
  56. data/spec/grape/dsl/validations_spec.rb +55 -0
  57. data/spec/grape/endpoint_spec.rb +60 -11
  58. data/spec/grape/entity_spec.rb +9 -4
  59. data/spec/grape/exceptions/validation_errors_spec.rb +31 -1
  60. data/spec/grape/middleware/auth/base_spec.rb +34 -0
  61. data/spec/grape/middleware/auth/dsl_spec.rb +53 -0
  62. data/spec/grape/middleware/auth/strategies_spec.rb +81 -0
  63. data/spec/grape/middleware/error_spec.rb +33 -1
  64. data/spec/grape/middleware/exception_spec.rb +13 -0
  65. data/spec/grape/validations/at_least_one_of_spec.rb +63 -0
  66. data/spec/grape/validations/exactly_one_of_spec.rb +1 -1
  67. data/spec/grape/validations/presence_spec.rb +159 -122
  68. data/spec/grape/validations/zh-CN.yml +1 -1
  69. data/spec/grape/validations_spec.rb +77 -15
  70. data/spec/spec_helper.rb +1 -0
  71. data/spec/support/endpoint_faker.rb +23 -0
  72. metadata +93 -15
  73. data/lib/grape/middleware/auth/basic.rb +0 -13
  74. data/lib/grape/middleware/auth/digest.rb +0 -13
  75. data/lib/grape/middleware/auth/oauth2.rb +0 -83
  76. data/spec/grape/middleware/auth/basic_spec.rb +0 -31
  77. data/spec/grape/middleware/auth/digest_spec.rb +0 -47
  78. data/spec/grape/middleware/auth/oauth2_spec.rb +0 -135
@@ -1,7 +1,7 @@
1
1
  zh-CN:
2
2
  grape:
3
3
  errors:
4
- format: ! '%{attribute}%{message}'
4
+ format: ! '%{attributes}%{message}'
5
5
  attributes:
6
6
  age: 年龄
7
7
  messages:
@@ -659,7 +659,7 @@ describe Grape::Validations do
659
659
  class Customvalidator < Grape::Validations::Validator
660
660
  def validate_param!(attr_name, params)
661
661
  unless params[attr_name] == 'im custom'
662
- raise Grape::Exceptions::Validation, param: @scope.full_name(attr_name), message: "is not custom!"
662
+ raise Grape::Exceptions::Validation, params: [@scope.full_name(attr_name)], message: "is not custom!"
663
663
  end
664
664
  end
665
665
  end
@@ -802,6 +802,37 @@ describe Grape::Validations do
802
802
  end
803
803
  end
804
804
  end
805
+
806
+ context 'when using options on param' do
807
+ module CustomValidations
808
+ class CustomvalidatorWithOptions < Grape::Validations::SingleOptionValidator
809
+ def validate_param!(attr_name, params)
810
+ unless params[attr_name] == @option[:text]
811
+ raise Grape::Exceptions::Validation, params: [@scope.full_name(attr_name)], message: @option[:error_message]
812
+ end
813
+ end
814
+ end
815
+ end
816
+
817
+ before do
818
+ subject.params do
819
+ optional :custom, customvalidator_with_options: { text: 'im custom with options', error_message: "is not custom with options!" }
820
+ end
821
+ subject.get '/optional_custom' do
822
+ 'optional with custom works!'
823
+ end
824
+ end
825
+
826
+ it 'validates param with custom validator with options' do
827
+ get '/optional_custom', custom: 'im custom with options'
828
+ expect(last_response.status).to eq(200)
829
+ expect(last_response.body).to eq('optional with custom works!')
830
+
831
+ get '/optional_custom', custom: 'im wrong'
832
+ expect(last_response.status).to eq(400)
833
+ expect(last_response.body).to eq('custom is not custom with options!')
834
+ end
835
+ end
805
836
  end # end custom validation
806
837
 
807
838
  context 'named' do
@@ -813,9 +844,9 @@ describe Grape::Validations do
813
844
  end
814
845
  end
815
846
 
816
- it 'in helper module which kind of Grape::API::Helpers' do
847
+ it 'in helper module which kind of Grape::DSL::Helpers::BaseHelper' do
817
848
  module SharedParams
818
- extend Grape::API::Helpers
849
+ extend Grape::DSL::Helpers::BaseHelper
819
850
  params :pagination do
820
851
  end
821
852
  end
@@ -826,7 +857,7 @@ describe Grape::Validations do
826
857
  context 'can be included in usual params' do
827
858
  before do
828
859
  module SharedParams
829
- extend Grape::API::Helpers
860
+ extend Grape::DSL::Helpers::BaseHelper
830
861
  params :period do
831
862
  optional :start_date
832
863
  optional :end_date
@@ -929,7 +960,7 @@ describe Grape::Validations do
929
960
 
930
961
  get '/mutually_exclusive', beer: 'string', wine: 'anotherstring'
931
962
  expect(last_response.status).to eq(400)
932
- expect(last_response.body).to eq("[:beer, :wine] are mutually exclusive")
963
+ expect(last_response.body).to eq "beer, wine are mutually exclusive"
933
964
  end
934
965
  end
935
966
 
@@ -949,15 +980,14 @@ describe Grape::Validations do
949
980
 
950
981
  get '/mutually_exclusive', beer: 'true', wine: 'true', scotch: 'true', aquavit: 'true'
951
982
  expect(last_response.status).to eq(400)
952
- expect(last_response.body).to match(/\[:beer, :wine\] are mutually exclusive/)
953
- expect(last_response.body).to match(/\[:scotch, :aquavit\] are mutually exclusive/)
983
+ expect(last_response.body).to eq "beer, wine are mutually exclusive, scotch, aquavit are mutually exclusive"
954
984
  end
955
985
  end
956
986
  end
957
987
 
958
988
  context 'exactly one of' do
959
989
  context 'params' do
960
- it 'errors when two or more are present' do
990
+ before :each do
961
991
  subject.params do
962
992
  optional :beer
963
993
  optional :wine
@@ -967,26 +997,58 @@ describe Grape::Validations do
967
997
  subject.get '/exactly_one_of' do
968
998
  'exactly_one_of works!'
969
999
  end
1000
+ end
970
1001
 
1002
+ it 'errors when none are present' do
1003
+ get '/exactly_one_of'
1004
+ expect(last_response.status).to eq(400)
1005
+ expect(last_response.body).to eq "beer, wine, juice are missing, exactly one parameter must be provided"
1006
+ end
1007
+
1008
+ it 'succeeds when one is present' do
1009
+ get '/exactly_one_of', beer: 'string'
1010
+ expect(last_response.status).to eq(200)
1011
+ expect(last_response.body).to eq 'exactly_one_of works!'
1012
+ end
1013
+
1014
+ it 'errors when two or more are present' do
971
1015
  get '/exactly_one_of', beer: 'string', wine: 'anotherstring'
972
1016
  expect(last_response.status).to eq(400)
973
- expect(last_response.body).to eq("[:beer, :wine] are mutually exclusive")
1017
+ expect(last_response.body).to eq "beer, wine are mutually exclusive"
974
1018
  end
1019
+ end
1020
+ end
975
1021
 
976
- it 'errors when none is selected' do
1022
+ context 'at least one of' do
1023
+ context 'params' do
1024
+ before :each do
977
1025
  subject.params do
978
1026
  optional :beer
979
1027
  optional :wine
980
1028
  optional :juice
981
- exactly_one_of :beer, :wine, :juice
1029
+ at_least_one_of :beer, :wine, :juice
982
1030
  end
983
- subject.get '/exactly_one_of' do
984
- 'exactly_one_of works!'
1031
+ subject.get '/at_least_one_of' do
1032
+ 'at_least_one_of works!'
985
1033
  end
1034
+ end
986
1035
 
987
- get '/exactly_one_of'
1036
+ it 'errors when none are present' do
1037
+ get '/at_least_one_of'
988
1038
  expect(last_response.status).to eq(400)
989
- expect(last_response.body).to eq("[:beer, :wine, :juice] - exactly one parameter must be provided")
1039
+ expect(last_response.body).to eq "beer, wine, juice are missing, at least one parameter must be provided"
1040
+ end
1041
+
1042
+ it 'does not error when one is present' do
1043
+ get '/at_least_one_of', beer: 'string'
1044
+ expect(last_response.status).to eq(200)
1045
+ expect(last_response.body).to eq 'at_least_one_of works!'
1046
+ end
1047
+
1048
+ it 'does not error when two are present' do
1049
+ get '/at_least_one_of', beer: 'string', wine: 'string'
1050
+ expect(last_response.status).to eq(200)
1051
+ expect(last_response.body).to eq 'at_least_one_of works!'
990
1052
  end
991
1053
  end
992
1054
  end
@@ -23,4 +23,5 @@ I18n.enforce_available_locales = false
23
23
 
24
24
  RSpec.configure do |config|
25
25
  config.include Rack::Test::Methods
26
+ config.raise_errors_for_deprecations!
26
27
  end
@@ -0,0 +1,23 @@
1
+ module Spec
2
+ module Support
3
+ class EndpointFaker
4
+ class FakerAPI < Grape::API
5
+ get '/' do
6
+ end
7
+ end
8
+
9
+ def initialize(app, endpoint = FakerAPI.endpoints.first)
10
+ @app = app
11
+ @endpoint = endpoint
12
+ end
13
+
14
+ def call(env)
15
+ @endpoint.instance_exec do
16
+ @request = Grape::Request.new(env.dup)
17
+ end
18
+
19
+ @app.call(env.merge('api.endpoint' => @endpoint))
20
+ end
21
+ end
22
+ end
23
+ end
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.8.0
4
+ version: 0.9.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: 2014-07-10 00:00:00.000000000 Z
11
+ date: 2014-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - '>='
144
144
  - !ruby/object:Gem::Version
145
- version: 0.2.0
145
+ version: 0.4.4
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - '>='
151
151
  - !ruby/object:Gem::Version
152
- version: 0.2.0
152
+ version: 0.4.4
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rake
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -212,14 +212,14 @@ dependencies:
212
212
  requirements:
213
213
  - - ~>
214
214
  - !ruby/object:Gem::Version
215
- version: '2.9'
215
+ version: '3.0'
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - ~>
221
221
  - !ruby/object:Gem::Version
222
- version: '2.9'
222
+ version: '3.0'
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: bundler
225
225
  requirement: !ruby/object:Gem::Requirement
@@ -234,6 +234,48 @@ dependencies:
234
234
  - - '>='
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: cookiejar
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - '>='
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - '>='
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
251
+ - !ruby/object:Gem::Dependency
252
+ name: rack-contrib
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - '>='
256
+ - !ruby/object:Gem::Version
257
+ version: '0'
258
+ type: :development
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - '>='
263
+ - !ruby/object:Gem::Version
264
+ version: '0'
265
+ - !ruby/object:Gem::Dependency
266
+ name: mime-types
267
+ requirement: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - '>='
270
+ - !ruby/object:Gem::Version
271
+ version: '0'
272
+ type: :development
273
+ prerelease: false
274
+ version_requirements: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - '>='
277
+ - !ruby/object:Gem::Version
278
+ version: '0'
237
279
  description: A Ruby framework for rapid API development with great conventions.
238
280
  email:
239
281
  - michael@intridea.com
@@ -244,6 +286,7 @@ files:
244
286
  - .gitignore
245
287
  - .rspec
246
288
  - .rubocop.yml
289
+ - .rubocop_todo.yml
247
290
  - .travis.yml
248
291
  - .yardopts
249
292
  - CHANGELOG.md
@@ -259,7 +302,17 @@ files:
259
302
  - grape.png
260
303
  - lib/grape.rb
261
304
  - lib/grape/api.rb
305
+ - lib/grape/api/helpers.rb
262
306
  - lib/grape/cookies.rb
307
+ - lib/grape/dsl/callbacks.rb
308
+ - lib/grape/dsl/configuration.rb
309
+ - lib/grape/dsl/helpers.rb
310
+ - lib/grape/dsl/inside_route.rb
311
+ - lib/grape/dsl/middleware.rb
312
+ - lib/grape/dsl/parameters.rb
313
+ - lib/grape/dsl/request_response.rb
314
+ - lib/grape/dsl/routing.rb
315
+ - lib/grape/dsl/validations.rb
263
316
  - lib/grape/endpoint.rb
264
317
  - lib/grape/error_formatter/base.rb
265
318
  - lib/grape/error_formatter/json.rb
@@ -285,9 +338,9 @@ files:
285
338
  - lib/grape/http/request.rb
286
339
  - lib/grape/locale/en.yml
287
340
  - lib/grape/middleware/auth/base.rb
288
- - lib/grape/middleware/auth/basic.rb
289
- - lib/grape/middleware/auth/digest.rb
290
- - lib/grape/middleware/auth/oauth2.rb
341
+ - lib/grape/middleware/auth/dsl.rb
342
+ - lib/grape/middleware/auth/strategies.rb
343
+ - lib/grape/middleware/auth/strategy_info.rb
291
344
  - lib/grape/middleware/base.rb
292
345
  - lib/grape/middleware/error.rb
293
346
  - lib/grape/middleware/filter.rb
@@ -308,6 +361,7 @@ files:
308
361
  - lib/grape/util/deep_merge.rb
309
362
  - lib/grape/util/hash_stack.rb
310
363
  - lib/grape/validations.rb
364
+ - lib/grape/validations/at_least_one_of.rb
311
365
  - lib/grape/validations/coerce.rb
312
366
  - lib/grape/validations/default.rb
313
367
  - lib/grape/validations/exactly_one_of.rb
@@ -316,7 +370,17 @@ files:
316
370
  - lib/grape/validations/regexp.rb
317
371
  - lib/grape/validations/values.rb
318
372
  - lib/grape/version.rb
373
+ - spec/grape/api/helpers_spec.rb
319
374
  - spec/grape/api_spec.rb
375
+ - spec/grape/dsl/callbacks_spec.rb
376
+ - spec/grape/dsl/configuration_spec.rb
377
+ - spec/grape/dsl/helpers_spec.rb
378
+ - spec/grape/dsl/inside_route_spec.rb
379
+ - spec/grape/dsl/middleware_spec.rb
380
+ - spec/grape/dsl/parameters_spec.rb
381
+ - spec/grape/dsl/request_response_spec.rb
382
+ - spec/grape/dsl/routing_spec.rb
383
+ - spec/grape/dsl/validations_spec.rb
320
384
  - spec/grape/endpoint_spec.rb
321
385
  - spec/grape/entity_spec.rb
322
386
  - spec/grape/exceptions/invalid_formatter_spec.rb
@@ -326,9 +390,9 @@ files:
326
390
  - spec/grape/exceptions/unknown_options_spec.rb
327
391
  - spec/grape/exceptions/unknown_validator_spec.rb
328
392
  - spec/grape/exceptions/validation_errors_spec.rb
329
- - spec/grape/middleware/auth/basic_spec.rb
330
- - spec/grape/middleware/auth/digest_spec.rb
331
- - spec/grape/middleware/auth/oauth2_spec.rb
393
+ - spec/grape/middleware/auth/base_spec.rb
394
+ - spec/grape/middleware/auth/dsl_spec.rb
395
+ - spec/grape/middleware/auth/strategies_spec.rb
332
396
  - spec/grape/middleware/base_spec.rb
333
397
  - spec/grape/middleware/error_spec.rb
334
398
  - spec/grape/middleware/exception_spec.rb
@@ -340,6 +404,7 @@ files:
340
404
  - spec/grape/middleware/versioner_spec.rb
341
405
  - spec/grape/path_spec.rb
342
406
  - spec/grape/util/hash_stack_spec.rb
407
+ - spec/grape/validations/at_least_one_of_spec.rb
343
408
  - spec/grape/validations/coerce_spec.rb
344
409
  - spec/grape/validations/default_spec.rb
345
410
  - spec/grape/validations/exactly_one_of_spec.rb
@@ -353,6 +418,7 @@ files:
353
418
  - spec/spec_helper.rb
354
419
  - spec/support/basic_auth_encode_helpers.rb
355
420
  - spec/support/content_type_helpers.rb
421
+ - spec/support/endpoint_faker.rb
356
422
  - spec/support/versioned_helpers.rb
357
423
  homepage: https://github.com/intridea/grape
358
424
  licenses:
@@ -379,7 +445,17 @@ signing_key:
379
445
  specification_version: 4
380
446
  summary: A simple Ruby framework for building REST-like APIs.
381
447
  test_files:
448
+ - spec/grape/api/helpers_spec.rb
382
449
  - spec/grape/api_spec.rb
450
+ - spec/grape/dsl/callbacks_spec.rb
451
+ - spec/grape/dsl/configuration_spec.rb
452
+ - spec/grape/dsl/helpers_spec.rb
453
+ - spec/grape/dsl/inside_route_spec.rb
454
+ - spec/grape/dsl/middleware_spec.rb
455
+ - spec/grape/dsl/parameters_spec.rb
456
+ - spec/grape/dsl/request_response_spec.rb
457
+ - spec/grape/dsl/routing_spec.rb
458
+ - spec/grape/dsl/validations_spec.rb
383
459
  - spec/grape/endpoint_spec.rb
384
460
  - spec/grape/entity_spec.rb
385
461
  - spec/grape/exceptions/invalid_formatter_spec.rb
@@ -389,9 +465,9 @@ test_files:
389
465
  - spec/grape/exceptions/unknown_options_spec.rb
390
466
  - spec/grape/exceptions/unknown_validator_spec.rb
391
467
  - spec/grape/exceptions/validation_errors_spec.rb
392
- - spec/grape/middleware/auth/basic_spec.rb
393
- - spec/grape/middleware/auth/digest_spec.rb
394
- - spec/grape/middleware/auth/oauth2_spec.rb
468
+ - spec/grape/middleware/auth/base_spec.rb
469
+ - spec/grape/middleware/auth/dsl_spec.rb
470
+ - spec/grape/middleware/auth/strategies_spec.rb
395
471
  - spec/grape/middleware/base_spec.rb
396
472
  - spec/grape/middleware/error_spec.rb
397
473
  - spec/grape/middleware/exception_spec.rb
@@ -403,6 +479,7 @@ test_files:
403
479
  - spec/grape/middleware/versioner_spec.rb
404
480
  - spec/grape/path_spec.rb
405
481
  - spec/grape/util/hash_stack_spec.rb
482
+ - spec/grape/validations/at_least_one_of_spec.rb
406
483
  - spec/grape/validations/coerce_spec.rb
407
484
  - spec/grape/validations/default_spec.rb
408
485
  - spec/grape/validations/exactly_one_of_spec.rb
@@ -416,5 +493,6 @@ test_files:
416
493
  - spec/spec_helper.rb
417
494
  - spec/support/basic_auth_encode_helpers.rb
418
495
  - spec/support/content_type_helpers.rb
496
+ - spec/support/endpoint_faker.rb
419
497
  - spec/support/versioned_helpers.rb
420
498
  has_rdoc:
@@ -1,13 +0,0 @@
1
- require 'rack/auth/basic'
2
-
3
- module Grape
4
- module Middleware
5
- module Auth
6
- class Basic < Grape::Middleware::Auth::Base
7
- def base_request
8
- Rack::Auth::Basic::Request.new(env)
9
- end
10
- end
11
- end
12
- end
13
- end
@@ -1,13 +0,0 @@
1
- require 'rack/auth/digest/md5'
2
-
3
- module Grape
4
- module Middleware
5
- module Auth
6
- class Digest < Grape::Middleware::Auth::Base
7
- def base_request
8
- Rack::Auth::Digest::Request.new(env)
9
- end
10
- end
11
- end
12
- end
13
- end