BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
9e52a2dc
Commit
9e52a2dc
authored
Apr 11, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use URI.regexp to validate since it doens't have start/end anchors.
parent
cebb74a0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
application_setting.rb
app/models/application_setting.rb
+1
-1
web_hook.rb
app/models/hooks/web_hook.rb
+1
-1
bamboo_service.rb
app/models/project_services/bamboo_service.rb
+1
-1
external_wiki_service.rb
app/models/project_services/external_wiki_service.rb
+1
-1
teamcity_service.rb
app/models/project_services/teamcity_service.rb
+1
-1
No files found.
app/models/application_setting.rb
View file @
9e52a2dc
...
...
@@ -24,7 +24,7 @@ class ApplicationSetting < ActiveRecord::Base
validates
:home_page_url
,
allow_blank:
true
,
format:
{
with:
URI
::
regexp
(
%w(http https)
)
,
message:
"should be a valid url"
},
format:
{
with:
/\A
#{
URI
.
regexp
(
%w(http https)
)
}
\z/
,
message:
"should be a valid url"
},
if: :home_page_url_column_exist
validates_each
:restricted_visibility_levels
do
|
record
,
attr
,
value
|
...
...
app/models/hooks/web_hook.rb
View file @
9e52a2dc
...
...
@@ -28,7 +28,7 @@ class WebHook < ActiveRecord::Base
default_timeout
Gitlab
.
config
.
gitlab
.
webhook_timeout
validates
:url
,
presence:
true
,
format:
{
with:
URI
::
regexp
(
%w(http https)
)
,
message:
"should be a valid url"
}
format:
{
with:
/\A
#{
URI
.
regexp
(
%w(http https)
)
}
\z/
,
message:
"should be a valid url"
}
def
execute
(
data
)
parsed_url
=
URI
.
parse
(
url
)
...
...
app/models/project_services/bamboo_service.rb
View file @
9e52a2dc
...
...
@@ -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
,
...
...
app/models/project_services/external_wiki_service.rb
View file @
9e52a2dc
...
...
@@ -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
...
...
app/models/project_services/teamcity_service.rb
View file @
9e52a2dc
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment