enrico 0.1.6 → 0.2.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 +5 -13
- data/.github/workflows/test.yml +21 -0
- data/.ruby-version +1 -0
- data/Gemfile +7 -6
- data/Gemfile.lock +80 -84
- data/README.md +14 -11
- data/Rakefile +0 -14
- data/VERSION +1 -1
- data/enrico.gemspec +40 -39
- data/lib/enrico/country.rb +25 -24
- data/lib/enrico/vacation_day.rb +2 -4
- data/lib/enrico.rb +0 -1
- data/mise.toml +2 -0
- data/spec/fixtures/vcr_cassettes/holidays_in_date_range.yml +48 -0
- data/spec/fixtures/vcr_cassettes/holidays_in_month.yml +44 -0
- data/spec/fixtures/vcr_cassettes/holidays_in_year.yml +61 -0
- data/spec/fixtures/vcr_cassettes/is_public_holiday.yml +41 -19
- data/spec/fixtures/vcr_cassettes/supported_countries.yml +245 -101
- data/spec/lib/enrico/country_public_holidays_for_month_spec.rb +31 -27
- data/spec/lib/enrico/country_spec.rb +89 -18
- data/spec/lib/enrico/is_public_holiday_spec.rb +6 -7
- data/spec/lib/enrico/vacation_day_spec.rb +80 -19
- metadata +36 -39
- data/enrico-0.1.5.gem +0 -0
- data/enrico-0.1.6.gem +0 -0
- data/spec/fixtures/vcr_cassettes/public_holidays_in_date_range.yml +0 -33
- data/spec/fixtures/vcr_cassettes/public_holidays_in_month.yml +0 -33
- data/spec/fixtures/vcr_cassettes/public_holidays_in_year.yml +0 -41
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://kayaposoft.com/enrico/json/v2.0/?action=getHolidaysForMonth&country=deu&month=1&year=2020
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- openresty
|
23
|
+
Date:
|
24
|
+
- Fri, 18 Jul 2025 13:15:54 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Keep-Alive:
|
32
|
+
- timeout=10
|
33
|
+
Vary:
|
34
|
+
- Accept-Encoding
|
35
|
+
Access-Control-Allow-Origin:
|
36
|
+
- "*"
|
37
|
+
Alt-Svc:
|
38
|
+
- h3=":443"; ma=86400
|
39
|
+
body:
|
40
|
+
encoding: ASCII-8BIT
|
41
|
+
string: '[{"date":{"day":1,"month":1,"year":2020,"dayOfWeek":3},"name":[{"lang":"de","text":"Neujahrstag"},{"lang":"en","text":"New
|
42
|
+
Year''s Day"}],"holidayType":"public_holiday"}]'
|
43
|
+
recorded_at: Fri, 18 Jul 2025 13:15:28 GMT
|
44
|
+
recorded_with: VCR 6.3.1
|
@@ -0,0 +1,61 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://kayaposoft.com/enrico/json/v2.0/?action=getHolidaysForYear&country=deu&year=2020
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- openresty
|
23
|
+
Date:
|
24
|
+
- Fri, 18 Jul 2025 13:15:54 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Keep-Alive:
|
32
|
+
- timeout=10
|
33
|
+
Vary:
|
34
|
+
- Accept-Encoding
|
35
|
+
Access-Control-Allow-Origin:
|
36
|
+
- "*"
|
37
|
+
Alt-Svc:
|
38
|
+
- h3=":443"; ma=86400
|
39
|
+
body:
|
40
|
+
encoding: ASCII-8BIT
|
41
|
+
string: '[{"date":{"day":1,"month":1,"year":2020,"dayOfWeek":3},"name":[{"lang":"de","text":"Neujahrstag"},{"lang":"en","text":"New
|
42
|
+
Year''s Day"}],"holidayType":"public_holiday"},{"date":{"day":8,"month":3,"year":2020,"dayOfWeek":7},"name":[{"lang":"de","text":"Internationaler
|
43
|
+
Frauentag"},{"lang":"en","text":"International Women''s Day"}],"holidayType":"other_day"},{"date":{"day":29,"month":3,"year":2020,"dayOfWeek":7},"name":[{"lang":"de","text":"Beginn
|
44
|
+
der Sommerzeit"},{"lang":"en","text":"Daylight Saving Time Starts"}],"note":[{"lang":"de","text":"Die
|
45
|
+
Uhr wird um eine Stunde von 2:00 Uhr auf 3:00 Uhr vorgestellt"},{"lang":"en","text":"A
|
46
|
+
one-hour shift occurs at 02:00 local time, the clock jumps forward to 03:00"}],"holidayType":"other_day"},{"date":{"day":10,"month":4,"year":2020,"dayOfWeek":5},"name":[{"lang":"de","text":"Karfreitag"},{"lang":"en","text":"Good
|
47
|
+
Friday"}],"holidayType":"public_holiday"},{"date":{"day":13,"month":4,"year":2020,"dayOfWeek":1},"name":[{"lang":"de","text":"Ostermontag"},{"lang":"en","text":"Easter
|
48
|
+
Monday"}],"holidayType":"public_holiday"},{"date":{"day":1,"month":5,"year":2020,"dayOfWeek":5},"name":[{"lang":"de","text":"Tag
|
49
|
+
der Arbeit"},{"lang":"en","text":"Labour Day"}],"holidayType":"public_holiday"},{"date":{"day":10,"month":5,"year":2020,"dayOfWeek":7},"name":[{"lang":"de","text":"Muttertag"},{"lang":"en","text":"Mother''s
|
50
|
+
Day"}],"holidayType":"other_day"},{"date":{"day":21,"month":5,"year":2020,"dayOfWeek":4},"name":[{"lang":"de","text":"Christi
|
51
|
+
Himmelfahrt"},{"lang":"en","text":"Ascension Day"}],"holidayType":"public_holiday"},{"date":{"day":21,"month":5,"year":2020,"dayOfWeek":4},"name":[{"lang":"de","text":"Vatertag"},{"lang":"en","text":"Father''s
|
52
|
+
Day"}],"holidayType":"other_day"},{"date":{"day":1,"month":6,"year":2020,"dayOfWeek":1},"name":[{"lang":"de","text":"Pfingstmontag"},{"lang":"en","text":"Whit
|
53
|
+
Monday"}],"holidayType":"public_holiday"},{"date":{"day":3,"month":10,"year":2020,"dayOfWeek":6},"name":[{"lang":"de","text":"Tag
|
54
|
+
der Deutschen Einheit"},{"lang":"en","text":"German Unity Day"}],"holidayType":"public_holiday"},{"date":{"day":25,"month":10,"year":2020,"dayOfWeek":7},"name":[{"lang":"de","text":"Ende
|
55
|
+
der Sommerzeit"},{"lang":"en","text":"Daylight Saving Time Ends"}],"note":[{"lang":"de","text":"Die
|
56
|
+
Uhr wird um eine Stunde von 3:00 Uhr auf 2:00 Uhr zur\u00fcckgestellt"},{"lang":"en","text":"A
|
57
|
+
one-hour shift occurs at 03:00 local time, the clock jumps backward to 02:00"}],"holidayType":"other_day"},{"date":{"day":25,"month":12,"year":2020,"dayOfWeek":5},"name":[{"lang":"de","text":"Weihnachtstag"},{"lang":"en","text":"Christmas
|
58
|
+
Day"}],"holidayType":"public_holiday"},{"date":{"day":26,"month":12,"year":2020,"dayOfWeek":6},"name":[{"lang":"de","text":"Zweiter
|
59
|
+
Weihnachtsfeiertag"},{"lang":"en","text":"Boxing Day"}],"holidayType":"public_holiday"}]'
|
60
|
+
recorded_at: Fri, 18 Jul 2025 13:15:28 GMT
|
61
|
+
recorded_with: VCR 6.3.1
|
@@ -2,60 +2,82 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri:
|
5
|
+
uri: https://kayaposoft.com/enrico/json/v2.0/?action=isPublicHoliday&country=deu&date=01-01-2020
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
|
-
headers:
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
10
16
|
response:
|
11
17
|
status:
|
12
18
|
code: 200
|
13
19
|
message: OK
|
14
20
|
headers:
|
15
21
|
Server:
|
16
|
-
-
|
22
|
+
- openresty
|
17
23
|
Date:
|
18
|
-
-
|
24
|
+
- Fri, 18 Jul 2025 13:16:10 GMT
|
19
25
|
Content-Type:
|
20
26
|
- application/json
|
21
27
|
Content-Length:
|
22
28
|
- '24'
|
23
29
|
Connection:
|
24
30
|
- keep-alive
|
31
|
+
Keep-Alive:
|
32
|
+
- timeout=10
|
25
33
|
Vary:
|
26
|
-
-
|
34
|
+
- Accept-Encoding
|
35
|
+
Access-Control-Allow-Origin:
|
36
|
+
- "*"
|
37
|
+
Alt-Svc:
|
38
|
+
- h3=":443"; ma=86400
|
27
39
|
body:
|
28
|
-
encoding:
|
29
|
-
string:
|
30
|
-
|
31
|
-
recorded_at: Mon, 02 Dec 2013 17:41:34 GMT
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '{"isPublicHoliday":true}'
|
42
|
+
recorded_at: Fri, 18 Jul 2025 13:15:44 GMT
|
32
43
|
- request:
|
33
44
|
method: get
|
34
|
-
uri:
|
45
|
+
uri: https://kayaposoft.com/enrico/json/v2.0/?action=isPublicHoliday&country=deu&date=29-01-2020
|
35
46
|
body:
|
36
47
|
encoding: US-ASCII
|
37
48
|
string: ''
|
38
|
-
headers:
|
49
|
+
headers:
|
50
|
+
Accept-Encoding:
|
51
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
52
|
+
Accept:
|
53
|
+
- "*/*"
|
54
|
+
User-Agent:
|
55
|
+
- Ruby
|
39
56
|
response:
|
40
57
|
status:
|
41
58
|
code: 200
|
42
59
|
message: OK
|
43
60
|
headers:
|
44
61
|
Server:
|
45
|
-
-
|
62
|
+
- openresty
|
46
63
|
Date:
|
47
|
-
-
|
64
|
+
- Fri, 18 Jul 2025 13:18:13 GMT
|
48
65
|
Content-Type:
|
49
66
|
- application/json
|
50
67
|
Content-Length:
|
51
68
|
- '25'
|
52
69
|
Connection:
|
53
70
|
- keep-alive
|
71
|
+
Keep-Alive:
|
72
|
+
- timeout=10
|
54
73
|
Vary:
|
55
|
-
-
|
74
|
+
- Accept-Encoding
|
75
|
+
Access-Control-Allow-Origin:
|
76
|
+
- "*"
|
77
|
+
Alt-Svc:
|
78
|
+
- h3=":443"; ma=86400
|
56
79
|
body:
|
57
|
-
encoding:
|
58
|
-
string:
|
59
|
-
|
60
|
-
|
61
|
-
recorded_with: VCR 2.3.0
|
80
|
+
encoding: UTF-8
|
81
|
+
string: '{"isPublicHoliday":false}'
|
82
|
+
recorded_at: Fri, 18 Jul 2025 13:17:47 GMT
|
83
|
+
recorded_with: VCR 6.3.1
|