holiday_jp 0.6.1 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7e3026947427429ae959f278c0aa185fd10bb224
4
- data.tar.gz: 709ea9befe598f1c537c2e3cd63961d774b01752
2
+ SHA256:
3
+ metadata.gz: 441a3b9214ac63af79fc7d684076c8c4acc51edddc9c4ed41330b6d5004ef631
4
+ data.tar.gz: 87a4d0739b159d92ecc0c5a8a38e870801bfa1e6a4eda587f52a67968a2a983d
5
5
  SHA512:
6
- metadata.gz: f24f8a7b2091f9bc8bff2e3207ddfd474182441dcac1e6816a26de970949b39507bc96861c1046c770acd06364888efcc08980f5f044c5875da2992428a03323
7
- data.tar.gz: 9a457e405db33da36b2f9958fdff5299189274eeea9cb7f0aebf2ee9a83d2432e89eeab9cd3a9496a8353620acd0087f2fabb8431f0a09d86fc9446d5d03e390
6
+ metadata.gz: 80d7df051347e3ca37d2417f01630f145ecc4a8e939783cf3a6e215da8f2d43ba7fba98e50e08ec4b50e98951652b4260f068740e265b3cc59a12eae6054fdd2
7
+ data.tar.gz: 9c16147840f3d64857016e874fd0a1ac8a484e3e5caffa8d66d06491b8b82050813bfd32f5e2f145bdfc8f41c96fa9e6b17195c96df3e27c8528d6ec796133c0
data/.gitmodules ADDED
@@ -0,0 +1,3 @@
1
+ [submodule "holiday_jp"]
2
+ path = test/holiday_jp
3
+ url = https://github.com/holiday-jp/holiday_jp.git
data/.travis.yml CHANGED
@@ -8,5 +8,7 @@ rvm:
8
8
  - 2.3.1
9
9
  - 2.4.1
10
10
  before_install:
11
+ - git submodule update --init
11
12
  - sudo apt-get update
12
13
  - gem update bundler
14
+
data/holidays.yml CHANGED
@@ -756,7 +756,6 @@
756
756
  2019-01-01: 元日
757
757
  2019-01-14: 成人の日
758
758
  2019-02-11: 建国記念の日
759
- 2019-02-23: 天皇誕生日
760
759
  2019-03-21: 春分の日
761
760
  2019-04-29: 昭和の日
762
761
  2019-05-03: 憲法記念日
@@ -776,6 +775,7 @@
776
775
  2020-01-13: 成人の日
777
776
  2020-02-11: 建国記念の日
778
777
  2020-02-23: 天皇誕生日
778
+ 2020-02-24: 振替休日
779
779
  2020-03-20: 春分の日
780
780
  2020-04-29: 昭和の日
781
781
  2020-05-03: 憲法記念日
@@ -863,6 +863,7 @@
863
863
  2025-01-13: 成人の日
864
864
  2025-02-11: 建国記念の日
865
865
  2025-02-23: 天皇誕生日
866
+ 2025-02-24: 振替休日
866
867
  2025-03-20: 春分の日
867
868
  2025-04-29: 昭和の日
868
869
  2025-05-03: 憲法記念日
@@ -947,7 +948,6 @@
947
948
  2029-10-08: 体育の日
948
949
  2029-11-03: 文化の日
949
950
  2029-11-23: 勤労感謝の日
950
- 2029-12-24: 振替休日
951
951
  2030-01-01: 元日
952
952
  2030-01-14: 成人の日
953
953
  2030-02-11: 建国記念の日
@@ -971,6 +971,7 @@
971
971
  2031-01-13: 成人の日
972
972
  2031-02-11: 建国記念の日
973
973
  2031-02-23: 天皇誕生日
974
+ 2031-02-24: 振替休日
974
975
  2031-03-21: 春分の日
975
976
  2031-04-29: 昭和の日
976
977
  2031-05-03: 憲法記念日
@@ -1055,7 +1056,6 @@
1055
1056
  2035-10-08: 体育の日
1056
1057
  2035-11-03: 文化の日
1057
1058
  2035-11-23: 勤労感謝の日
1058
- 2035-12-24: 振替休日
1059
1059
  2036-01-01: 元日
1060
1060
  2036-01-14: 成人の日
1061
1061
  2036-02-11: 建国記念の日
@@ -1142,7 +1142,6 @@
1142
1142
  2040-10-08: 体育の日
1143
1143
  2040-11-03: 文化の日
1144
1144
  2040-11-23: 勤労感謝の日
1145
- 2040-12-24: 振替休日
1146
1145
  2041-01-01: 元日
1147
1146
  2041-01-14: 成人の日
1148
1147
  2041-02-11: 建国記念の日
@@ -1166,6 +1165,7 @@
1166
1165
  2042-01-13: 成人の日
1167
1166
  2042-02-11: 建国記念の日
1168
1167
  2042-02-23: 天皇誕生日
1168
+ 2042-02-24: 振替休日
1169
1169
  2042-03-20: 春分の日
1170
1170
  2042-04-29: 昭和の日
1171
1171
  2042-05-03: 憲法記念日
@@ -1251,7 +1251,6 @@
1251
1251
  2046-10-08: 体育の日
1252
1252
  2046-11-03: 文化の日
1253
1253
  2046-11-23: 勤労感謝の日
1254
- 2046-12-24: 振替休日
1255
1254
  2047-01-01: 元日
1256
1255
  2047-01-14: 成人の日
1257
1256
  2047-02-11: 建国記念の日
@@ -1275,6 +1274,7 @@
1275
1274
  2048-01-13: 成人の日
1276
1275
  2048-02-11: 建国記念の日
1277
1276
  2048-02-23: 天皇誕生日
1277
+ 2048-02-24: 振替休日
1278
1278
  2048-03-20: 春分の日
1279
1279
  2048-04-29: 昭和の日
1280
1280
  2048-05-03: 憲法記念日
@@ -1,3 +1,3 @@
1
1
  module HolidayJp
2
- VERSION = "0.6.1"
2
+ VERSION = "0.7.0"
3
3
  end
@@ -40,7 +40,10 @@ class TestHolidayJp < Test::Unit::TestCase
40
40
  assert HolidayJp.holiday?(Date.new(year, 12, 23))
41
41
  end
42
42
 
43
- 2019.upto(2050) do |year|
43
+ assert !HolidayJp.holiday?(Date.new(2019, 2, 23))
44
+ assert !HolidayJp.holiday?(Date.new(2019, 12, 23))
45
+
46
+ 2020.upto(2050) do |year|
44
47
  assert HolidayJp.holiday?(Date.new(year, 2, 23))
45
48
  end
46
49
  end
@@ -0,0 +1,17 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'test/unit'
3
+ require 'yaml'
4
+
5
+ class TestHolidayJpYaml < Test::Unit::TestCase
6
+ def test_yaml
7
+ yaml = YAML.load_file(File.expand_path('../../holidays.yml', __FILE__))
8
+ holiday_jp_yaml = YAML.load_file(File.expand_path('../holiday_jp/holidays.yml', __FILE__))
9
+ yaml.map do |date, name|
10
+ assert_equal holiday_jp_yaml[date], name
11
+ end
12
+ holiday_jp_yaml.map do |date, name|
13
+ assert_equal yaml[date], name
14
+ end
15
+ assert_equal yaml.length, holiday_jp_yaml.length
16
+ end
17
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: holiday_jp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masaki Komagata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-09 00:00:00.000000000 Z
11
+ date: 2018-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -62,6 +62,7 @@ files:
62
62
  - ".document"
63
63
  - ".gemtest"
64
64
  - ".gitignore"
65
+ - ".gitmodules"
65
66
  - ".travis.yml"
66
67
  - CHANGELOG.md
67
68
  - Gemfile
@@ -76,6 +77,7 @@ files:
76
77
  - lib/holiday_jp/holidays.rb
77
78
  - lib/holiday_jp/version.rb
78
79
  - test/test_holiday_jp.rb
80
+ - test/test_holiday_jp_yaml.rb
79
81
  homepage: http://github.com/komagata/holiday_jp
80
82
  licenses: []
81
83
  metadata: {}
@@ -95,9 +97,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
97
  version: '0'
96
98
  requirements: []
97
99
  rubyforge_project: holiday_jp
98
- rubygems_version: 2.6.13
100
+ rubygems_version: 2.7.3
99
101
  signing_key:
100
102
  specification_version: 4
101
103
  summary: Japanese Holidays.
102
104
  test_files:
103
105
  - test/test_holiday_jp.rb
106
+ - test/test_holiday_jp_yaml.rb