Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-04-01 11:57:52 +0300
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-04-06 17:46:58 +0300
commit934e949726adf4428a03970d78e23555cc1d7a72 (patch)
treeda26a02cf4f27563633c31ebe07a6e9e33f693ef /lib
parent62480461c943b4ca4c72830c04932cd5bba9f4e7 (diff)
Fix rubocop issues. Use add_concurrent_foreign_key.
Diffstat (limited to 'lib')
-rw-r--r--lib/ci/cron_parser.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ci/cron_parser.rb b/lib/ci/cron_parser.rb
index eb348306436..e0d589956a8 100644
--- a/lib/ci/cron_parser.rb
+++ b/lib/ci/cron_parser.rb
@@ -1,7 +1,7 @@
module Ci
class CronParser
- VALID_SYNTAX_SAMPLE_TIME_ZONE = 'UTC'
- VALID_SYNTAX_SAMPLE_CRON = '* * * * *'
+ VALID_SYNTAX_SAMPLE_TIME_ZONE = 'UTC'.freeze
+ VALID_SYNTAX_SAMPLE_CRON = '* * * * *'.freeze
def initialize(cron, cron_time_zone = 'UTC')
@cron = cron
@@ -9,9 +9,9 @@ module Ci
end
def next_time_from(time)
- cronLine = try_parse_cron(@cron, @cron_time_zone)
- if cronLine.present?
- cronLine.next_time(time).in_time_zone(Time.zone)
+ 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