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
3d3df097
Commit
3d3df097
authored
Apr 04, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dry up next_time_from. Move cron_parser_spec to appropriate location.
parent
914bef67
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
cron_parser.rb
lib/gitlab/ci/cron_parser.rb
+1
-5
cron_parser_spec.rb
spec/lib/gitlab/ci/cron_parser_spec.rb
+1
-3
No files found.
lib/gitlab/ci/cron_parser.rb
View file @
3d3df097
...
...
@@ -11,11 +11,7 @@ module Gitlab
def
next_time_from
(
time
)
cron_line
=
try_parse_cron
(
@cron
,
@cron_time_zone
)
if
cron_line
.
present?
cron_line
.
next_time
(
time
).
in_time_zone
(
Time
.
zone
)
else
nil
end
cron_line
.
next_time
(
time
).
in_time_zone
(
Time
.
zone
)
if
cron_line
.
present?
end
def
validation
...
...
spec/lib/ci/cron_parser_spec.rb
→
spec/lib/
gitlab/
ci/cron_parser_spec.rb
View file @
3d3df097
require
'spec_helper'
module
Ci
describe
CronParser
,
lib:
true
do
describe
Gitlab
::
Ci
::
CronParser
do
shared_examples_for
"returns time in the future"
do
it
{
is_expected
.
to
be
>
Time
.
now
}
end
...
...
@@ -102,5 +101,4 @@ module Ci
expect
(
is_valid_cron_time_zone
).
to
eq
(
false
)
end
end
end
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