diff options
author | Robert Speicher <robert@gitlab.com> | 2016-05-30 20:27:48 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-05-30 20:27:48 +0300 |
commit | 8cb7759b92685f8dc40c7829eb1114f55eee5271 (patch) | |
tree | 9a3608441e41404944f3d099765cdcde46f8ced7 | |
parent | c61cf41defd4c1e44d519bedc2f9648d6554f5d2 (diff) | |
parent | 1707e89c2969a5bf85836fb9f55079f5c29f3b0f (diff) |
Merge branch 'style/enable-rubocop-end-of-line-cop' into 'master'
Enable Style/EndOfLine Rubocop style cop
Use Unix-style line endings.
Removed carriage return character from end of each line in `app/controllers/projects/find_file_controller.rb`
See #17478
See merge request !4347
-rw-r--r-- | .rubocop.yml | 2 | ||||
-rw-r--r-- | app/controllers/projects/find_file_controller.rb | 52 |
2 files changed, 27 insertions, 27 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index 966793f792c..9074dcff1f4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -222,7 +222,7 @@ Style/EndBlock: # Use Unix-style line endings. Style/EndOfLine: - Enabled: false + Enabled: true # Favor the use of Fixnum#even? && Fixnum#odd? Style/EvenOdd: diff --git a/app/controllers/projects/find_file_controller.rb b/app/controllers/projects/find_file_controller.rb index 54a0c447aee..cf53ad0a670 100644 --- a/app/controllers/projects/find_file_controller.rb +++ b/app/controllers/projects/find_file_controller.rb @@ -1,26 +1,26 @@ -# Controller for viewing a repository's file structure
-class Projects::FindFileController < Projects::ApplicationController
- include ExtractsPath
- include ActionView::Helpers::SanitizeHelper
- include TreeHelper
-
- before_action :require_non_empty_project
- before_action :assign_ref_vars
- before_action :authorize_download_code!
-
- def show
- return render_404 unless @repository.commit(@ref)
-
- respond_to do |format|
- format.html
- end
- end
-
- def list
- file_paths = @repo.ls_files(@ref)
-
- respond_to do |format|
- format.json { render json: file_paths }
- end
- end
-end
+# Controller for viewing a repository's file structure +class Projects::FindFileController < Projects::ApplicationController + include ExtractsPath + include ActionView::Helpers::SanitizeHelper + include TreeHelper + + before_action :require_non_empty_project + before_action :assign_ref_vars + before_action :authorize_download_code! + + def show + return render_404 unless @repository.commit(@ref) + + respond_to do |format| + format.html + end + end + + def list + file_paths = @repo.ls_files(@ref) + + respond_to do |format| + format.json { render json: file_paths } + end + end +end |