ice_cube 0.16.4 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/config/locales/id.yml +134 -0
 - data/lib/ice_cube/builders/hash_builder.rb +1 -5
 - data/lib/ice_cube/builders/ical_builder.rb +13 -15
 - data/lib/ice_cube/builders/string_builder.rb +10 -16
 - data/lib/ice_cube/deprecated.rb +3 -4
 - data/lib/ice_cube/errors/count_exceeded.rb +0 -2
 - data/lib/ice_cube/errors/until_exceeded.rb +0 -2
 - data/lib/ice_cube/flexible_hash.rb +3 -7
 - data/lib/ice_cube/i18n.rb +11 -19
 - data/lib/ice_cube/input_alignment.rb +9 -11
 - data/lib/ice_cube/null_i18n.rb +6 -6
 - data/lib/ice_cube/occurrence.rb +10 -11
 - data/lib/ice_cube/parsers/hash_parser.rb +3 -6
 - data/lib/ice_cube/parsers/ical_parser.rb +39 -38
 - data/lib/ice_cube/parsers/yaml_parser.rb +2 -4
 - data/lib/ice_cube/rule.rb +7 -18
 - data/lib/ice_cube/rules/daily_rule.rb +0 -4
 - data/lib/ice_cube/rules/hourly_rule.rb +0 -4
 - data/lib/ice_cube/rules/minutely_rule.rb +0 -4
 - data/lib/ice_cube/rules/monthly_rule.rb +0 -4
 - data/lib/ice_cube/rules/secondly_rule.rb +0 -4
 - data/lib/ice_cube/rules/weekly_rule.rb +1 -5
 - data/lib/ice_cube/rules/yearly_rule.rb +0 -4
 - data/lib/ice_cube/schedule.rb +32 -40
 - data/lib/ice_cube/single_occurrence_rule.rb +1 -5
 - data/lib/ice_cube/time_util.rb +49 -57
 - data/lib/ice_cube/validated_rule.rb +4 -10
 - data/lib/ice_cube/validations/count.rb +2 -8
 - data/lib/ice_cube/validations/daily_interval.rb +5 -11
 - data/lib/ice_cube/validations/day.rb +7 -13
 - data/lib/ice_cube/validations/day_of_month.rb +4 -10
 - data/lib/ice_cube/validations/day_of_week.rb +10 -13
 - data/lib/ice_cube/validations/day_of_year.rb +6 -12
 - data/lib/ice_cube/validations/fixed_value.rb +9 -15
 - data/lib/ice_cube/validations/hour_of_day.rb +5 -11
 - data/lib/ice_cube/validations/hourly_interval.rb +3 -9
 - data/lib/ice_cube/validations/lock.rb +8 -14
 - data/lib/ice_cube/validations/minute_of_hour.rb +4 -10
 - data/lib/ice_cube/validations/minutely_interval.rb +4 -10
 - data/lib/ice_cube/validations/month_of_year.rb +2 -8
 - data/lib/ice_cube/validations/monthly_interval.rb +4 -10
 - data/lib/ice_cube/validations/schedule_lock.rb +0 -6
 - data/lib/ice_cube/validations/second_of_minute.rb +4 -10
 - data/lib/ice_cube/validations/secondly_interval.rb +2 -8
 - data/lib/ice_cube/validations/until.rb +2 -8
 - data/lib/ice_cube/validations/weekly_interval.rb +5 -11
 - data/lib/ice_cube/validations/yearly_interval.rb +3 -9
 - data/lib/ice_cube/version.rb +1 -3
 - data/lib/ice_cube.rb +51 -51
 - metadata +23 -8
 - data/spec/spec_helper.rb +0 -79
 
    
        data/lib/ice_cube.rb
    CHANGED
    
    | 
         @@ -1,71 +1,71 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require  
     | 
| 
       2 
     | 
    
         
            -
            require  
     | 
| 
      
 1 
     | 
    
         
            +
            require "date"
         
     | 
| 
      
 2 
     | 
    
         
            +
            require "ice_cube/deprecated"
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
       4 
4 
     | 
    
         
             
            module IceCube
         
     | 
| 
      
 5 
     | 
    
         
            +
              autoload :VERSION, "ice_cube/version"
         
     | 
| 
       5 
6 
     | 
    
         | 
| 
       6 
     | 
    
         
            -
              autoload : 
     | 
| 
      
 7 
     | 
    
         
            +
              autoload :TimeUtil, "ice_cube/time_util"
         
     | 
| 
      
 8 
     | 
    
         
            +
              autoload :FlexibleHash, "ice_cube/flexible_hash"
         
     | 
| 
       7 
9 
     | 
    
         | 
| 
       8 
     | 
    
         
            -
               
     | 
| 
       9 
     | 
    
         
            -
              autoload :FlexibleHash, 'ice_cube/flexible_hash'
         
     | 
| 
       10 
     | 
    
         
            -
              autoload :I18n, 'ice_cube/i18n'
         
     | 
| 
      
 10 
     | 
    
         
            +
              require "ice_cube/i18n"
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
              autoload :Rule,  
     | 
| 
       13 
     | 
    
         
            -
              autoload :Schedule,  
     | 
| 
       14 
     | 
    
         
            -
              autoload :Occurrence,  
     | 
| 
      
 12 
     | 
    
         
            +
              autoload :Rule, "ice_cube/rule"
         
     | 
| 
      
 13 
     | 
    
         
            +
              autoload :Schedule, "ice_cube/schedule"
         
     | 
| 
      
 14 
     | 
    
         
            +
              autoload :Occurrence, "ice_cube/occurrence"
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
     | 
    
         
            -
              autoload :IcalBuilder,  
     | 
| 
       17 
     | 
    
         
            -
              autoload :HashBuilder,  
     | 
| 
       18 
     | 
    
         
            -
              autoload :StringBuilder,  
     | 
| 
      
 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 
19 
     | 
    
         | 
| 
       20 
     | 
    
         
            -
              autoload :HashParser,  
     | 
| 
       21 
     | 
    
         
            -
              autoload :YamlParser,  
     | 
| 
       22 
     | 
    
         
            -
              autoload :IcalParser,  
     | 
| 
      
 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 
23 
     | 
    
         | 
| 
       24 
     | 
    
         
            -
              autoload :CountExceeded,  
     | 
| 
       25 
     | 
    
         
            -
              autoload :UntilExceeded,  
     | 
| 
      
 24 
     | 
    
         
            +
              autoload :CountExceeded, "ice_cube/errors/count_exceeded"
         
     | 
| 
      
 25 
     | 
    
         
            +
              autoload :UntilExceeded, "ice_cube/errors/until_exceeded"
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
     | 
    
         
            -
              autoload :ValidatedRule,  
     | 
| 
       28 
     | 
    
         
            -
              autoload :SingleOccurrenceRule,  
     | 
| 
      
 27 
     | 
    
         
            +
              autoload :ValidatedRule, "ice_cube/validated_rule"
         
     | 
| 
      
 28 
     | 
    
         
            +
              autoload :SingleOccurrenceRule, "ice_cube/single_occurrence_rule"
         
     | 
| 
       29 
29 
     | 
    
         | 
| 
       30 
     | 
    
         
            -
              autoload :SecondlyRule,  
     | 
| 
       31 
     | 
    
         
            -
              autoload :MinutelyRule,  
     | 
| 
       32 
     | 
    
         
            -
              autoload :HourlyRule,  
     | 
| 
       33 
     | 
    
         
            -
              autoload :DailyRule,  
     | 
| 
       34 
     | 
    
         
            -
              autoload :WeeklyRule,  
     | 
| 
       35 
     | 
    
         
            -
              autoload :MonthlyRule,  
     | 
| 
       36 
     | 
    
         
            -
              autoload :YearlyRule,  
     | 
| 
      
 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"
         
     | 
| 
       37 
37 
     | 
    
         | 
| 
       38 
38 
     | 
    
         
             
              module Validations
         
     | 
| 
       39 
     | 
    
         
            -
                autoload :FixedValue,  
     | 
| 
       40 
     | 
    
         
            -
                autoload :ScheduleLock,  
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
                autoload :Count,  
     | 
| 
       43 
     | 
    
         
            -
                autoload :Until,  
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
                autoload :SecondlyInterval,  
     | 
| 
       46 
     | 
    
         
            -
                autoload :MinutelyInterval,  
     | 
| 
       47 
     | 
    
         
            -
                autoload :DailyInterval,  
     | 
| 
       48 
     | 
    
         
            -
                autoload :WeeklyInterval,  
     | 
| 
       49 
     | 
    
         
            -
                autoload :MonthlyInterval,  
     | 
| 
       50 
     | 
    
         
            -
                autoload :YearlyInterval,  
     | 
| 
       51 
     | 
    
         
            -
                autoload :HourlyInterval,  
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
                autoload :HourOfDay,  
     | 
| 
       54 
     | 
    
         
            -
                autoload :MonthOfYear,  
     | 
| 
       55 
     | 
    
         
            -
                autoload :MinuteOfHour,  
     | 
| 
       56 
     | 
    
         
            -
                autoload :SecondOfMinute,  
     | 
| 
       57 
     | 
    
         
            -
                autoload :DayOfMonth,  
     | 
| 
       58 
     | 
    
         
            -
                autoload :DayOfWeek,  
     | 
| 
       59 
     | 
    
         
            -
                autoload :Day,  
     | 
| 
       60 
     | 
    
         
            -
                autoload :DayOfYear,  
     | 
| 
      
 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"
         
     | 
| 
       61 
61 
     | 
    
         
             
              end
         
     | 
| 
       62 
62 
     | 
    
         | 
| 
       63 
63 
     | 
    
         
             
              # Define some useful constants
         
     | 
| 
       64 
64 
     | 
    
         
             
              ONE_SECOND = 1
         
     | 
| 
       65 
65 
     | 
    
         
             
              ONE_MINUTE = ONE_SECOND * 60
         
     | 
| 
       66 
     | 
    
         
            -
              ONE_HOUR = 
     | 
| 
       67 
     | 
    
         
            -
              ONE_DAY = 
     | 
| 
       68 
     | 
    
         
            -
              ONE_WEEK = 
     | 
| 
      
 66 
     | 
    
         
            +
              ONE_HOUR = ONE_MINUTE * 60
         
     | 
| 
      
 67 
     | 
    
         
            +
              ONE_DAY = ONE_HOUR * 24
         
     | 
| 
      
 68 
     | 
    
         
            +
              ONE_WEEK = ONE_DAY * 7
         
     | 
| 
       69 
69 
     | 
    
         | 
| 
       70 
70 
     | 
    
         
             
              # Defines the format used by IceCube when printing out Schedule#to_s.
         
     | 
| 
       71 
71 
     | 
    
         
             
              # Defaults to '%B %e, %Y'
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: ice_cube
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.17.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - John Crepezzi
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2024-07-18 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rake
         
     | 
| 
         @@ -38,6 +38,20 @@ dependencies: 
     | 
|
| 
       38 
38 
     | 
    
         
             
                - - ">"
         
     | 
| 
       39 
39 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       40 
40 
     | 
    
         
             
                    version: '3'
         
     | 
| 
      
 41 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 42 
     | 
    
         
            +
              name: standard
         
     | 
| 
      
 43 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 44 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 45 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 46 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 47 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 48 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 49 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 50 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 51 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 52 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 53 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 54 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       41 
55 
     | 
    
         
             
            description: ice_cube is a recurring date library for Ruby.  It allows for quick,
         
     | 
| 
       42 
56 
     | 
    
         
             
              programatic expansion of recurring date rules.
         
     | 
| 
       43 
57 
     | 
    
         
             
            email: john@crepezzi.com
         
     | 
| 
         @@ -49,6 +63,7 @@ files: 
     | 
|
| 
       49 
63 
     | 
    
         
             
            - config/locales/en.yml
         
     | 
| 
       50 
64 
     | 
    
         
             
            - config/locales/es.yml
         
     | 
| 
       51 
65 
     | 
    
         
             
            - config/locales/fr.yml
         
     | 
| 
      
 66 
     | 
    
         
            +
            - config/locales/id.yml
         
     | 
| 
       52 
67 
     | 
    
         
             
            - config/locales/it.yml
         
     | 
| 
       53 
68 
     | 
    
         
             
            - config/locales/ja.yml
         
     | 
| 
       54 
69 
     | 
    
         
             
            - config/locales/nl.yml
         
     | 
| 
         @@ -103,11 +118,12 @@ files: 
     | 
|
| 
       103 
118 
     | 
    
         
             
            - lib/ice_cube/validations/weekly_interval.rb
         
     | 
| 
       104 
119 
     | 
    
         
             
            - lib/ice_cube/validations/yearly_interval.rb
         
     | 
| 
       105 
120 
     | 
    
         
             
            - lib/ice_cube/version.rb
         
     | 
| 
       106 
     | 
    
         
            -
            - 
     | 
| 
       107 
     | 
    
         
            -
            homepage: http://seejohnrun.github.com/ice_cube/
         
     | 
| 
      
 121 
     | 
    
         
            +
            homepage: https://ice-cube-ruby.github.io/ice_cube/
         
     | 
| 
       108 
122 
     | 
    
         
             
            licenses:
         
     | 
| 
       109 
123 
     | 
    
         
             
            - MIT
         
     | 
| 
       110 
     | 
    
         
            -
            metadata: 
     | 
| 
      
 124 
     | 
    
         
            +
            metadata:
         
     | 
| 
      
 125 
     | 
    
         
            +
              changelog_uri: https://github.com/ice-cube-ruby/ice_cube/blob/master/CHANGELOG.md
         
     | 
| 
      
 126 
     | 
    
         
            +
              wiki_uri: https://github.com/ice-cube-ruby/ice_cube/wiki
         
     | 
| 
       111 
127 
     | 
    
         
             
            post_install_message:
         
     | 
| 
       112 
128 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       113 
129 
     | 
    
         
             
            require_paths:
         
     | 
| 
         @@ -123,9 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       123 
139 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       124 
140 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       125 
141 
     | 
    
         
             
            requirements: []
         
     | 
| 
       126 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 142 
     | 
    
         
            +
            rubygems_version: 3.5.11
         
     | 
| 
       127 
143 
     | 
    
         
             
            signing_key:
         
     | 
| 
       128 
144 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       129 
145 
     | 
    
         
             
            summary: Ruby Date Recurrence Library
         
     | 
| 
       130 
     | 
    
         
            -
            test_files:
         
     | 
| 
       131 
     | 
    
         
            -
            - spec/spec_helper.rb
         
     | 
| 
      
 146 
     | 
    
         
            +
            test_files: []
         
     | 
    
        data/spec/spec_helper.rb
    DELETED
    
    | 
         @@ -1,79 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require "bundler/setup"
         
     | 
| 
       2 
     | 
    
         
            -
            require 'ice_cube'
         
     | 
| 
       3 
     | 
    
         
            -
            require 'timeout'
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            begin
         
     | 
| 
       6 
     | 
    
         
            -
              require 'simplecov'
         
     | 
| 
       7 
     | 
    
         
            -
              SimpleCov.start
         
     | 
| 
       8 
     | 
    
         
            -
            rescue LoadError
         
     | 
| 
       9 
     | 
    
         
            -
              # okay
         
     | 
| 
       10 
     | 
    
         
            -
            end
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
            IceCube.compatibility = 12
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
            DAY = Time.utc(2010, 3, 1)
         
     | 
| 
       15 
     | 
    
         
            -
            WEDNESDAY = Time.utc(2010, 6, 23, 5, 0, 0)
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
            WORLD_TIME_ZONES = [
         
     | 
| 
       18 
     | 
    
         
            -
              'America/Anchorage',  # -1000 / -0900
         
     | 
| 
       19 
     | 
    
         
            -
              'Europe/London',      # +0000 / +0100
         
     | 
| 
       20 
     | 
    
         
            -
              'Pacific/Auckland',   # +1200 / +1300
         
     | 
| 
       21 
     | 
    
         
            -
            ]
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
            # TODO: enable warnings here and update specs to call IceCube objects correctly
         
     | 
| 
       24 
     | 
    
         
            -
            def Object.const_missing(sym)
         
     | 
| 
       25 
     | 
    
         
            -
              case sym
         
     | 
| 
       26 
     | 
    
         
            -
              when :Schedule, :Rule, :Occurrence, :TimeUtil, :ONE_DAY, :ONE_HOUR, :ONE_MINUTE
         
     | 
| 
       27 
     | 
    
         
            -
                # warn "Use IceCube::#{sym}", caller[0]
         
     | 
| 
       28 
     | 
    
         
            -
                IceCube.const_get(sym)
         
     | 
| 
       29 
     | 
    
         
            -
              else
         
     | 
| 
       30 
     | 
    
         
            -
                super
         
     | 
| 
       31 
     | 
    
         
            -
              end
         
     | 
| 
       32 
     | 
    
         
            -
            end
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
            RSpec.configure do |config|
         
     | 
| 
       35 
     | 
    
         
            -
              # Enable flags like --only-failures and --next-failure
         
     | 
| 
       36 
     | 
    
         
            -
              config.example_status_persistence_file_path = ".rspec_status"
         
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
              config.expect_with :rspec do |c|
         
     | 
| 
       39 
     | 
    
         
            -
                c.syntax = :expect
         
     | 
| 
       40 
     | 
    
         
            -
              end
         
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
              Dir[File.dirname(__FILE__) + '/support/**/*'].each { |f| require f }
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
              config.warnings = true
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
              config.include WarningHelpers
         
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
              config.before :each do |example|
         
     | 
| 
       49 
     | 
    
         
            -
                if example.metadata[:requires_active_support]
         
     | 
| 
       50 
     | 
    
         
            -
                  raise 'ActiveSupport required but not present' unless defined?(ActiveSupport)
         
     | 
| 
       51 
     | 
    
         
            -
                end
         
     | 
| 
       52 
     | 
    
         
            -
              end
         
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
              config.around :each, system_time_zone: true do |example|
         
     | 
| 
       55 
     | 
    
         
            -
                orig_zone = ENV['TZ']
         
     | 
| 
       56 
     | 
    
         
            -
                ENV['TZ'] = example.metadata[:system_time_zone]
         
     | 
| 
       57 
     | 
    
         
            -
                example.run
         
     | 
| 
       58 
     | 
    
         
            -
                ENV['TZ'] = orig_zone
         
     | 
| 
       59 
     | 
    
         
            -
              end
         
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
              config.around :each, locale: true do |example|
         
     | 
| 
       62 
     | 
    
         
            -
                orig_locale = I18n.locale
         
     | 
| 
       63 
     | 
    
         
            -
                I18n.locale = example.metadata[:locale]
         
     | 
| 
       64 
     | 
    
         
            -
                example.run
         
     | 
| 
       65 
     | 
    
         
            -
                I18n.locale = orig_locale
         
     | 
| 
       66 
     | 
    
         
            -
              end
         
     | 
| 
       67 
     | 
    
         
            -
             
     | 
| 
       68 
     | 
    
         
            -
              config.around :each, expect_warnings: true do |example|
         
     | 
| 
       69 
     | 
    
         
            -
                capture_warnings do
         
     | 
| 
       70 
     | 
    
         
            -
                  example.run
         
     | 
| 
       71 
     | 
    
         
            -
                end
         
     | 
| 
       72 
     | 
    
         
            -
              end
         
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
     | 
    
         
            -
              config.around :each do |example|
         
     | 
| 
       75 
     | 
    
         
            -
                Timeout.timeout(example.metadata.fetch(:timeout, 1)) do
         
     | 
| 
       76 
     | 
    
         
            -
                  example.run
         
     | 
| 
       77 
     | 
    
         
            -
                end
         
     | 
| 
       78 
     | 
    
         
            -
              end
         
     | 
| 
       79 
     | 
    
         
            -
            end
         
     |