holidays 9.1.0 → 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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +2 -1
  3. data/CHANGELOG.md +8 -0
  4. data/Gemfile +5 -0
  5. data/Makefile +14 -3
  6. data/README.md +1 -2
  7. data/Rakefile +19 -0
  8. data/doc/MAINTAINERS.md +2 -4
  9. data/holidays.gemspec +3 -3
  10. data/lib/generated_definitions/bg.rb +3 -2
  11. data/lib/generated_definitions/cy.rb +2 -1
  12. data/lib/generated_definitions/europe.rb +2 -1
  13. data/lib/holidays/definition/context/function_processor.rb +1 -1
  14. data/lib/holidays/definition/context/merger.rb +20 -4
  15. data/lib/holidays/definition/repository/custom_methods.rb +37 -9
  16. data/lib/holidays/finder/context/search.rb +43 -24
  17. data/lib/holidays/version.rb +1 -1
  18. data/lib/holidays.rb +9 -4
  19. data/test/coverage_report.rb +3 -5
  20. data/test/data/test_date_transform_conflict_region_1.yaml +14 -0
  21. data/test/data/test_date_transform_conflict_region_2.yaml +14 -0
  22. data/test/e2e/README.md +52 -0
  23. data/test/e2e/data/test_multiple_regions_with_conflicts_region_3.yaml +38 -0
  24. data/test/{integration → e2e}/test_holidays.rb +3 -2
  25. data/test/e2e/test_multiple_regions_with_conflict.rb +228 -0
  26. data/test/holidays/definition/context/test_function_processor.rb +2 -2
  27. data/test/holidays/definition/context/test_merger.rb +1 -1
  28. data/test/holidays/finder/context/test_search.rb +58 -0
  29. data/test/integration/README.md +45 -6
  30. data/test/integration/test_custom_holidays.rb +1 -1
  31. data/test/integration/test_custom_informal_holidays.rb +1 -1
  32. data/test/smoke/README.md +31 -0
  33. data/test/{integration → smoke}/test_available_regions.rb +0 -5
  34. data/test/smoke/test_smoke.rb +74 -0
  35. metadata +46 -34
  36. data/test/integration/test_multiple_regions_with_conflict.rb +0 -29
  37. /data/test/{data → e2e/data}/test_multiple_regions_with_conflicts_region_1.yaml +0 -0
  38. /data/test/{data → e2e/data}/test_multiple_regions_with_conflicts_region_2.yaml +0 -0
  39. /data/test/{integration → e2e}/test_all_regions.rb +0 -0
  40. /data/test/{integration → e2e}/test_any_holidays_during_work_week.rb +0 -0
  41. /data/test/{integration → e2e}/test_holidays_between.rb +0 -0
  42. /data/test/{integration → e2e}/test_multiple_regions.rb +0 -0
  43. /data/test/{integration → e2e}/test_nonstandard_regions.rb +0 -0
  44. /data/test/{data → integration/data}/test_custom_govt_holiday_defs.yaml +0 -0
  45. /data/test/{data → integration/data}/test_custom_informal_holidays_defs.yaml +0 -0
  46. /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.0
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: '2'
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: '2'
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: '2'
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: '2'
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.12'
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.12'
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/test_all_regions.rb
378
- - test/integration/test_any_holidays_during_work_week.rb
379
- - test/integration/test_available_regions.rb
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/integration/test_holidays.rb
384
- - test/integration/test_holidays_between.rb
385
- - test/integration/test_multiple_regions.rb
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:
@@ -407,18 +413,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
407
413
  - !ruby/object:Gem::Version
408
414
  version: '0'
409
415
  requirements: []
410
- rubygems_version: 4.0.9
416
+ rubygems_version: 4.0.6
411
417
  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/test_all_regions.rb
543
- - test/integration/test_any_holidays_during_work_week.rb
544
- - test/integration/test_available_regions.rb
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/integration/test_holidays.rb
549
- - test/integration/test_holidays_between.rb
550
- - test/integration/test_multiple_regions.rb
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