summaryrefslogtreecommitdiff
path: root/lib/extracts_path.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/extracts_path.rb')
-rw-r--r--lib/extracts_path.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb
index 6025bb2a9f6..a81c80cfc6f 100644
--- a/lib/extracts_path.rb
+++ b/lib/extracts_path.rb
@@ -106,6 +106,11 @@ module ExtractsPath
@hex_path = Digest::SHA1.hexdigest(@path)
@logs_path = logs_file_project_ref_path(@project, @ref, @path)
+ # assign allowed options
+ allowed_options = ["filter_ref", "q"]
+ @options = params.select {|key, value| allowed_options.include?(key) && !value.blank? }
+ @options = HashWithIndifferentAccess.new(@options)
+
raise InvalidPathError unless @tree.exists?
rescue RuntimeError, NoMethodError, InvalidPathError
not_found!