|
1 |
| -require 'date' |
2 |
| -require 'ice_cube/deprecated' |
| 1 | +require "date" |
| 2 | +require "ice_cube/deprecated" |
3 | 3 |
|
4 | 4 | module IceCube
|
| 5 | + autoload :VERSION, "ice_cube/version" |
5 | 6 |
|
6 |
| - autoload :VERSION, 'ice_cube/version' |
| 7 | + autoload :TimeUtil, "ice_cube/time_util" |
| 8 | + autoload :FlexibleHash, "ice_cube/flexible_hash" |
| 9 | + autoload :I18n, "ice_cube/i18n" |
7 | 10 |
|
8 |
| - autoload :TimeUtil, 'ice_cube/time_util' |
9 |
| - autoload :FlexibleHash, 'ice_cube/flexible_hash' |
10 |
| - autoload :I18n, 'ice_cube/i18n' |
| 11 | + autoload :Rule, "ice_cube/rule" |
| 12 | + autoload :Schedule, "ice_cube/schedule" |
| 13 | + autoload :Occurrence, "ice_cube/occurrence" |
11 | 14 |
|
12 |
| - autoload :Rule, 'ice_cube/rule' |
13 |
| - autoload :Schedule, 'ice_cube/schedule' |
14 |
| - autoload :Occurrence, 'ice_cube/occurrence' |
| 15 | + autoload :IcalBuilder, "ice_cube/builders/ical_builder" |
| 16 | + autoload :HashBuilder, "ice_cube/builders/hash_builder" |
| 17 | + autoload :StringBuilder, "ice_cube/builders/string_builder" |
15 | 18 |
|
16 |
| - autoload :IcalBuilder, 'ice_cube/builders/ical_builder' |
17 |
| - autoload :HashBuilder, 'ice_cube/builders/hash_builder' |
18 |
| - autoload :StringBuilder, 'ice_cube/builders/string_builder' |
| 19 | + autoload :HashParser, "ice_cube/parsers/hash_parser" |
| 20 | + autoload :YamlParser, "ice_cube/parsers/yaml_parser" |
| 21 | + autoload :IcalParser, "ice_cube/parsers/ical_parser" |
19 | 22 |
|
20 |
| - autoload :HashParser, 'ice_cube/parsers/hash_parser' |
21 |
| - autoload :YamlParser, 'ice_cube/parsers/yaml_parser' |
22 |
| - autoload :IcalParser, 'ice_cube/parsers/ical_parser' |
| 23 | + autoload :CountExceeded, "ice_cube/errors/count_exceeded" |
| 24 | + autoload :UntilExceeded, "ice_cube/errors/until_exceeded" |
23 | 25 |
|
24 |
| - autoload :CountExceeded, 'ice_cube/errors/count_exceeded' |
25 |
| - autoload :UntilExceeded, 'ice_cube/errors/until_exceeded' |
| 26 | + autoload :ValidatedRule, "ice_cube/validated_rule" |
| 27 | + autoload :SingleOccurrenceRule, "ice_cube/single_occurrence_rule" |
26 | 28 |
|
27 |
| - autoload :ValidatedRule, 'ice_cube/validated_rule' |
28 |
| - autoload :SingleOccurrenceRule, 'ice_cube/single_occurrence_rule' |
29 |
| - |
30 |
| - autoload :SecondlyRule, 'ice_cube/rules/secondly_rule' |
31 |
| - autoload :MinutelyRule, 'ice_cube/rules/minutely_rule' |
32 |
| - autoload :HourlyRule, 'ice_cube/rules/hourly_rule' |
33 |
| - autoload :DailyRule, 'ice_cube/rules/daily_rule' |
34 |
| - autoload :WeeklyRule, 'ice_cube/rules/weekly_rule' |
35 |
| - autoload :MonthlyRule, 'ice_cube/rules/monthly_rule' |
36 |
| - autoload :YearlyRule, 'ice_cube/rules/yearly_rule' |
| 29 | + autoload :SecondlyRule, "ice_cube/rules/secondly_rule" |
| 30 | + autoload :MinutelyRule, "ice_cube/rules/minutely_rule" |
| 31 | + autoload :HourlyRule, "ice_cube/rules/hourly_rule" |
| 32 | + autoload :DailyRule, "ice_cube/rules/daily_rule" |
| 33 | + autoload :WeeklyRule, "ice_cube/rules/weekly_rule" |
| 34 | + autoload :MonthlyRule, "ice_cube/rules/monthly_rule" |
| 35 | + autoload :YearlyRule, "ice_cube/rules/yearly_rule" |
37 | 36 |
|
38 | 37 | module Validations
|
39 |
| - autoload :FixedValue, 'ice_cube/validations/fixed_value' |
40 |
| - autoload :ScheduleLock, 'ice_cube/validations/schedule_lock' |
41 |
| - |
42 |
| - autoload :Count, 'ice_cube/validations/count' |
43 |
| - autoload :Until, 'ice_cube/validations/until' |
44 |
| - |
45 |
| - autoload :SecondlyInterval, 'ice_cube/validations/secondly_interval' |
46 |
| - autoload :MinutelyInterval, 'ice_cube/validations/minutely_interval' |
47 |
| - autoload :DailyInterval, 'ice_cube/validations/daily_interval' |
48 |
| - autoload :WeeklyInterval, 'ice_cube/validations/weekly_interval' |
49 |
| - autoload :MonthlyInterval, 'ice_cube/validations/monthly_interval' |
50 |
| - autoload :YearlyInterval, 'ice_cube/validations/yearly_interval' |
51 |
| - autoload :HourlyInterval, 'ice_cube/validations/hourly_interval' |
52 |
| - |
53 |
| - autoload :HourOfDay, 'ice_cube/validations/hour_of_day' |
54 |
| - autoload :MonthOfYear, 'ice_cube/validations/month_of_year' |
55 |
| - autoload :MinuteOfHour, 'ice_cube/validations/minute_of_hour' |
56 |
| - autoload :SecondOfMinute, 'ice_cube/validations/second_of_minute' |
57 |
| - autoload :DayOfMonth, 'ice_cube/validations/day_of_month' |
58 |
| - autoload :DayOfWeek, 'ice_cube/validations/day_of_week' |
59 |
| - autoload :Day, 'ice_cube/validations/day' |
60 |
| - autoload :DayOfYear, 'ice_cube/validations/day_of_year' |
| 38 | + autoload :FixedValue, "ice_cube/validations/fixed_value" |
| 39 | + autoload :ScheduleLock, "ice_cube/validations/schedule_lock" |
| 40 | + |
| 41 | + autoload :Count, "ice_cube/validations/count" |
| 42 | + autoload :Until, "ice_cube/validations/until" |
| 43 | + |
| 44 | + autoload :SecondlyInterval, "ice_cube/validations/secondly_interval" |
| 45 | + autoload :MinutelyInterval, "ice_cube/validations/minutely_interval" |
| 46 | + autoload :DailyInterval, "ice_cube/validations/daily_interval" |
| 47 | + autoload :WeeklyInterval, "ice_cube/validations/weekly_interval" |
| 48 | + autoload :MonthlyInterval, "ice_cube/validations/monthly_interval" |
| 49 | + autoload :YearlyInterval, "ice_cube/validations/yearly_interval" |
| 50 | + autoload :HourlyInterval, "ice_cube/validations/hourly_interval" |
| 51 | + |
| 52 | + autoload :HourOfDay, "ice_cube/validations/hour_of_day" |
| 53 | + autoload :MonthOfYear, "ice_cube/validations/month_of_year" |
| 54 | + autoload :MinuteOfHour, "ice_cube/validations/minute_of_hour" |
| 55 | + autoload :SecondOfMinute, "ice_cube/validations/second_of_minute" |
| 56 | + autoload :DayOfMonth, "ice_cube/validations/day_of_month" |
| 57 | + autoload :DayOfWeek, "ice_cube/validations/day_of_week" |
| 58 | + autoload :Day, "ice_cube/validations/day" |
| 59 | + autoload :DayOfYear, "ice_cube/validations/day_of_year" |
61 | 60 | end
|
62 | 61 |
|
63 | 62 | # Define some useful constants
|
64 | 63 | ONE_SECOND = 1
|
65 | 64 | ONE_MINUTE = ONE_SECOND * 60
|
66 |
| - ONE_HOUR = ONE_MINUTE * 60 |
67 |
| - ONE_DAY = ONE_HOUR * 24 |
68 |
| - ONE_WEEK = ONE_DAY * 7 |
| 65 | + ONE_HOUR = ONE_MINUTE * 60 |
| 66 | + ONE_DAY = ONE_HOUR * 24 |
| 67 | + ONE_WEEK = ONE_DAY * 7 |
69 | 68 |
|
70 | 69 | # Defines the format used by IceCube when printing out Schedule#to_s.
|
71 | 70 | # Defaults to '%B %e, %Y'
|
|
0 commit comments