Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-02-07 21:59:18 +0300
committerShinya Maeda <shinya@gitlab.com>2018-02-07 22:19:19 +0300
commit14919276e93f7f92ea284274994abe4ed7ce4f8b (patch)
tree49e8d21cbcd59c3e6d09ef50ee495980ca50ebc3
parent93243d174b37d5ea190975396eabce42e73d193f (diff)
Sanitize regex
-rw-r--r--lib/gitlab/ci/trace/file_iterator.rb2
-rw-r--r--lib/gitlab/ci/trace/migrator.rb2
-rw-r--r--spec/support/trace/trace_helpers.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/ci/trace/file_iterator.rb b/lib/gitlab/ci/trace/file_iterator.rb
index c01cd2c724f..d8d74178f9d 100644
--- a/lib/gitlab/ci/trace/file_iterator.rb
+++ b/lib/gitlab/ci/trace/file_iterator.rb
@@ -45,7 +45,7 @@ module Gitlab
end
def sanitized_path(path)
- path.sub(/^\./, '').sub(%/^\//, '')
+ path.sub(/^\./, '').sub(%{^/}, '')
end
end
end
diff --git a/lib/gitlab/ci/trace/migrator.rb b/lib/gitlab/ci/trace/migrator.rb
index 9af6f0081fb..5a4568ad57b 100644
--- a/lib/gitlab/ci/trace/migrator.rb
+++ b/lib/gitlab/ci/trace/migrator.rb
@@ -24,7 +24,7 @@ module Gitlab
private
def trace_path?
- %r{#{Settings.gitlab_ci.builds_path}\/\d{4}_\d{2}\/\d{1,}\/\d{1,}.log} =~ path
+ %r{#{Settings.gitlab_ci.builds_path}/\d{4}_\d{2}/\d{1,}/\d{1,}.log} =~ path
end
def status
diff --git a/spec/support/trace/trace_helpers.rb b/spec/support/trace/trace_helpers.rb
index 46ea5847c05..f9cb90bb3ed 100644
--- a/spec/support/trace/trace_helpers.rb
+++ b/spec/support/trace/trace_helpers.rb
@@ -13,7 +13,7 @@ module TraceHelpers
end
def artifacts_path?(path)
- %r{.{2}\/.{2}\/.{64}\/\d{4}_\d{2}_\d{2}\/\d{1,}\/\d{1,}\/\d{1,}.log} =~ path
+ %r{.{2}/.{2}/.{64}/\d{4}_\d{2}_\d{2}/\d{1,}/\d{1,}/\d{1,}.log} =~ path
end
def simulate_backup_path(path, status)