File tree Expand file tree Collapse file tree 3 files changed +7
-21
lines changed
Expand file tree Collapse file tree 3 files changed +7
-21
lines changed Original file line number Diff line number Diff line change @@ -127,12 +127,6 @@ Naming/VariableNumber:
127127 - ' spec/grape/exceptions/validation_errors_spec.rb'
128128 - ' spec/grape/validations_spec.rb'
129129
130- # Offense count: 1
131- # This cop supports safe autocorrection (--autocorrect).
132- Performance/BindCall :
133- Exclude :
134- - ' lib/grape/endpoint.rb'
135-
136130# Offense count: 4
137131RSpec/AnyInstance :
138132 Exclude :
@@ -606,14 +600,6 @@ RSpec/VoidExpect:
606600 - ' spec/grape/api_spec.rb'
607601 - ' spec/grape/dsl/headers_spec.rb'
608602
609- # Offense count: 6
610- # This cop supports safe autocorrection (--autocorrect).
611- # Configuration parameters: AllowOnlyRestArgument.
612- Style/ArgumentsForwarding :
613- Exclude :
614- - ' lib/grape/api.rb'
615- - ' lib/grape/endpoint.rb'
616-
617603# Offense count: 1
618604Style/CombinableLoops :
619605 Exclude :
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ class << self
2626 attr_accessor :base_instance , :instances
2727
2828 # Rather than initializing an object of type Grape::API, create an object of type Instance
29- def new ( * args , & block )
30- base_instance . new ( * args , & block )
29+ def new ( ... )
30+ base_instance . new ( ... )
3131 end
3232
3333 # When inherited, will create a list of all instances (times the API was mounted)
@@ -77,8 +77,8 @@ def configure
7777 # the headers, and the body. See [the rack specification]
7878 # (http://www.rubydoc.info/github/rack/rack/master/file/SPEC) for more.
7979 # NOTE: This will only be called on an API directly mounted on RACK
80- def call ( * args , & block )
81- instance_for_rack . call ( * args , & block )
80+ def call ( ... )
81+ instance_for_rack . call ( ... )
8282 end
8383
8484 # Alleviates problems with autoloading by tring to search for the constant
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ class Endpoint
1313 attr_reader :env , :request , :headers , :params
1414
1515 class << self
16- def new ( * args , & block )
17- self == Endpoint ? Class . new ( Endpoint ) . new ( * args , & block ) : super
16+ def new ( ... )
17+ self == Endpoint ? Class . new ( Endpoint ) . new ( ... ) : super
1818 end
1919
2020 def before_each ( new_setup = false , &block )
@@ -55,7 +55,7 @@ def generate_api_method(method_name, &block)
5555
5656 proc do |endpoint_instance |
5757 ActiveSupport ::Notifications . instrument ( 'endpoint_render.grape' , endpoint : endpoint_instance ) do
58- method . bind ( endpoint_instance ) . call
58+ method . bind_call ( endpoint_instance )
5959 end
6060 end
6161 end
You can’t perform that action at this time.
0 commit comments