diff options
author | Sanad Liaquat <sliaquat@gitlab.com> | 2019-03-15 09:52:39 +0300 |
---|---|---|
committer | Sanad Liaquat <sliaquat@gitlab.com> | 2019-03-15 09:52:39 +0300 |
commit | e73f8713812b912b3b0244e99b6a18b9422a2d4d (patch) | |
tree | de67e0ab7931961752caeccef78f393365391f81 /app/validators/sha_validator.rb | |
parent | 82c0816d3fdd96412605845fa337b74b6a3534c4 (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.rb | 2 |
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 |