Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
d48658e3
Commit
d48658e3
authored
Mar 30, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use constraint for #validation
parent
13bac4c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lib/ci/cron_parser.rb
lib/ci/cron_parser.rb
+4
-2
No files found.
lib/ci/cron_parser.rb
View file @
d48658e3
...
...
@@ -12,8 +12,10 @@ module Ci
end
def
validation
is_valid_cron
=
try_parse_cron
(
@cron
,
'Europe/Istanbul'
).
present?
is_valid_cron_time_zone
=
try_parse_cron
(
'* * * * *'
,
@cron_time_zone
).
present?
VALID_SYNTAX_TIME_ZONE
=
'Europe/Istanbul'
VALID_SYNTAX_CRON
=
'* * * * *'
is_valid_cron
=
try_parse_cron
(
@cron
,
VALID_SYNTAX_TIME_ZONE
).
present?
is_valid_cron_time_zone
=
try_parse_cron
(
VALID_SYNTAX_CRON
,
@cron_time_zone
).
present?
return
is_valid_cron
,
is_valid_cron_time_zone
end
...
...
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