File tree Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ def self.deprecator
7575
7676 configure do |config |
7777 config . param_builder = :hash_with_indifferent_access
78- config . lint_api = false
78+ config . lint = false
7979 config . compile_methods!
8080 end
8181end
Original file line number Diff line number Diff line change @@ -81,8 +81,8 @@ def do_not_route_options!
8181 namespace_inheritable ( :do_not_route_options , true )
8282 end
8383
84- def lint_api !
85- namespace_inheritable ( :lint_api , true )
84+ def lint !
85+ namespace_inheritable ( :lint , true )
8686 end
8787
8888 def do_not_document!
Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ def build_stack(helpers)
358358 format = namespace_inheritable ( :format )
359359
360360 stack . use Rack ::Head
361- stack . use Rack ::Lint if lint_api ?
361+ stack . use Rack ::Lint if lint ?
362362 stack . use Class . new ( Grape ::Middleware ::Error ) ,
363363 helpers : helpers ,
364364 format : format ,
@@ -410,8 +410,8 @@ def build_response_cookies
410410 end
411411 end
412412
413- def lint_api ?
414- namespace_inheritable ( :lint_api ) || Grape . config . lint_api
413+ def lint ?
414+ namespace_inheritable ( :lint ) || Grape . config . lint
415415 end
416416 end
417417end
Original file line number Diff line number Diff line change @@ -4739,20 +4739,20 @@ def uniqe_id_route
47394739 end
47404740 end
47414741
4742- describe '.lint_api !' do
4742+ describe '.lint !' do
47434743 let ( :app ) do
47444744 Class . new ( described_class ) do
4745- lint_api !
4745+ lint !
47464746 get '/' do
47474747 status 42
47484748 end
47494749 end
47504750 end
47514751
47524752 around do |example |
4753- Grape . config . lint_api = false
4753+ Grape . config . lint = false
47544754 example . run
4755- Grape . config . lint_api = true
4755+ Grape . config . lint = true
47564756 end
47574757
47584758 it 'raises a Rack::Lint error' do
Original file line number Diff line number Diff line change 1313 end
1414end
1515
16- Grape . config . lint_api = true # lint all apis by default
16+ Grape . config . lint = true # lint all apis by default
1717Grape ::Util ::Registry . include ( Deregister )
1818# issue with ruby 2.7 with ^. We need to extend it again
1919Grape ::Validations . extend ( Grape ::Util ::Registry ) if Gem ::Version . new ( RUBY_VERSION ) . release < Gem ::Version . new ( '3.0' )
You can’t perform that action at this time.
0 commit comments