holidays 9.1.1 → 9.1.2
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 +4 -0
- data/Gemfile +5 -0
- data/Makefile +13 -2
- data/README.md +1 -2
- data/Rakefile +19 -0
- data/holidays.gemspec +3 -3
- 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/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 +45 -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.1.
|
|
4
|
+
version: 9.1.2
|
|
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:
|
|
@@ -247,13 +247,10 @@ files:
|
|
|
247
247
|
- lib/holidays/load_all_definitions.rb
|
|
248
248
|
- lib/holidays/version.rb
|
|
249
249
|
- test/coverage_report.rb
|
|
250
|
-
- test/data/test_custom_govt_holiday_defs.yaml
|
|
251
|
-
- test/data/test_custom_informal_holidays_defs.yaml
|
|
252
250
|
- test/data/test_custom_year_range_holiday_defs.yaml
|
|
251
|
+
- test/data/test_date_transform_conflict_region_1.yaml
|
|
252
|
+
- test/data/test_date_transform_conflict_region_2.yaml
|
|
253
253
|
- 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
254
|
- test/data/test_region.rb
|
|
258
255
|
- test/data/test_single_custom_holiday_defs.yaml
|
|
259
256
|
- test/data/test_single_custom_holiday_with_custom_procs.yaml
|
|
@@ -338,6 +335,17 @@ files:
|
|
|
338
335
|
- test/defs/test_defs_ve.rb
|
|
339
336
|
- test/defs/test_defs_vi.rb
|
|
340
337
|
- test/defs/test_defs_za.rb
|
|
338
|
+
- test/e2e/README.md
|
|
339
|
+
- test/e2e/data/test_multiple_regions_with_conflicts_region_1.yaml
|
|
340
|
+
- test/e2e/data/test_multiple_regions_with_conflicts_region_2.yaml
|
|
341
|
+
- test/e2e/data/test_multiple_regions_with_conflicts_region_3.yaml
|
|
342
|
+
- test/e2e/test_all_regions.rb
|
|
343
|
+
- test/e2e/test_any_holidays_during_work_week.rb
|
|
344
|
+
- test/e2e/test_holidays.rb
|
|
345
|
+
- test/e2e/test_holidays_between.rb
|
|
346
|
+
- test/e2e/test_multiple_regions.rb
|
|
347
|
+
- test/e2e/test_multiple_regions_with_conflict.rb
|
|
348
|
+
- test/e2e/test_nonstandard_regions.rb
|
|
341
349
|
- test/holidays/core_extensions/test_date.rb
|
|
342
350
|
- test/holidays/core_extensions/test_date_time.rb
|
|
343
351
|
- test/holidays/date_calculator/test_day_of_month.rb
|
|
@@ -374,17 +382,15 @@ files:
|
|
|
374
382
|
- test/holidays/finder/rules/test_in_region.rb
|
|
375
383
|
- test/holidays/finder/rules/test_year_range.rb
|
|
376
384
|
- test/integration/README.md
|
|
377
|
-
- test/integration/
|
|
378
|
-
- test/integration/
|
|
379
|
-
- test/integration/
|
|
385
|
+
- test/integration/data/test_custom_govt_holiday_defs.yaml
|
|
386
|
+
- test/integration/data/test_custom_informal_holidays_defs.yaml
|
|
387
|
+
- test/integration/data/test_multiple_custom_holiday_defs.yaml
|
|
380
388
|
- test/integration/test_custom_holidays.rb
|
|
381
389
|
- test/integration/test_custom_informal_holidays.rb
|
|
382
390
|
- 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
|
|
391
|
+
- test/smoke/README.md
|
|
392
|
+
- test/smoke/test_available_regions.rb
|
|
393
|
+
- test/smoke/test_smoke.rb
|
|
388
394
|
- test/test_helper.rb
|
|
389
395
|
homepage: https://github.com/holidays/holidays
|
|
390
396
|
licenses:
|
|
@@ -412,13 +418,10 @@ specification_version: 4
|
|
|
412
418
|
summary: A collection of Ruby methods to deal with statutory and other holidays.
|
|
413
419
|
test_files:
|
|
414
420
|
- test/coverage_report.rb
|
|
415
|
-
- test/data/test_custom_govt_holiday_defs.yaml
|
|
416
|
-
- test/data/test_custom_informal_holidays_defs.yaml
|
|
417
421
|
- test/data/test_custom_year_range_holiday_defs.yaml
|
|
422
|
+
- test/data/test_date_transform_conflict_region_1.yaml
|
|
423
|
+
- test/data/test_date_transform_conflict_region_2.yaml
|
|
418
424
|
- 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
425
|
- test/data/test_region.rb
|
|
423
426
|
- test/data/test_single_custom_holiday_defs.yaml
|
|
424
427
|
- test/data/test_single_custom_holiday_with_custom_procs.yaml
|
|
@@ -503,6 +506,17 @@ test_files:
|
|
|
503
506
|
- test/defs/test_defs_ve.rb
|
|
504
507
|
- test/defs/test_defs_vi.rb
|
|
505
508
|
- test/defs/test_defs_za.rb
|
|
509
|
+
- test/e2e/README.md
|
|
510
|
+
- test/e2e/data/test_multiple_regions_with_conflicts_region_1.yaml
|
|
511
|
+
- test/e2e/data/test_multiple_regions_with_conflicts_region_2.yaml
|
|
512
|
+
- test/e2e/data/test_multiple_regions_with_conflicts_region_3.yaml
|
|
513
|
+
- test/e2e/test_all_regions.rb
|
|
514
|
+
- test/e2e/test_any_holidays_during_work_week.rb
|
|
515
|
+
- test/e2e/test_holidays.rb
|
|
516
|
+
- test/e2e/test_holidays_between.rb
|
|
517
|
+
- test/e2e/test_multiple_regions.rb
|
|
518
|
+
- test/e2e/test_multiple_regions_with_conflict.rb
|
|
519
|
+
- test/e2e/test_nonstandard_regions.rb
|
|
506
520
|
- test/holidays/core_extensions/test_date.rb
|
|
507
521
|
- test/holidays/core_extensions/test_date_time.rb
|
|
508
522
|
- test/holidays/date_calculator/test_day_of_month.rb
|
|
@@ -539,15 +553,13 @@ test_files:
|
|
|
539
553
|
- test/holidays/finder/rules/test_in_region.rb
|
|
540
554
|
- test/holidays/finder/rules/test_year_range.rb
|
|
541
555
|
- test/integration/README.md
|
|
542
|
-
- test/integration/
|
|
543
|
-
- test/integration/
|
|
544
|
-
- test/integration/
|
|
556
|
+
- test/integration/data/test_custom_govt_holiday_defs.yaml
|
|
557
|
+
- test/integration/data/test_custom_informal_holidays_defs.yaml
|
|
558
|
+
- test/integration/data/test_multiple_custom_holiday_defs.yaml
|
|
545
559
|
- test/integration/test_custom_holidays.rb
|
|
546
560
|
- test/integration/test_custom_informal_holidays.rb
|
|
547
561
|
- 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
|
|
562
|
+
- test/smoke/README.md
|
|
563
|
+
- test/smoke/test_available_regions.rb
|
|
564
|
+
- test/smoke/test_smoke.rb
|
|
553
565
|
- 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
|