Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
1707e89c
Commit
1707e89c
authored
May 30, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Style/EndOfLine Rubocop style cop
Use Unix-style line endings. See #17478.
parent
43c35b0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
27 deletions
+27
-27
.rubocop.yml
.rubocop.yml
+1
-1
app/controllers/projects/find_file_controller.rb
app/controllers/projects/find_file_controller.rb
+26
-26
No files found.
.rubocop.yml
View file @
1707e89c
...
@@ -222,7 +222,7 @@ Style/EndBlock:
...
@@ -222,7 +222,7 @@ Style/EndBlock:
# Use Unix-style line endings.
# Use Unix-style line endings.
Style/EndOfLine
:
Style/EndOfLine
:
Enabled
:
fals
e
Enabled
:
tru
e
# Favor the use of Fixnum#even? && Fixnum#odd?
# Favor the use of Fixnum#even? && Fixnum#odd?
Style/EvenOdd
:
Style/EvenOdd
:
...
...
app/controllers/projects/find_file_controller.rb
View file @
1707e89c
# Controller for viewing a repository's file structure
# Controller for viewing a repository's file structure
class
Projects::FindFileController
<
Projects
::
ApplicationController
class
Projects::FindFileController
<
Projects
::
ApplicationController
include
ExtractsPath
include
ExtractsPath
include
ActionView
::
Helpers
::
SanitizeHelper
include
ActionView
::
Helpers
::
SanitizeHelper
include
TreeHelper
include
TreeHelper
before_action
:require_non_empty_project
before_action
:require_non_empty_project
before_action
:assign_ref_vars
before_action
:assign_ref_vars
before_action
:authorize_download_code!
before_action
:authorize_download_code!
def
show
def
show
return
render_404
unless
@repository
.
commit
(
@ref
)
return
render_404
unless
@repository
.
commit
(
@ref
)
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
end
end
end
end
def
list
def
list
file_paths
=
@repo
.
ls_files
(
@ref
)
file_paths
=
@repo
.
ls_files
(
@ref
)
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
json
{
render
json:
file_paths
}
format
.
json
{
render
json:
file_paths
}
end
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment