holidays 9.1.1 → 9.2.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/.github/workflows/ruby.yml +2 -1
- data/CHANGELOG.md +10 -0
- data/Gemfile +5 -0
- data/Makefile +17 -2
- data/README.md +1 -2
- data/Rakefile +28 -0
- data/holidays.gemspec +3 -3
- data/lib/generated_definitions/MANIFEST +2 -0
- data/lib/generated_definitions/REGIONS.rb +2 -2
- data/lib/generated_definitions/europe.rb +5 -5
- data/lib/generated_definitions/fr.rb +2 -2
- data/lib/generated_definitions/gb.rb +3 -3
- data/lib/generated_definitions/il.rb +74 -0
- data/lib/generated_definitions/mc.rb +36 -0
- data/lib/generated_definitions/northamerica.rb +3 -2
- data/lib/generated_definitions/us.rb +3 -2
- data/lib/holidays/definition/context/function_processor.rb +1 -1
- data/lib/holidays/definition/context/merger.rb +20 -4
- data/lib/holidays/definition/repository/custom_methods.rb +37 -9
- data/lib/holidays/finder/context/search.rb +43 -24
- data/lib/holidays/version.rb +1 -1
- data/lib/holidays.rb +9 -4
- data/test/coverage_report.rb +3 -5
- data/test/data/test_date_transform_conflict_region_1.yaml +14 -0
- data/test/data/test_date_transform_conflict_region_2.yaml +14 -0
- data/test/defs/test_defs_europe.rb +7 -3
- data/test/defs/test_defs_fr.rb +3 -3
- data/test/defs/test_defs_gb.rb +4 -0
- data/test/defs/test_defs_il.rb +35 -0
- data/test/defs/test_defs_mc.rb +43 -0
- data/test/defs/test_defs_northamerica.rb +6 -1
- data/test/defs/test_defs_us.rb +6 -1
- data/test/e2e/README.md +52 -0
- data/test/e2e/data/test_multiple_regions_with_conflicts_region_3.yaml +38 -0
- data/test/{integration → e2e}/test_holidays.rb +3 -2
- data/test/e2e/test_multiple_regions_with_conflict.rb +228 -0
- data/test/holidays/definition/context/test_function_processor.rb +2 -2
- data/test/holidays/definition/context/test_merger.rb +1 -1
- data/test/holidays/finder/context/test_search.rb +58 -0
- data/test/integration/README.md +45 -6
- data/test/integration/test_custom_holidays.rb +1 -1
- data/test/integration/test_custom_informal_holidays.rb +1 -1
- data/test/smoke/README.md +31 -0
- data/test/{integration → smoke}/test_available_regions.rb +0 -5
- data/test/smoke/test_smoke.rb +74 -0
- metadata +51 -33
- data/test/integration/test_multiple_regions_with_conflict.rb +0 -29
- /data/test/{data → e2e/data}/test_multiple_regions_with_conflicts_region_1.yaml +0 -0
- /data/test/{data → e2e/data}/test_multiple_regions_with_conflicts_region_2.yaml +0 -0
- /data/test/{integration → e2e}/test_all_regions.rb +0 -0
- /data/test/{integration → e2e}/test_any_holidays_during_work_week.rb +0 -0
- /data/test/{integration → e2e}/test_holidays_between.rb +0 -0
- /data/test/{integration → e2e}/test_multiple_regions.rb +0 -0
- /data/test/{integration → e2e}/test_nonstandard_regions.rb +0 -0
- /data/test/{data → integration/data}/test_custom_govt_holiday_defs.yaml +0 -0
- /data/test/{data → integration/data}/test_custom_informal_holidays_defs.yaml +0 -0
- /data/test/{data → integration/data}/test_multiple_custom_holiday_defs.yaml +0 -0
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: 9.
|
|
4
|
+
version: 9.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Dunae
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '4'
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
26
|
+
version: '4'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rake
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -72,28 +72,28 @@ dependencies:
|
|
|
72
72
|
requirements:
|
|
73
73
|
- - "~>"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '
|
|
75
|
+
version: '3'
|
|
76
76
|
type: :development
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '
|
|
82
|
+
version: '3'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: pry
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '0.
|
|
89
|
+
version: '0.16'
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '0.
|
|
96
|
+
version: '0.16'
|
|
97
97
|
description: A collection of Ruby methods to deal with statutory and other holidays.
|
|
98
98
|
You deserve a holiday!
|
|
99
99
|
email:
|
|
@@ -155,6 +155,7 @@ files:
|
|
|
155
155
|
- lib/generated_definitions/hr.rb
|
|
156
156
|
- lib/generated_definitions/hu.rb
|
|
157
157
|
- lib/generated_definitions/ie.rb
|
|
158
|
+
- lib/generated_definitions/il.rb
|
|
158
159
|
- lib/generated_definitions/in.rb
|
|
159
160
|
- lib/generated_definitions/is.rb
|
|
160
161
|
- lib/generated_definitions/it.rb
|
|
@@ -167,6 +168,7 @@ files:
|
|
|
167
168
|
- lib/generated_definitions/lu.rb
|
|
168
169
|
- lib/generated_definitions/lv.rb
|
|
169
170
|
- lib/generated_definitions/ma.rb
|
|
171
|
+
- lib/generated_definitions/mc.rb
|
|
170
172
|
- lib/generated_definitions/mt_en.rb
|
|
171
173
|
- lib/generated_definitions/mt_mt.rb
|
|
172
174
|
- lib/generated_definitions/mx.rb
|
|
@@ -247,13 +249,10 @@ files:
|
|
|
247
249
|
- lib/holidays/load_all_definitions.rb
|
|
248
250
|
- lib/holidays/version.rb
|
|
249
251
|
- test/coverage_report.rb
|
|
250
|
-
- test/data/test_custom_govt_holiday_defs.yaml
|
|
251
|
-
- test/data/test_custom_informal_holidays_defs.yaml
|
|
252
252
|
- test/data/test_custom_year_range_holiday_defs.yaml
|
|
253
|
+
- test/data/test_date_transform_conflict_region_1.yaml
|
|
254
|
+
- test/data/test_date_transform_conflict_region_2.yaml
|
|
253
255
|
- test/data/test_invalid_region.rb
|
|
254
|
-
- test/data/test_multiple_custom_holiday_defs.yaml
|
|
255
|
-
- test/data/test_multiple_regions_with_conflicts_region_1.yaml
|
|
256
|
-
- test/data/test_multiple_regions_with_conflicts_region_2.yaml
|
|
257
256
|
- test/data/test_region.rb
|
|
258
257
|
- test/data/test_single_custom_holiday_defs.yaml
|
|
259
258
|
- test/data/test_single_custom_holiday_with_custom_procs.yaml
|
|
@@ -290,6 +289,7 @@ files:
|
|
|
290
289
|
- test/defs/test_defs_hr.rb
|
|
291
290
|
- test/defs/test_defs_hu.rb
|
|
292
291
|
- test/defs/test_defs_ie.rb
|
|
292
|
+
- test/defs/test_defs_il.rb
|
|
293
293
|
- test/defs/test_defs_in.rb
|
|
294
294
|
- test/defs/test_defs_is.rb
|
|
295
295
|
- test/defs/test_defs_it.rb
|
|
@@ -302,6 +302,7 @@ files:
|
|
|
302
302
|
- test/defs/test_defs_lu.rb
|
|
303
303
|
- test/defs/test_defs_lv.rb
|
|
304
304
|
- test/defs/test_defs_ma.rb
|
|
305
|
+
- test/defs/test_defs_mc.rb
|
|
305
306
|
- test/defs/test_defs_mt_en.rb
|
|
306
307
|
- test/defs/test_defs_mt_mt.rb
|
|
307
308
|
- test/defs/test_defs_mx.rb
|
|
@@ -338,6 +339,17 @@ files:
|
|
|
338
339
|
- test/defs/test_defs_ve.rb
|
|
339
340
|
- test/defs/test_defs_vi.rb
|
|
340
341
|
- test/defs/test_defs_za.rb
|
|
342
|
+
- test/e2e/README.md
|
|
343
|
+
- test/e2e/data/test_multiple_regions_with_conflicts_region_1.yaml
|
|
344
|
+
- test/e2e/data/test_multiple_regions_with_conflicts_region_2.yaml
|
|
345
|
+
- test/e2e/data/test_multiple_regions_with_conflicts_region_3.yaml
|
|
346
|
+
- test/e2e/test_all_regions.rb
|
|
347
|
+
- test/e2e/test_any_holidays_during_work_week.rb
|
|
348
|
+
- test/e2e/test_holidays.rb
|
|
349
|
+
- test/e2e/test_holidays_between.rb
|
|
350
|
+
- test/e2e/test_multiple_regions.rb
|
|
351
|
+
- test/e2e/test_multiple_regions_with_conflict.rb
|
|
352
|
+
- test/e2e/test_nonstandard_regions.rb
|
|
341
353
|
- test/holidays/core_extensions/test_date.rb
|
|
342
354
|
- test/holidays/core_extensions/test_date_time.rb
|
|
343
355
|
- test/holidays/date_calculator/test_day_of_month.rb
|
|
@@ -374,17 +386,15 @@ files:
|
|
|
374
386
|
- test/holidays/finder/rules/test_in_region.rb
|
|
375
387
|
- test/holidays/finder/rules/test_year_range.rb
|
|
376
388
|
- test/integration/README.md
|
|
377
|
-
- test/integration/
|
|
378
|
-
- test/integration/
|
|
379
|
-
- test/integration/
|
|
389
|
+
- test/integration/data/test_custom_govt_holiday_defs.yaml
|
|
390
|
+
- test/integration/data/test_custom_informal_holidays_defs.yaml
|
|
391
|
+
- test/integration/data/test_multiple_custom_holiday_defs.yaml
|
|
380
392
|
- test/integration/test_custom_holidays.rb
|
|
381
393
|
- test/integration/test_custom_informal_holidays.rb
|
|
382
394
|
- test/integration/test_custom_year_range_holidays.rb
|
|
383
|
-
- test/
|
|
384
|
-
- test/
|
|
385
|
-
- test/
|
|
386
|
-
- test/integration/test_multiple_regions_with_conflict.rb
|
|
387
|
-
- test/integration/test_nonstandard_regions.rb
|
|
395
|
+
- test/smoke/README.md
|
|
396
|
+
- test/smoke/test_available_regions.rb
|
|
397
|
+
- test/smoke/test_smoke.rb
|
|
388
398
|
- test/test_helper.rb
|
|
389
399
|
homepage: https://github.com/holidays/holidays
|
|
390
400
|
licenses:
|
|
@@ -412,13 +422,10 @@ specification_version: 4
|
|
|
412
422
|
summary: A collection of Ruby methods to deal with statutory and other holidays.
|
|
413
423
|
test_files:
|
|
414
424
|
- test/coverage_report.rb
|
|
415
|
-
- test/data/test_custom_govt_holiday_defs.yaml
|
|
416
|
-
- test/data/test_custom_informal_holidays_defs.yaml
|
|
417
425
|
- test/data/test_custom_year_range_holiday_defs.yaml
|
|
426
|
+
- test/data/test_date_transform_conflict_region_1.yaml
|
|
427
|
+
- test/data/test_date_transform_conflict_region_2.yaml
|
|
418
428
|
- test/data/test_invalid_region.rb
|
|
419
|
-
- test/data/test_multiple_custom_holiday_defs.yaml
|
|
420
|
-
- test/data/test_multiple_regions_with_conflicts_region_1.yaml
|
|
421
|
-
- test/data/test_multiple_regions_with_conflicts_region_2.yaml
|
|
422
429
|
- test/data/test_region.rb
|
|
423
430
|
- test/data/test_single_custom_holiday_defs.yaml
|
|
424
431
|
- test/data/test_single_custom_holiday_with_custom_procs.yaml
|
|
@@ -455,6 +462,7 @@ test_files:
|
|
|
455
462
|
- test/defs/test_defs_hr.rb
|
|
456
463
|
- test/defs/test_defs_hu.rb
|
|
457
464
|
- test/defs/test_defs_ie.rb
|
|
465
|
+
- test/defs/test_defs_il.rb
|
|
458
466
|
- test/defs/test_defs_in.rb
|
|
459
467
|
- test/defs/test_defs_is.rb
|
|
460
468
|
- test/defs/test_defs_it.rb
|
|
@@ -467,6 +475,7 @@ test_files:
|
|
|
467
475
|
- test/defs/test_defs_lu.rb
|
|
468
476
|
- test/defs/test_defs_lv.rb
|
|
469
477
|
- test/defs/test_defs_ma.rb
|
|
478
|
+
- test/defs/test_defs_mc.rb
|
|
470
479
|
- test/defs/test_defs_mt_en.rb
|
|
471
480
|
- test/defs/test_defs_mt_mt.rb
|
|
472
481
|
- test/defs/test_defs_mx.rb
|
|
@@ -503,6 +512,17 @@ test_files:
|
|
|
503
512
|
- test/defs/test_defs_ve.rb
|
|
504
513
|
- test/defs/test_defs_vi.rb
|
|
505
514
|
- test/defs/test_defs_za.rb
|
|
515
|
+
- test/e2e/README.md
|
|
516
|
+
- test/e2e/data/test_multiple_regions_with_conflicts_region_1.yaml
|
|
517
|
+
- test/e2e/data/test_multiple_regions_with_conflicts_region_2.yaml
|
|
518
|
+
- test/e2e/data/test_multiple_regions_with_conflicts_region_3.yaml
|
|
519
|
+
- test/e2e/test_all_regions.rb
|
|
520
|
+
- test/e2e/test_any_holidays_during_work_week.rb
|
|
521
|
+
- test/e2e/test_holidays.rb
|
|
522
|
+
- test/e2e/test_holidays_between.rb
|
|
523
|
+
- test/e2e/test_multiple_regions.rb
|
|
524
|
+
- test/e2e/test_multiple_regions_with_conflict.rb
|
|
525
|
+
- test/e2e/test_nonstandard_regions.rb
|
|
506
526
|
- test/holidays/core_extensions/test_date.rb
|
|
507
527
|
- test/holidays/core_extensions/test_date_time.rb
|
|
508
528
|
- test/holidays/date_calculator/test_day_of_month.rb
|
|
@@ -539,15 +559,13 @@ test_files:
|
|
|
539
559
|
- test/holidays/finder/rules/test_in_region.rb
|
|
540
560
|
- test/holidays/finder/rules/test_year_range.rb
|
|
541
561
|
- test/integration/README.md
|
|
542
|
-
- test/integration/
|
|
543
|
-
- test/integration/
|
|
544
|
-
- test/integration/
|
|
562
|
+
- test/integration/data/test_custom_govt_holiday_defs.yaml
|
|
563
|
+
- test/integration/data/test_custom_informal_holidays_defs.yaml
|
|
564
|
+
- test/integration/data/test_multiple_custom_holiday_defs.yaml
|
|
545
565
|
- test/integration/test_custom_holidays.rb
|
|
546
566
|
- test/integration/test_custom_informal_holidays.rb
|
|
547
567
|
- test/integration/test_custom_year_range_holidays.rb
|
|
548
|
-
- test/
|
|
549
|
-
- test/
|
|
550
|
-
- test/
|
|
551
|
-
- test/integration/test_multiple_regions_with_conflict.rb
|
|
552
|
-
- test/integration/test_nonstandard_regions.rb
|
|
568
|
+
- test/smoke/README.md
|
|
569
|
+
- test/smoke/test_available_regions.rb
|
|
570
|
+
- test/smoke/test_smoke.rb
|
|
553
571
|
- test/test_helper.rb
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
|
2
|
-
|
|
3
|
-
# See https://github.com/holidays/holidays/issues/344 for more info on why
|
|
4
|
-
# these tests exist.
|
|
5
|
-
class MultipleRegionsWithConflictsTests < Test::Unit::TestCase
|
|
6
|
-
|
|
7
|
-
def test_corpus_christi_returns_correctly_for_co_even_if_br_is_loaded_first
|
|
8
|
-
result = Holidays.on(Date.new(2014, 6, 19), :br)
|
|
9
|
-
assert_equal 1, result.count
|
|
10
|
-
assert_equal 'Corpus Christi', result.first[:name]
|
|
11
|
-
|
|
12
|
-
result = Holidays.on(Date.new(2014, 6, 23), :co)
|
|
13
|
-
assert_equal 1, result.count
|
|
14
|
-
assert_equal 'Corpus Christi', result.first[:name]
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def test_custom_loaded_region_returns_correct_value_with_function_modifier_conflict_even_if_conflict_definition_is_loaded_first
|
|
18
|
-
Holidays.load_custom('test/data/test_multiple_regions_with_conflicts_region_1.yaml')
|
|
19
|
-
result = Holidays.on(Date.new(2019, 6, 20), :multiple_with_conflict_1)
|
|
20
|
-
assert_equal 1, result.count
|
|
21
|
-
assert_equal 'With Function Modifier', result.first[:name]
|
|
22
|
-
|
|
23
|
-
Holidays.load_custom('test/data/test_multiple_regions_with_conflicts_region_2.yaml')
|
|
24
|
-
result = Holidays.on(Date.new(2019, 6, 24), :multiple_with_conflict_2)
|
|
25
|
-
assert_equal 1, result.count
|
|
26
|
-
assert_equal 'With Function Modifier', result.first[:name]
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|