File tree Expand file tree Collapse file tree 3 files changed +11
-21
lines changed
Expand file tree Collapse file tree 3 files changed +11
-21
lines changed Original file line number Diff line number Diff line change 33 - vendor/**/*
44 - bin/**/*
55
6+ Style/DoubleNegation :
7+ Enabled : false
8+
69inherit_from : .rubocop_todo.yml
Original file line number Diff line number Diff line change 66# Note that changes in the inspected code, or installation of new
77# versions of RuboCop, may require this file to be generated again.
88
9- # Offense count: 1
10- Lint/IneffectiveAccessModifier :
11- Exclude :
12- - ' lib/grape/router.rb'
13-
149# Offense count: 39
1510Metrics/AbcSize :
1611 Max : 44
@@ -66,14 +61,6 @@ Style/BlockDelimiters:
6661Style/Documentation :
6762 Enabled : false
6863
69- # Offense count: 6
70- Style/DoubleNegation :
71- Exclude :
72- - ' lib/grape/api.rb'
73- - ' lib/grape/middleware/versioner/accept_version_header.rb'
74- - ' lib/grape/middleware/versioner/header.rb'
75- - ' lib/grape/path.rb'
76-
7764# Offense count: 14
7865# Configuration parameters: EnforcedStyle, SupportedStyles.
7966# SupportedStyles: compact, exploded
Original file line number Diff line number Diff line change @@ -11,6 +11,14 @@ def initialize(pattern, attributes = {})
1111 end
1212 end
1313
14+ def self . normalize_path ( path )
15+ path = "/#{ path } "
16+ path . squeeze! ( '/' )
17+ path . sub! ( %r{/+\Z } , '' )
18+ path = '/' if path == ''
19+ path
20+ end
21+
1422 def initialize
1523 @neutral_map = [ ]
1624 @map = Hash . new { |hash , key | hash [ key ] = [ ] }
@@ -149,13 +157,5 @@ def routes_for(method)
149157 def string_for ( input )
150158 self . class . normalize_path ( input )
151159 end
152-
153- def self . normalize_path ( path )
154- path = "/#{ path } "
155- path . squeeze! ( '/' )
156- path . sub! ( %r{/+\Z } , '' )
157- path = '/' if path == ''
158- path
159- end
160160 end
161161end
You can’t perform that action at this time.
0 commit comments