summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/snippets_actions.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
committerToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
commit62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch)
treec3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /app/controllers/concerns/snippets_actions.rb
parentf6453eca992a9c142268e78ac782cef98110d183 (diff)
downloadgitlab-ce-tc-standard-gem.tar.gz
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I decided to try https://github.com/testdouble/standard on our codebase. It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'app/controllers/concerns/snippets_actions.rb')
-rw-r--r--app/controllers/concerns/snippets_actions.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/concerns/snippets_actions.rb b/app/controllers/concerns/snippets_actions.rb
index 014232a7d05..bf2683034a8 100644
--- a/app/controllers/concerns/snippets_actions.rb
+++ b/app/controllers/concerns/snippets_actions.rb
@@ -8,13 +8,13 @@ module SnippetsActions
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def raw
- disposition = params[:inline] == 'false' ? 'attachment' : 'inline'
+ disposition = params[:inline] == "false" ? "attachment" : "inline"
workhorse_set_content_type!
send_data(
convert_line_endings(@snippet.content),
- type: 'text/plain; charset=utf-8',
+ type: "text/plain; charset=utf-8",
disposition: disposition,
filename: @snippet.sanitized_file_name
)
@@ -28,6 +28,6 @@ module SnippetsActions
private
def convert_line_endings(content)
- params[:line_ending] == 'raw' ? content : content.gsub(/\r\n/, "\n")
+ params[:line_ending] == "raw" ? content : content.gsub(/\r\n/, "\n")
end
end