diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-11 12:38:14 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-11 12:38:14 +0300 |
commit | 9e52a2dcaba58f6bf4ce7c9858951e1936d73740 (patch) | |
tree | 4450e157a83dd6ed17ef36d4dd88afc16d4cac30 /app/models/project_services | |
parent | cebb74a0c0575f00f8904b204559979486fc714f (diff) |
Don't use URI.regexp to validate since it doens't have start/end anchors.
Diffstat (limited to 'app/models/project_services')
-rw-r--r-- | app/models/project_services/bamboo_service.rb | 2 | ||||
-rw-r--r-- | app/models/project_services/external_wiki_service.rb | 2 | ||||
-rw-r--r-- | app/models/project_services/teamcity_service.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/models/project_services/bamboo_service.rb b/app/models/project_services/bamboo_service.rb index f968afe9fa8..d8aedbd2ab4 100644 --- a/app/models/project_services/bamboo_service.rb +++ b/app/models/project_services/bamboo_service.rb @@ -25,7 +25,7 @@ class BambooService < CiService validates :bamboo_url, presence: true, - format: { with: URI::regexp }, + format: { with: /\A#{URI.regexp}\z/ }, if: :activated? validates :build_key, presence: true, if: :activated? validates :username, diff --git a/app/models/project_services/external_wiki_service.rb b/app/models/project_services/external_wiki_service.rb index e521186798c..a199d0e86f2 100644 --- a/app/models/project_services/external_wiki_service.rb +++ b/app/models/project_services/external_wiki_service.rb @@ -18,7 +18,7 @@ class ExternalWikiService < Service prop_accessor :external_wiki_url validates :external_wiki_url, presence: true, - format: { with: URI::regexp }, + format: { with: /\A#{URI.regexp}\z/ }, if: :activated? def title diff --git a/app/models/project_services/teamcity_service.rb b/app/models/project_services/teamcity_service.rb index c26bc551352..3c002a1634b 100644 --- a/app/models/project_services/teamcity_service.rb +++ b/app/models/project_services/teamcity_service.rb @@ -25,7 +25,7 @@ class TeamcityService < CiService validates :teamcity_url, presence: true, - format: { with: URI::regexp }, if: :activated? + format: { with: /\A#{URI.regexp}\z/ }, if: :activated? validates :build_type, presence: true, if: :activated? validates :username, presence: true, |