enrico 0.1.5 → 0.2.1
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 +7 -0
- data/.github/workflows/test.yml +21 -0
- data/.ruby-version +1 -0
- data/Gemfile +5 -2
- data/Gemfile.lock +92 -36
- data/README.md +14 -11
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/enrico.gemspec +41 -37
- data/lib/enrico/country.rb +27 -26
- data/lib/enrico/vacation_day.rb +2 -4
- data/mise.toml +2 -0
- data/spec/fixtures/vcr_cassettes/holidays_in_date_range.yml +110 -0
- data/spec/fixtures/vcr_cassettes/holidays_in_month.yml +67 -0
- data/spec/fixtures/vcr_cassettes/holidays_in_year.yml +100 -0
- data/spec/fixtures/vcr_cassettes/is_public_holiday.yml +82 -16
- data/spec/fixtures/vcr_cassettes/supported_countries.yml +249 -85
- data/spec/lib/enrico/country_public_holidays_for_month_spec.rb +31 -27
- data/spec/lib/enrico/country_spec.rb +17 -17
- data/spec/lib/enrico/is_public_holiday_spec.rb +5 -6
- data/spec/lib/enrico/vacation_day_spec.rb +38 -18
- metadata +35 -52
- data/spec/fixtures/vcr_cassettes/public_holidays_in_date_range.yml +0 -132
- data/spec/fixtures/vcr_cassettes/public_holidays_in_month.yml +0 -74
- data/spec/fixtures/vcr_cassettes/public_holidays_in_year.yml +0 -82
@@ -1,74 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://kayaposoft.com/enrico/json/v1.0/?action=getPublicHolidaysForMonth&country=ger&month=1®ion=&year=2012
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers: {}
|
10
|
-
response:
|
11
|
-
status:
|
12
|
-
code: 200
|
13
|
-
message: OK
|
14
|
-
headers:
|
15
|
-
Server:
|
16
|
-
- nginx
|
17
|
-
Date:
|
18
|
-
- Thu, 29 Nov 2012 16:53:05 GMT
|
19
|
-
Content-Type:
|
20
|
-
- text/html
|
21
|
-
Content-Length:
|
22
|
-
- '115'
|
23
|
-
Connection:
|
24
|
-
- keep-alive
|
25
|
-
Vary:
|
26
|
-
- User-Agent,Accept-Encoding
|
27
|
-
body:
|
28
|
-
encoding: US-ASCII
|
29
|
-
string: ! '[{"date":{"day":1,"month":1,"year":"2012","dayOfWeek":7},"localName":"Neujahrstag","englishName":"New
|
30
|
-
Year''s Day"}]'
|
31
|
-
http_version:
|
32
|
-
recorded_at: Thu, 29 Nov 2012 16:49:30 GMT
|
33
|
-
- request:
|
34
|
-
method: get
|
35
|
-
uri: http://kayaposoft.com/enrico/json/v1.0/?action=getSupportedCountries
|
36
|
-
body:
|
37
|
-
encoding: US-ASCII
|
38
|
-
string: ''
|
39
|
-
headers: {}
|
40
|
-
response:
|
41
|
-
status:
|
42
|
-
code: 200
|
43
|
-
message: OK
|
44
|
-
headers:
|
45
|
-
Server:
|
46
|
-
- nginx
|
47
|
-
Date:
|
48
|
-
- Thu, 29 Nov 2012 17:03:17 GMT
|
49
|
-
Content-Type:
|
50
|
-
- text/html
|
51
|
-
Content-Length:
|
52
|
-
- '5620'
|
53
|
-
Connection:
|
54
|
-
- keep-alive
|
55
|
-
Vary:
|
56
|
-
- User-Agent,Accept-Encoding
|
57
|
-
body:
|
58
|
-
encoding: US-ASCII
|
59
|
-
string: ! '[{"fullName":"Australia","countryCode":"aus","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":["Australian
|
60
|
-
Capital Territory","Queensland","New South Wales","Northern Territory","South
|
61
|
-
Australia","Tasmania","Victoria","Western Australia"]},{"fullName":"Austria","countryCode":"aut","fromDate":{"day":1,"month":1,"year":1946},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Belgium","countryCode":"bel","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Croatia","countryCode":"hrv","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Czech
|
62
|
-
Republic","countryCode":"cze","fromDate":{"day":1,"month":1,"year":1952},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Denmark","countryCode":"dnk","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"England","countryCode":"eng","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Estonia","countryCode":"est","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Finland","countryCode":"fin","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"France","countryCode":"fra","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":["Alsace","Moselle"]},{"fullName":"Germany","countryCode":"ger","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":["Baden-W\u00fcrttemberg","Bavaria","Berlin","Brandenburg","Bremen","Hamburg","Hesse","Mecklenburg-Vorpommern","Lower
|
63
|
-
Saxony","North Rhine-Westphalia","Rhineland-Palatinate","Saarland","Saxony","Saxony-Anhalt","Schleswig-Holstein","Thuringia"]},{"fullName":"Hungary","countryCode":"hun","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Iceland","countryCode":"isl","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Ireland","countryCode":"irl","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Italy","countryCode":"ita","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Japan","countryCode":"jpn","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Latvia","countryCode":"lva","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Lithuania","countryCode":"ltu","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Luxembourg","countryCode":"lux","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Netherlands","countryCode":"nld","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"New
|
64
|
-
Zealand","countryCode":"nzl","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":["Auckland","Canterbury","Chatham
|
65
|
-
Islands","Hawkes'' Bay","Marlborough","Nelson","Otago","South Canterbury","Southland","Taranaki","Wellington","Westland"]},{"fullName":"Northern
|
66
|
-
Ireland","countryCode":"nir","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Norway","countryCode":"nor","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Poland","countryCode":"pol","fromDate":{"day":1,"month":1,"year":1952},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Portugal","countryCode":"prt","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Serbia","countryCode":"srb","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Slovakia","countryCode":"svk","fromDate":{"day":1,"month":1,"year":1952},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Slovenia","countryCode":"svn","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Sweden","countryCode":"swe","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"United
|
67
|
-
States of America","countryCode":"usa","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","District
|
68
|
-
Of Columbia","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New
|
69
|
-
Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode
|
70
|
-
Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West
|
71
|
-
Virginia","Wisconsin","Wyoming"]},{"fullName":"Wales","countryCode":"wal","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]}]'
|
72
|
-
http_version:
|
73
|
-
recorded_at: Thu, 29 Nov 2012 16:59:42 GMT
|
74
|
-
recorded_with: VCR 2.3.0
|
@@ -1,82 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://kayaposoft.com/enrico/json/v1.0/?action=getPublicHolidaysForYear&country=ger®ion=&year=2012
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers: {}
|
10
|
-
response:
|
11
|
-
status:
|
12
|
-
code: 200
|
13
|
-
message: OK
|
14
|
-
headers:
|
15
|
-
Server:
|
16
|
-
- nginx
|
17
|
-
Date:
|
18
|
-
- Thu, 29 Nov 2012 16:53:05 GMT
|
19
|
-
Content-Type:
|
20
|
-
- text/html
|
21
|
-
Content-Length:
|
22
|
-
- '1069'
|
23
|
-
Connection:
|
24
|
-
- keep-alive
|
25
|
-
Vary:
|
26
|
-
- User-Agent,Accept-Encoding
|
27
|
-
body:
|
28
|
-
encoding: US-ASCII
|
29
|
-
string: ! '[{"date":{"day":1,"month":1,"year":"2012","dayOfWeek":7},"localName":"Neujahrstag","englishName":"New
|
30
|
-
Year''s Day"},{"date":{"day":6,"month":4,"year":"2012","dayOfWeek":5},"localName":"Karfreitag","englishName":"Good
|
31
|
-
Friday"},{"date":{"day":9,"month":4,"year":"2012","dayOfWeek":1},"localName":"Ostermontag","englishName":"Easter
|
32
|
-
Monday"},{"date":{"day":1,"month":5,"year":"2012","dayOfWeek":2},"localName":"Tag
|
33
|
-
der Arbeit","englishName":"Labour Day"},{"date":{"day":17,"month":5,"year":"2012","dayOfWeek":4},"localName":"Christi
|
34
|
-
Himmelfahrt","englishName":"Ascension Day"},{"date":{"day":28,"month":5,"year":"2012","dayOfWeek":1},"localName":"Pfingstmontag","englishName":"Whit
|
35
|
-
Monday"},{"date":{"day":3,"month":10,"year":"2012","dayOfWeek":3},"localName":"Tag
|
36
|
-
der Deutschen Einheit","englishName":"German Unity Day"},{"date":{"day":25,"month":12,"year":"2012","dayOfWeek":2},"localName":"Weihnachtstag","englishName":"Christmas
|
37
|
-
Day"},{"date":{"day":26,"month":12,"year":"2012","dayOfWeek":3},"localName":"Zweiter
|
38
|
-
Weihnachtsfeiertag","englishName":"St. Stephen''s Day"}]'
|
39
|
-
http_version:
|
40
|
-
recorded_at: Thu, 29 Nov 2012 16:49:30 GMT
|
41
|
-
- request:
|
42
|
-
method: get
|
43
|
-
uri: http://kayaposoft.com/enrico/json/v1.0/?action=getSupportedCountries
|
44
|
-
body:
|
45
|
-
encoding: US-ASCII
|
46
|
-
string: ''
|
47
|
-
headers: {}
|
48
|
-
response:
|
49
|
-
status:
|
50
|
-
code: 200
|
51
|
-
message: OK
|
52
|
-
headers:
|
53
|
-
Server:
|
54
|
-
- nginx
|
55
|
-
Date:
|
56
|
-
- Thu, 29 Nov 2012 17:03:17 GMT
|
57
|
-
Content-Type:
|
58
|
-
- text/html
|
59
|
-
Content-Length:
|
60
|
-
- '5620'
|
61
|
-
Connection:
|
62
|
-
- keep-alive
|
63
|
-
Vary:
|
64
|
-
- User-Agent,Accept-Encoding
|
65
|
-
body:
|
66
|
-
encoding: US-ASCII
|
67
|
-
string: ! '[{"fullName":"Australia","countryCode":"aus","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":["Australian
|
68
|
-
Capital Territory","Queensland","New South Wales","Northern Territory","South
|
69
|
-
Australia","Tasmania","Victoria","Western Australia"]},{"fullName":"Austria","countryCode":"aut","fromDate":{"day":1,"month":1,"year":1946},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Belgium","countryCode":"bel","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Croatia","countryCode":"hrv","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Czech
|
70
|
-
Republic","countryCode":"cze","fromDate":{"day":1,"month":1,"year":1952},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Denmark","countryCode":"dnk","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"England","countryCode":"eng","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Estonia","countryCode":"est","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Finland","countryCode":"fin","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"France","countryCode":"fra","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":["Alsace","Moselle"]},{"fullName":"Germany","countryCode":"ger","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":["Baden-W\u00fcrttemberg","Bavaria","Berlin","Brandenburg","Bremen","Hamburg","Hesse","Mecklenburg-Vorpommern","Lower
|
71
|
-
Saxony","North Rhine-Westphalia","Rhineland-Palatinate","Saarland","Saxony","Saxony-Anhalt","Schleswig-Holstein","Thuringia"]},{"fullName":"Hungary","countryCode":"hun","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Iceland","countryCode":"isl","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Ireland","countryCode":"irl","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Italy","countryCode":"ita","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Japan","countryCode":"jpn","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Latvia","countryCode":"lva","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Lithuania","countryCode":"ltu","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Luxembourg","countryCode":"lux","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Netherlands","countryCode":"nld","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"New
|
72
|
-
Zealand","countryCode":"nzl","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":["Auckland","Canterbury","Chatham
|
73
|
-
Islands","Hawkes'' Bay","Marlborough","Nelson","Otago","South Canterbury","Southland","Taranaki","Wellington","Westland"]},{"fullName":"Northern
|
74
|
-
Ireland","countryCode":"nir","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Norway","countryCode":"nor","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Poland","countryCode":"pol","fromDate":{"day":1,"month":1,"year":1952},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Portugal","countryCode":"prt","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Serbia","countryCode":"srb","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Slovakia","countryCode":"svk","fromDate":{"day":1,"month":1,"year":1952},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Slovenia","countryCode":"svn","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"Sweden","countryCode":"swe","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]},{"fullName":"United
|
75
|
-
States of America","countryCode":"usa","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","District
|
76
|
-
Of Columbia","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New
|
77
|
-
Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode
|
78
|
-
Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West
|
79
|
-
Virginia","Wisconsin","Wyoming"]},{"fullName":"Wales","countryCode":"wal","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]}]'
|
80
|
-
http_version:
|
81
|
-
recorded_at: Thu, 29 Nov 2012 16:59:42 GMT
|
82
|
-
recorded_with: VCR 2.3.0
|