holidays 6.4.0 → 6.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 235, Holidays.available_regions.count
21
+ assert_equal 240, Holidays.available_regions.count
22
22
  end
23
23
  end
@@ -0,0 +1,15 @@
1
+ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
2
+
3
+ class CustomHolidaysTest < Test::Unit::TestCase
4
+
5
+ def test_custom_region_informal_day_parsing
6
+ Holidays.load_custom('test/data/test_custom_informal_holidays_defs.yaml')
7
+
8
+ assert_not_equal [], Holidays.on(Date.new(2018,1,1), :custom_informal, :informal)
9
+ assert_equal [], Holidays.on(Date.new(2018,1,1), :custom_informal, :observed)
10
+
11
+ assert_not_equal [], Holidays.on(Date.new(2018,1,5), :custom_informal, :informal)
12
+ assert_equal [], Holidays.on(Date.new(2018,1,5), :custom_informal, :observed)
13
+ end
14
+
15
+ end
@@ -210,7 +210,7 @@ class HolidaysTests < Test::Unit::TestCase
210
210
  assert_equal 9, holidays.length
211
211
 
212
212
  holidays = Holidays.year_holidays([:jp], Date.civil(2070, 1, 1))
213
- assert_equal 18, holidays.length
213
+ assert_equal 19, holidays.length
214
214
  end
215
215
 
216
216
  def test_sub_regions
@@ -296,6 +296,6 @@ class HolidaysTests < Test::Unit::TestCase
296
296
 
297
297
  def test_load_all
298
298
  Holidays.load_all
299
- assert_equal 235, Holidays.available_regions.count
299
+ assert_equal 240, Holidays.available_regions.count
300
300
  end
301
301
  end
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: 6.4.0
4
+ version: 6.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: 2018-03-06 00:00:00.000000000 Z
12
+ date: 2018-09-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -144,6 +144,7 @@ files:
144
144
  - lib/generated_definitions/ca.rb
145
145
  - lib/generated_definitions/ch.rb
146
146
  - lib/generated_definitions/cl.rb
147
+ - lib/generated_definitions/co.rb
147
148
  - lib/generated_definitions/cr.rb
148
149
  - lib/generated_definitions/cz.rb
149
150
  - lib/generated_definitions/de.rb
@@ -194,6 +195,7 @@ files:
194
195
  - lib/generated_definitions/sg.rb
195
196
  - lib/generated_definitions/si.rb
196
197
  - lib/generated_definitions/sk.rb
198
+ - lib/generated_definitions/south_america.rb
197
199
  - lib/generated_definitions/tn.rb
198
200
  - lib/generated_definitions/tr.rb
199
201
  - lib/generated_definitions/united_nations.rb
@@ -246,6 +248,7 @@ files:
246
248
  - lib/holidays/version.rb
247
249
  - test/coverage_report.rb
248
250
  - test/data/test_custom_govt_holiday_defs.yaml
251
+ - test/data/test_custom_informal_holidays_defs.yaml
249
252
  - test/data/test_custom_year_range_holiday_defs.yaml
250
253
  - test/data/test_invalid_region.rb
251
254
  - test/data/test_multiple_custom_holiday_defs.yaml
@@ -262,6 +265,7 @@ files:
262
265
  - test/defs/test_defs_ca.rb
263
266
  - test/defs/test_defs_ch.rb
264
267
  - test/defs/test_defs_cl.rb
268
+ - test/defs/test_defs_co.rb
265
269
  - test/defs/test_defs_cr.rb
266
270
  - test/defs/test_defs_cz.rb
267
271
  - test/defs/test_defs_de.rb
@@ -313,6 +317,7 @@ files:
313
317
  - test/defs/test_defs_sg.rb
314
318
  - test/defs/test_defs_si.rb
315
319
  - test/defs/test_defs_sk.rb
320
+ - test/defs/test_defs_south_america.rb
316
321
  - test/defs/test_defs_tn.rb
317
322
  - test/defs/test_defs_tr.rb
318
323
  - test/defs/test_defs_united_nations.rb
@@ -359,6 +364,7 @@ files:
359
364
  - test/integration/test_all_regions.rb
360
365
  - test/integration/test_available_regions.rb
361
366
  - test/integration/test_custom_holidays.rb
367
+ - test/integration/test_custom_informal_holidays.rb
362
368
  - test/integration/test_custom_year_range_holidays.rb
363
369
  - test/integration/test_holidays.rb
364
370
  - test/integration/test_holidays_between.rb
@@ -384,13 +390,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
384
390
  version: '0'
385
391
  requirements: []
386
392
  rubyforge_project:
387
- rubygems_version: 2.6.8
393
+ rubygems_version: 2.7.6
388
394
  signing_key:
389
395
  specification_version: 4
390
396
  summary: A collection of Ruby methods to deal with statutory and other holidays.
391
397
  test_files:
392
398
  - test/coverage_report.rb
393
399
  - test/data/test_custom_govt_holiday_defs.yaml
400
+ - test/data/test_custom_informal_holidays_defs.yaml
394
401
  - test/data/test_custom_year_range_holiday_defs.yaml
395
402
  - test/data/test_invalid_region.rb
396
403
  - test/data/test_multiple_custom_holiday_defs.yaml
@@ -407,6 +414,7 @@ test_files:
407
414
  - test/defs/test_defs_ca.rb
408
415
  - test/defs/test_defs_ch.rb
409
416
  - test/defs/test_defs_cl.rb
417
+ - test/defs/test_defs_co.rb
410
418
  - test/defs/test_defs_cr.rb
411
419
  - test/defs/test_defs_cz.rb
412
420
  - test/defs/test_defs_de.rb
@@ -458,6 +466,7 @@ test_files:
458
466
  - test/defs/test_defs_sg.rb
459
467
  - test/defs/test_defs_si.rb
460
468
  - test/defs/test_defs_sk.rb
469
+ - test/defs/test_defs_south_america.rb
461
470
  - test/defs/test_defs_tn.rb
462
471
  - test/defs/test_defs_tr.rb
463
472
  - test/defs/test_defs_united_nations.rb
@@ -504,6 +513,7 @@ test_files:
504
513
  - test/integration/test_all_regions.rb
505
514
  - test/integration/test_available_regions.rb
506
515
  - test/integration/test_custom_holidays.rb
516
+ - test/integration/test_custom_informal_holidays.rb
507
517
  - test/integration/test_custom_year_range_holidays.rb
508
518
  - test/integration/test_holidays.rb
509
519
  - test/integration/test_holidays_between.rb