diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-04-04 12:49:52 +0300 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-04-06 17:46:59 +0300 |
commit | 3d3df09713dcb70baceaeba7603fa49b89fc8007 (patch) | |
tree | 40cc40c3999f928408528f4d5d0985b4eecd66c6 /lib/gitlab/ci | |
parent | 914bef671f54c04a0d36d8e0f8c9830d6dea7b03 (diff) |
Dry up next_time_from. Move cron_parser_spec to appropriate location.
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r-- | lib/gitlab/ci/cron_parser.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/gitlab/ci/cron_parser.rb b/lib/gitlab/ci/cron_parser.rb index 01f37142510..2d9ea26faf0 100644 --- a/lib/gitlab/ci/cron_parser.rb +++ b/lib/gitlab/ci/cron_parser.rb @@ -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 |