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:
authorSanad Liaquat <sliaquat@gitlab.com>2019-03-15 09:52:39 +0300
committerSanad Liaquat <sliaquat@gitlab.com>2019-03-15 09:52:39 +0300
commite73f8713812b912b3b0244e99b6a18b9422a2d4d (patch)
treede67e0ab7931961752caeccef78f393365391f81 /app/validators/sha_validator.rb
parent82c0816d3fdd96412605845fa337b74b6a3534c4 (diff)
Add Load testing script for artillery.ioqa-artillery-io-script
Also add rake tasks that makes use of existing performance data genertion task.
Diffstat (limited to 'app/validators/sha_validator.rb')
-rw-r--r--app/validators/sha_validator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/validators/sha_validator.rb b/app/validators/sha_validator.rb
index 77e7cfa4f6b..085fca4d65d 100644
--- a/app/validators/sha_validator.rb
+++ b/app/validators/sha_validator.rb
@@ -2,7 +2,7 @@
class ShaValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
- return if value.blank? || Commit.valid_hash?(value)
+ return if value.blank? || value.match(/\A\h{40}\z/)
record.errors.add(attribute, 'is not a valid SHA')
end