holidays 5.4.0 → 5.5.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.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/Makefile +1 -1
  4. data/README.md +6 -6
  5. data/Rakefile +7 -8
  6. data/lib/generated_definitions/REGIONS.rb +3 -1
  7. data/lib/generated_definitions/ar.rb +0 -6
  8. data/lib/generated_definitions/at.rb +0 -6
  9. data/lib/generated_definitions/au.rb +6 -9
  10. data/lib/generated_definitions/be_fr.rb +0 -6
  11. data/lib/generated_definitions/be_nl.rb +0 -6
  12. data/lib/generated_definitions/bg.rb +0 -6
  13. data/lib/generated_definitions/br.rb +0 -6
  14. data/lib/generated_definitions/ca.rb +0 -6
  15. data/lib/generated_definitions/ch.rb +0 -6
  16. data/lib/generated_definitions/cl.rb +0 -6
  17. data/lib/generated_definitions/cr.rb +0 -6
  18. data/lib/generated_definitions/cz.rb +0 -6
  19. data/lib/generated_definitions/de.rb +0 -6
  20. data/lib/generated_definitions/dk.rb +0 -6
  21. data/lib/generated_definitions/ecb_target.rb +0 -6
  22. data/lib/generated_definitions/el.rb +0 -6
  23. data/lib/generated_definitions/es.rb +0 -6
  24. data/lib/generated_definitions/europe.rb +0 -6
  25. data/lib/generated_definitions/federal_reserve.rb +0 -6
  26. data/lib/generated_definitions/fedex.rb +0 -6
  27. data/lib/generated_definitions/fi.rb +0 -6
  28. data/lib/generated_definitions/fr.rb +0 -6
  29. data/lib/generated_definitions/gb.rb +0 -6
  30. data/lib/generated_definitions/hk.rb +0 -6
  31. data/lib/generated_definitions/hr.rb +0 -6
  32. data/lib/generated_definitions/hu.rb +0 -6
  33. data/lib/generated_definitions/ie.rb +0 -6
  34. data/lib/generated_definitions/is.rb +0 -6
  35. data/lib/generated_definitions/it.rb +0 -6
  36. data/lib/generated_definitions/jp.rb +0 -6
  37. data/lib/generated_definitions/kr.rb +15 -225
  38. data/lib/generated_definitions/li.rb +0 -6
  39. data/lib/generated_definitions/lt.rb +0 -6
  40. data/lib/generated_definitions/lu.rb +0 -6
  41. data/lib/generated_definitions/ma.rb +0 -6
  42. data/lib/generated_definitions/mx.rb +0 -6
  43. data/lib/generated_definitions/my.rb +0 -6
  44. data/lib/generated_definitions/nerc.rb +0 -6
  45. data/lib/generated_definitions/nl.rb +0 -6
  46. data/lib/generated_definitions/no.rb +0 -6
  47. data/lib/generated_definitions/north_america.rb +0 -6
  48. data/lib/generated_definitions/nyse.rb +1 -7
  49. data/lib/generated_definitions/nz.rb +0 -6
  50. data/lib/generated_definitions/pe.rb +0 -6
  51. data/lib/generated_definitions/ph.rb +0 -6
  52. data/lib/generated_definitions/pl.rb +0 -6
  53. data/lib/generated_definitions/pt.rb +0 -6
  54. data/lib/generated_definitions/ro.rb +0 -6
  55. data/lib/generated_definitions/scandinavia.rb +0 -6
  56. data/lib/generated_definitions/se.rb +0 -6
  57. data/lib/generated_definitions/sg.rb +0 -6
  58. data/lib/generated_definitions/si.rb +0 -6
  59. data/lib/generated_definitions/sk.rb +0 -6
  60. data/lib/generated_definitions/tn.rb +0 -6
  61. data/lib/generated_definitions/united_nations.rb +0 -6
  62. data/lib/generated_definitions/ups.rb +0 -6
  63. data/lib/generated_definitions/us.rb +0 -6
  64. data/lib/generated_definitions/ve.rb +0 -6
  65. data/lib/generated_definitions/vi.rb +5 -10
  66. data/lib/generated_definitions/za.rb +0 -6
  67. data/lib/holidays.rb +0 -1
  68. data/lib/holidays/date_calculator/lunar_date.rb +371 -0
  69. data/lib/holidays/definition/context/function_processor.rb +20 -15
  70. data/lib/holidays/definition/context/generator.rb +0 -6
  71. data/lib/holidays/definition/context/load.rb +29 -0
  72. data/lib/holidays/definition/context/merger.rb +0 -4
  73. data/lib/holidays/definition/generator/regions.rb +50 -0
  74. data/lib/holidays/definition/repository/cache.rb +20 -7
  75. data/lib/holidays/definition/repository/proc_result_cache.rb +1 -1
  76. data/lib/holidays/definition/repository/regions.rb +23 -13
  77. data/lib/holidays/definition/validator/custom_method.rb +1 -1
  78. data/lib/holidays/definition/validator/region.rb +2 -9
  79. data/lib/holidays/factory/date_calculator.rb +5 -0
  80. data/lib/holidays/factory/definition.rb +17 -1
  81. data/lib/holidays/factory/finder.rb +1 -1
  82. data/lib/holidays/finder/context/between.rb +3 -0
  83. data/lib/holidays/finder/context/parse_options.rb +53 -52
  84. data/lib/holidays/finder/context/search.rb +23 -6
  85. data/lib/holidays/finder/rules/in_region.rb +1 -1
  86. data/lib/holidays/load_all_definitions.rb +9 -0
  87. data/lib/holidays/version.rb +1 -1
  88. data/test/data/test_invalid_region.rb +15 -0
  89. data/test/data/test_region.rb +15 -0
  90. data/test/defs/test_defs_au.rb +11 -1
  91. data/test/defs/test_defs_kr.rb +15 -12
  92. data/test/defs/test_defs_nyse.rb +5 -0
  93. data/test/defs/test_defs_vi.rb +6 -4
  94. data/test/holidays/date_calculator/test_lunar_date.rb +89 -0
  95. data/test/holidays/definition/context/test_function_processor.rb +47 -23
  96. data/test/holidays/definition/context/test_generator.rb +3 -3
  97. data/test/holidays/definition/context/test_load.rb +37 -0
  98. data/test/holidays/definition/generator/test_regions.rb +97 -0
  99. data/test/holidays/definition/repository/test_cache.rb +47 -6
  100. data/test/holidays/definition/repository/test_proc_result_cache.rb +7 -0
  101. data/test/holidays/definition/repository/test_regions.rb +31 -13
  102. data/test/holidays/definition/validator/test_custom_method.rb +5 -0
  103. data/test/holidays/definition/validator/test_region.rb +7 -12
  104. data/test/holidays/factory/test_date_calculator.rb +5 -0
  105. data/test/holidays/factory/test_definition.rb +9 -0
  106. data/test/holidays/finder/context/test_parse_options.rb +102 -33
  107. data/test/holidays/finder/context/test_search.rb +45 -16
  108. data/test/integration/test_available_regions.rb +1 -1
  109. data/test/integration/test_custom_year_range_holidays.rb +0 -1
  110. data/test/integration/test_holidays.rb +3 -3
  111. data/test/integration/test_multiple_regions.rb +0 -1
  112. metadata +16 -3
@@ -2,81 +2,150 @@ require File.expand_path(File.dirname(__FILE__)) + '/../../../test_helper'
2
2
 
3
3
  require 'holidays/finder/context/parse_options'
4
4
 
5
- #TODO This set of tests need love. Since the class itself requires actual
6
- # definition files we have real defs in here, meaning that these tests
7
- # could break if a definition is removed/changed.
8
- # Also, there are no actual tests that the files are actually required.
9
- # We need a mechanism to load things from the defs and then BOOM. We can test
10
- # that this mechanism is called.
11
5
  class ParseOptionsTests < Test::Unit::TestCase
12
6
  def setup
13
7
  @regions_repo = mock()
8
+ @regions_repo.stubs(:loaded?).returns(false)
14
9
 
15
10
  @region_validator = mock()
16
11
  @region_validator.stubs(:valid?).returns(true)
17
12
 
18
- # As mentioned above, this set of tests is NOT isolated. We need
19
- # the real merger code here.
20
- @definition_merger = Holidays::Factory::Definition.merger
13
+ @definition_loader = mock()
14
+ @definition_loader.stubs(:call)
21
15
 
22
16
  @subject = Holidays::Finder::Context::ParseOptions.new(
23
17
  @regions_repo,
24
18
  @region_validator,
25
- @definition_merger,
19
+ @definition_loader,
26
20
  )
27
21
  end
28
22
 
29
23
  def test_returns_observed_true_if_options_contains_observed_flag
30
- @regions_repo.expects(:exists?).returns(false)
24
+ @regions_repo.expects(:parent_region_lookup).with(:ca).returns(:ca)
31
25
  observed = @subject.call([:ca, :observed])[1]
32
26
  assert_equal(true, observed)
33
27
  end
34
28
 
35
- def test_returns_observed_false_if_options_contains_observed_flag
36
- @regions_repo.expects(:exists?).returns(false)
29
+ def test_returns_observed_false_if_options_does_not_contain_observed_flag
30
+ @regions_repo.expects(:parent_region_lookup).with(:ca).returns(:ca)
37
31
  observed = @subject.call([:ca])[1]
38
32
  assert_equal(false, observed)
39
33
  end
40
34
 
41
35
  def test_returns_informal_true_if_options_contains_informal_flag
42
- @regions_repo.expects(:exists?).returns(false)
36
+ @regions_repo.expects(:parent_region_lookup).with(:ca).returns(:ca)
43
37
  informal = @subject.call([:ca, :informal])[2]
44
38
  assert_equal(true, informal)
45
39
  end
46
40
 
47
- def test_returns_informal_false_if_options_contains_informal_flag
48
- @regions_repo.expects(:exists?).returns(false)
41
+ def test_returns_informal_false_if_options_does_not_contain_informal_flag
42
+ @regions_repo.expects(:parent_region_lookup).with(:ca).returns(:ca)
49
43
  informal = @subject.call([:ca])[2]
50
44
  assert_equal(false, informal)
51
45
  end
52
46
 
53
- def test_returns_any_if_no_regions_are_provided
54
- regions = @subject.call(:informal)[0]
55
- assert_equal([:any], regions)
47
+ def test_raises_error_if_regions_are_invalid
48
+ @region_validator.stubs(:valid?).returns(false)
49
+
50
+ assert_raise Holidays::InvalidRegion do
51
+ @subject.call([:unknown_region])
52
+ end
56
53
  end
57
54
 
58
- def test_wildcard_regions_are_removed_if_found
59
- @regions_repo.expects(:exists?).with(:ch).returns(true)
60
- @regions_repo.expects(:exists?).with(:ch_zh).returns(true)
61
- @regions_repo.expects(:search).with('ch_').returns([:ch_zh])
55
+ def test_wildcards_load_appropriate_regions
56
+ @definition_loader.expects(:call).with(:ch).returns([:ch, :ch_zh])
57
+
58
+ regions = @subject.call([:ch_]).first
62
59
 
63
- regions = @subject.call([:ch_])[0]
60
+ assert_equal([:ch, :ch_zh], regions)
64
61
  assert_equal(false, regions.include?(:ch_))
65
62
  end
66
63
 
67
- def test_raises_error_if_regions_are_invalid
68
- @region_validator.stubs(:valid?).returns(false)
64
+ def test_does_nothing_if_region_is_already_loaded_and_is_parent
65
+ @regions_repo.expects(:parent_region_lookup).with(:test).returns(nil)
66
+ regions = @subject.call([:test]).first
67
+ assert_equal([:test], regions)
68
+ end
69
69
 
70
- assert_raise Holidays::InvalidRegion do
71
- @subject.call([:unknown_region])
72
- end
70
+ def test_does_nothing_if_region_is_already_loaded_and_is_parent_but_is_custom
71
+ @regions_repo.expects(:parent_region_lookup).with(:custom_region).returns(nil)
72
+ @regions_repo.expects(:loaded?).with(:custom_region).returns(true)
73
+
74
+ regions = @subject.call([:custom_region]).first
75
+ assert_equal([:custom_region], regions)
73
76
  end
74
77
 
75
- def test_raises_error_if_regions_contain_malicious_directory_changes
76
- @region_validator.stubs(:valid?).returns(false)
78
+ def test_has_parent_loads_parent_region
79
+ @regions_repo.expects(:parent_region_lookup).with(:subregion).returns(:parent)
80
+ @regions_repo.expects(:loaded?).with(:parent).returns(false)
81
+ @definition_loader.expects(:call).with(:parent).returns([:parent, :subregion])
77
82
 
78
- assert_raise Holidays::InvalidRegion do
79
- @subject.call(["../../test"])
83
+ regions = @subject.call([:subregion]).first
84
+ assert_equal([:subregion], regions)
85
+ end
86
+
87
+ def test_has_parent_already_loaded_does_not_load_again
88
+ @regions_repo.expects(:parent_region_lookup).with(:subregion).returns(:parent)
89
+ @regions_repo.expects(:loaded?).with(:parent).returns(false)
90
+ @definition_loader.expects(:call).with(:parent).returns([:parent, :subregion])
91
+
92
+ regions = @subject.call([:subregion]).first
93
+ assert_equal([:subregion], regions)
94
+ end
95
+
96
+ def test_cannot_load_region_prefix_for_wildcard_raises_error
97
+ @definition_loader.expects(:call).with(:ch).raises(LoadError)
98
+ assert_raises Holidays::UnknownRegionError do
99
+ @subject.call([:ch_])
80
100
  end
81
101
  end
102
+
103
+ def test_cannot_load_region_not_wildcard_raises_error
104
+ @regions_repo.expects(:parent_region_lookup).with(:ch).returns(:ch)
105
+ @definition_loader.expects(:call).with(:ch).raises(LoadError)
106
+ assert_raises Holidays::UnknownRegionError do
107
+ @subject.call([:ch])
108
+ end
109
+ end
110
+
111
+ def test_region_with_multiple_underscores_load_correctly
112
+ @regions_repo.expects(:parent_region_lookup).with(:subregion_with_underscores).returns(:parent)
113
+ @regions_repo.expects(:loaded?).with(:parent).returns(false)
114
+ @definition_loader.expects(:call).with(:parent).returns([:parent, :subregion_with_underscores])
115
+
116
+ regions = @subject.call([:subregion_with_underscores]).first
117
+ assert_equal([:subregion_with_underscores], regions)
118
+ end
119
+
120
+ def test_blank_region_should_load_all_regions_available
121
+ @regions_repo.expects(:all_generated).returns([:region1, :region2])
122
+ @regions_repo.expects(:loaded?).with(:region1).returns(false)
123
+ @regions_repo.expects(:loaded?).with(:region2).returns(true)
124
+ @regions_repo.expects(:parent_region_lookup).with(:region1).returns(:region2)
125
+ @definition_loader.expects(:call).with(:region2)
126
+
127
+ regions = @subject.call.first
128
+ assert_equal([:region1, :region2], regions)
129
+ end
130
+
131
+ def test_special_any_region_should_load_all_regions_available
132
+ @regions_repo.expects(:all_generated).returns([:region1, :region2])
133
+ @regions_repo.expects(:loaded?).with(:region1).returns(false)
134
+ @regions_repo.expects(:loaded?).with(:region2).returns(true)
135
+ @regions_repo.expects(:parent_region_lookup).with(:region1).returns(:region2)
136
+ @definition_loader.expects(:call).with(:region2)
137
+
138
+ regions = @subject.call(:any).first
139
+ assert_equal([:region1, :region2], regions)
140
+ end
141
+
142
+ # This is a legacy thing...we currently have this in the code and...I don't fully
143
+ # understand why. I don't want to remove it as part of this refactor.
144
+ def test_load_north_america_if_regions_include_us
145
+ @regions_repo.expects(:parent_region_lookup).with(:us).returns(nil)
146
+ @definition_loader.expects(:call).with(:north_america)
147
+
148
+ regions = @subject.call([:us]).first
149
+ assert_equal([:us], regions)
150
+ end
82
151
  end
@@ -15,13 +15,6 @@ class FinderSearchTests < Test::Unit::TestCase
15
15
  @custom_method_repo = mock()
16
16
  @proc_cache_repo = mock()
17
17
 
18
- @subject = Holidays::Finder::Context::Search.new(
19
- @holidays_by_month_repo,
20
- @custom_method_processor,
21
- @day_of_month_calculator,
22
- @rules,
23
- )
24
-
25
18
  @start_date = Date.civil(2015, 1, 1)
26
19
  @end_date = Date.civil(2015, 1, 1)
27
20
  @dates_driver = {2015 => [1]}
@@ -31,6 +24,13 @@ class FinderSearchTests < Test::Unit::TestCase
31
24
  @holidays_by_month_repo.expects(:find_by_month).at_most_once.returns([:mday => 1, :name => "Test", :regions=>@regions])
32
25
  @in_region_rule.expects(:call).at_most_once.returns(true)
33
26
  @year_range_rule.expects(:call).at_most_once.returns(false)
27
+
28
+ @subject = Holidays::Finder::Context::Search.new(
29
+ @holidays_by_month_repo,
30
+ @custom_method_processor,
31
+ @day_of_month_calculator,
32
+ @rules,
33
+ )
34
34
  end
35
35
 
36
36
  def test_raises_error_if_dates_driver_is_empty
@@ -85,9 +85,7 @@ class FinderSearchTests < Test::Unit::TestCase
85
85
 
86
86
  returned_date = Date.civil(2015, 3, 10)
87
87
  @custom_method_processor.expects(:call).with(
88
- 2015,
89
- 1,
90
- 1,
88
+ {:year => 2015, :month => 1, :day => 1, :region => :us},
91
89
  "func-id",
92
90
  [:year],
93
91
  1,
@@ -109,9 +107,7 @@ class FinderSearchTests < Test::Unit::TestCase
109
107
  @holidays_by_month_repo.expects(:find_by_month).at_most_once.returns([:mday => 1, :name => "Test", :regions=> @regions, :function => "func-id", :function_arguments => [:year], :function_modifier => 1])
110
108
 
111
109
  @custom_method_processor.expects(:call).with(
112
- 2015,
113
- 1,
114
- 1,
110
+ {:year => 2015, :month => 1, :day => 1, :region => :us},
115
111
  "func-id",
116
112
  [:year],
117
113
  1,
@@ -171,9 +167,7 @@ class FinderSearchTests < Test::Unit::TestCase
171
167
  @holidays_by_month_repo.expects(:find_by_month).at_most_once.returns([:mday => 8, :name => "Test", :type => :observed, :observed => "SOME_OBSERVED_FUNC_ID", :regions=>@regions])
172
168
 
173
169
  @custom_method_processor.expects(:call).with(
174
- 2015,
175
- 1,
176
- 8,
170
+ {:year => 2015, :month => 1, :day => 8, :region => :us},
177
171
  "SOME_OBSERVED_FUNC_ID",
178
172
  [:date],
179
173
  ).returns(Date.civil(2015, 10, 1))
@@ -200,4 +194,39 @@ class FinderSearchTests < Test::Unit::TestCase
200
194
  @subject.call(@dates_driver, @regions, @options)
201
195
  )
202
196
  end
197
+
198
+ # This is a specific scenario but it COULD happen in our current flow. The goal: any date
199
+ # manipulation that occurs for a specific holiday should have no impact on other holidays.
200
+ def test_returns_expected_result_if_custom_method_modifies_month_when_multiple_holidays_found
201
+ @in_region_rule.expects(:call).twice.returns(true)
202
+ @holidays_by_month_repo.expects(:find_by_month).at_most_once.returns(
203
+ [
204
+ {:mday => 14, :name => "Test", :function => "func-id", :function_arguments => [:year], :regions => @regions},
205
+ {:mday => 14, :name => "Test2", :regions => @regions},
206
+ ]
207
+ )
208
+
209
+ @custom_method_processor.expects(:call).with(
210
+ {:year => 2015, :month => 1, :day => 14, :region => :us},
211
+ "func-id",
212
+ [:year],
213
+ nil,
214
+ ).returns(Date.civil(2015, 3, 14))
215
+
216
+ assert_equal(
217
+ [
218
+ {
219
+ :date => Date.civil(2015, 3, 14),
220
+ :name => "Test",
221
+ :regions => [:us],
222
+ },
223
+ {
224
+ :date => Date.civil(2015, 1, 14),
225
+ :name => "Test2",
226
+ :regions => [:us],
227
+ }
228
+ ],
229
+ @subject.call(@dates_driver, @regions, @options)
230
+ )
231
+ end
203
232
  end
@@ -18,6 +18,6 @@ class AvailableRegionsTests < Test::Unit::TestCase
18
18
  # This test might fail if we add new regions. Since this is an integration test
19
19
  # I am fine with that!
20
20
  def test_available_regions_returns_correct_number_of_regions
21
- assert_equal 295, Holidays.available_regions.count
21
+ assert_equal 170, Holidays.available_regions.count
22
22
  end
23
23
  end
@@ -39,5 +39,4 @@ class CustomYearRangeHolidaysTest < Test::Unit::TestCase
39
39
  assert_equal [], Holidays.on(Date.civil(2016,6,5), :custom_year_range_file)
40
40
  assert_not_equal [], Holidays.on(Date.civil(2017,6,5), :custom_year_range_file)
41
41
  end
42
-
43
42
  end
@@ -218,13 +218,13 @@ class HolidaysTests < Test::Unit::TestCase
218
218
  holidays = Holidays.between(Date.civil(2008,5,1), Date.civil(2008,5,31), :ca)
219
219
  assert_equal 1, holidays.length
220
220
 
221
- # Should return Victoria Da and National Patriotes Day.
221
+ ## Should return Victoria Da and National Patriotes Day.
222
222
  holidays = Holidays.between(Date.civil(2008,5,1), Date.civil(2008,5,31), :ca_qc)
223
223
  assert_equal 2, holidays.length
224
224
 
225
225
  # Should return Victoria Day and National Patriotes Day.
226
226
  holidays = Holidays.between(Date.civil(2008,5,1), Date.civil(2008,5,31), :ca_)
227
- assert_equal 2, holidays.length
227
+ assert_equal 3, holidays.length
228
228
  end
229
229
 
230
230
  def test_sub_regions_holiday_next
@@ -293,6 +293,6 @@ class HolidaysTests < Test::Unit::TestCase
293
293
 
294
294
  def test_load_all
295
295
  Holidays.load_all
296
- assert_equal 295, Holidays.available_regions.count
296
+ assert_equal 170, Holidays.available_regions.count
297
297
  end
298
298
  end
@@ -14,7 +14,6 @@ class MultipleRegionsTests < Test::Unit::TestCase
14
14
  h = Holidays.on(Date.civil(2008,5,9), :gb_)
15
15
  assert_equal 'Liberation Day', (h[0] || {})[:name]
16
16
 
17
-
18
17
  h = Holidays.on(Date.civil(2008,5,9), :je)
19
18
  assert_equal 'Liberation Day', h[0][:name]
20
19
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: holidays
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Dunae
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-02-07 00:00:00.000000000 Z
12
+ date: 2017-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -184,13 +184,16 @@ files:
184
184
  - lib/holidays/core_extensions/time.rb
185
185
  - lib/holidays/date_calculator/day_of_month.rb
186
186
  - lib/holidays/date_calculator/easter.rb
187
+ - lib/holidays/date_calculator/lunar_date.rb
187
188
  - lib/holidays/date_calculator/weekend_modifier.rb
188
189
  - lib/holidays/definition/context/function_processor.rb
189
190
  - lib/holidays/definition/context/generator.rb
191
+ - lib/holidays/definition/context/load.rb
190
192
  - lib/holidays/definition/context/merger.rb
191
193
  - lib/holidays/definition/decorator/custom_method_proc.rb
192
194
  - lib/holidays/definition/decorator/custom_method_source.rb
193
195
  - lib/holidays/definition/entity/custom_method.rb
196
+ - lib/holidays/definition/generator/regions.rb
194
197
  - lib/holidays/definition/parser/custom_method.rb
195
198
  - lib/holidays/definition/repository/cache.rb
196
199
  - lib/holidays/definition/repository/custom_methods.rb
@@ -216,7 +219,9 @@ files:
216
219
  - test/coverage_report.rb
217
220
  - test/data/test_custom_govt_holiday_defs.yaml
218
221
  - test/data/test_custom_year_range_holiday_defs.yaml
222
+ - test/data/test_invalid_region.rb
219
223
  - test/data/test_multiple_custom_holiday_defs.yaml
224
+ - test/data/test_region.rb
220
225
  - test/data/test_single_custom_holiday_defs.yaml
221
226
  - test/data/test_single_custom_holiday_with_custom_procs.yaml
222
227
  - test/defs/test_defs_ar.rb
@@ -285,12 +290,15 @@ files:
285
290
  - test/holidays/date_calculator/test_day_of_month.rb
286
291
  - test/holidays/date_calculator/test_easter_gregorian.rb
287
292
  - test/holidays/date_calculator/test_easter_julian.rb
293
+ - test/holidays/date_calculator/test_lunar_date.rb
288
294
  - test/holidays/date_calculator/test_weekend_modifier.rb
289
295
  - test/holidays/definition/context/test_function_processor.rb
290
296
  - test/holidays/definition/context/test_generator.rb
297
+ - test/holidays/definition/context/test_load.rb
291
298
  - test/holidays/definition/context/test_merger.rb
292
299
  - test/holidays/definition/decorator/test_custom_method_proc.rb
293
300
  - test/holidays/definition/decorator/test_custom_method_source.rb
301
+ - test/holidays/definition/generator/test_regions.rb
294
302
  - test/holidays/definition/parser/test_custom_method.rb
295
303
  - test/holidays/definition/repository/test_cache.rb
296
304
  - test/holidays/definition/repository/test_custom_methods.rb
@@ -339,7 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
339
347
  version: '0'
340
348
  requirements: []
341
349
  rubyforge_project:
342
- rubygems_version: 2.4.5
350
+ rubygems_version: 2.6.8
343
351
  signing_key:
344
352
  specification_version: 4
345
353
  summary: A collection of Ruby methods to deal with statutory and other holidays.
@@ -347,7 +355,9 @@ test_files:
347
355
  - test/coverage_report.rb
348
356
  - test/data/test_custom_govt_holiday_defs.yaml
349
357
  - test/data/test_custom_year_range_holiday_defs.yaml
358
+ - test/data/test_invalid_region.rb
350
359
  - test/data/test_multiple_custom_holiday_defs.yaml
360
+ - test/data/test_region.rb
351
361
  - test/data/test_single_custom_holiday_defs.yaml
352
362
  - test/data/test_single_custom_holiday_with_custom_procs.yaml
353
363
  - test/defs/test_defs_ar.rb
@@ -416,12 +426,15 @@ test_files:
416
426
  - test/holidays/date_calculator/test_day_of_month.rb
417
427
  - test/holidays/date_calculator/test_easter_gregorian.rb
418
428
  - test/holidays/date_calculator/test_easter_julian.rb
429
+ - test/holidays/date_calculator/test_lunar_date.rb
419
430
  - test/holidays/date_calculator/test_weekend_modifier.rb
420
431
  - test/holidays/definition/context/test_function_processor.rb
421
432
  - test/holidays/definition/context/test_generator.rb
433
+ - test/holidays/definition/context/test_load.rb
422
434
  - test/holidays/definition/context/test_merger.rb
423
435
  - test/holidays/definition/decorator/test_custom_method_proc.rb
424
436
  - test/holidays/definition/decorator/test_custom_method_source.rb
437
+ - test/holidays/definition/generator/test_regions.rb
425
438
  - test/holidays/definition/parser/test_custom_method.rb
426
439
  - test/holidays/definition/repository/test_cache.rb
427
440
  - test/holidays/definition/repository/test_custom_methods.rb