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
@@ -6,62 +6,66 @@ require_relative '../../spec_helper'
|
|
6
6
|
|
7
7
|
describe Enrico::Country do
|
8
8
|
|
9
|
-
describe "GET
|
9
|
+
describe "GET getHolidaysForMonth" do
|
10
10
|
before(:each) do
|
11
|
-
VCR.insert_cassette '
|
11
|
+
VCR.insert_cassette 'holidays_in_month', :record => :new_episodes
|
12
12
|
end
|
13
13
|
|
14
14
|
after(:each) do
|
15
15
|
VCR.eject_cassette
|
16
16
|
end
|
17
|
-
let(:country) { Enrico::Country.new("
|
17
|
+
let(:country) { Enrico::Country.new("deu") }
|
18
18
|
it "should return all holidays in month" do
|
19
|
-
|
20
|
-
|
21
|
-
dates.first.date
|
22
|
-
dates.first.local_name
|
23
|
-
dates.first.english_name
|
19
|
+
dates = country.holidays_for_month(Date.parse('2020-01-15'))
|
20
|
+
|
21
|
+
_(dates.first.date).must_equal Date.parse('2020-01-01')
|
22
|
+
_(dates.first.local_name).must_equal "Neujahrstag"
|
23
|
+
_(dates.first.english_name).must_equal "New Year's Day"
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
describe "GET
|
27
|
+
describe "GET getHolidaysForYear" do
|
28
28
|
before(:each) do
|
29
|
-
VCR.insert_cassette '
|
29
|
+
VCR.insert_cassette 'holidays_in_year', :record => :new_episodes
|
30
30
|
end
|
31
31
|
|
32
32
|
after(:each) do
|
33
33
|
VCR.eject_cassette
|
34
34
|
end
|
35
|
-
let(:country) { Enrico::Country.new("
|
36
|
-
it "should return all holidays in
|
37
|
-
|
38
|
-
|
39
|
-
dates.first.date
|
40
|
-
dates.first.local_name
|
41
|
-
dates.first.english_name
|
35
|
+
let(:country) { Enrico::Country.new("deu") }
|
36
|
+
it "should return all holidays in year" do
|
37
|
+
dates = country.holidays_for_year(Date.parse('2020-06-01'))
|
38
|
+
|
39
|
+
_(dates.first.date).must_equal Date.parse('2020-01-01')
|
40
|
+
_(dates.first.local_name).must_equal "Neujahrstag"
|
41
|
+
_(dates.first.english_name).must_equal "New Year's Day"
|
42
|
+
|
43
|
+
_(dates.last.date).must_equal Date.parse('2020-12-26')
|
44
|
+
_(dates.last.local_name).must_equal "Zweiter Weihnachtsfeiertag"
|
45
|
+
_(dates.last.english_name).must_equal "Boxing Day"
|
42
46
|
end
|
43
47
|
end
|
44
48
|
|
45
|
-
describe "GET
|
49
|
+
describe "GET getForDateRange" do
|
46
50
|
before(:each) do
|
47
|
-
VCR.insert_cassette '
|
51
|
+
VCR.insert_cassette 'holidays_in_date_range', :record => :new_episodes
|
48
52
|
end
|
49
53
|
|
50
54
|
after(:each) do
|
51
55
|
VCR.eject_cassette
|
52
56
|
end
|
53
|
-
let(:country) { Enrico::Country.new("
|
57
|
+
let(:country) { Enrico::Country.new("deu") }
|
54
58
|
it "should return all holidays in date range" do
|
55
|
-
|
56
|
-
end_date = Date.today.beginning_of_year + 2.month
|
59
|
+
dates = country.holidays_for_date_range(Date.parse('2020-01-01'), Date.parse('2020-03-31'))
|
57
60
|
|
58
|
-
dates
|
61
|
+
_(dates.first.date).must_equal Date.parse('2020-01-01')
|
62
|
+
_(dates.first.local_name).must_equal "Neujahrstag"
|
63
|
+
_(dates.first.english_name).must_equal "New Year's Day"
|
59
64
|
|
60
|
-
dates.
|
61
|
-
dates.
|
62
|
-
dates.
|
65
|
+
_(dates.last.date).must_equal Date.parse('2020-03-29')
|
66
|
+
_(dates.last.local_name).must_equal "Beginn der Sommerzeit"
|
67
|
+
_(dates.last.english_name).must_equal "Daylight Saving Time Starts"
|
63
68
|
end
|
64
69
|
end
|
65
70
|
|
66
71
|
end
|
67
|
-
|
@@ -16,10 +16,10 @@ describe Enrico::Country do
|
|
16
16
|
|
17
17
|
describe "default attributes" do
|
18
18
|
it "must include httparty methods" do
|
19
|
-
Enrico::Country.must_include HTTParty
|
19
|
+
_(Enrico::Country).must_include HTTParty
|
20
20
|
end
|
21
21
|
it "must have the base url set to the Dribble API endpoint" do
|
22
|
-
Enrico::Country.base_uri.must_equal '
|
22
|
+
_(Enrico::Country.base_uri).must_equal 'https://kayaposoft.com/enrico/json/v2.0'
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -30,56 +30,57 @@ describe Enrico::Country do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
describe "get list of all supported countries" do
|
33
|
-
|
33
|
+
|
34
34
|
it "must have all method" do
|
35
|
-
Enrico::Country.must_respond_to :all
|
35
|
+
_(Enrico::Country).must_respond_to :all
|
36
36
|
end
|
37
37
|
|
38
38
|
it "must parse the api response from JSON to Hash" do
|
39
|
-
Enrico::Country.all.must_be_instance_of
|
39
|
+
_(Enrico::Country.all).must_be_instance_of HTTParty::Response
|
40
|
+
_(Enrico::Country.all.to_a).must_be_instance_of Array
|
40
41
|
end
|
41
42
|
|
42
43
|
end
|
43
44
|
|
44
45
|
describe "default instance attributes" do
|
45
|
-
let(:country) { Enrico::Country.new("
|
46
|
+
let(:country) { Enrico::Country.new("deu") }
|
46
47
|
|
47
48
|
it "must have an country_code attribute" do
|
48
|
-
country.must_respond_to :country_code
|
49
|
+
_(country).must_respond_to :country_code
|
49
50
|
end
|
50
51
|
|
51
52
|
it "must have the right id" do
|
52
|
-
country.country_code.must_equal '
|
53
|
+
_(country.country_code).must_equal 'deu'
|
53
54
|
end
|
54
55
|
|
55
56
|
end
|
56
57
|
|
57
58
|
describe "get list of all supported countries" do
|
58
59
|
|
59
|
-
let(:country) { Enrico::Country.new("
|
60
|
+
let(:country) { Enrico::Country.new("deu") }
|
60
61
|
|
61
62
|
it "must have a country method" do
|
62
|
-
country.must_respond_to :details
|
63
|
+
_(country).must_respond_to :details
|
63
64
|
end
|
64
65
|
|
65
66
|
it "must repond with the details of a country" do
|
66
|
-
country.full_name.must_equal 'Germany'
|
67
|
+
_(country.full_name).must_equal 'Germany'
|
67
68
|
end
|
68
69
|
|
69
70
|
it "should respond with the fromDate" do
|
70
71
|
format = {"day"=>1, "month"=>1, "year"=>2011}
|
71
|
-
country.from_date.must_equal format
|
72
|
+
_(country.from_date).must_equal format
|
72
73
|
end
|
73
74
|
|
74
75
|
it "should respond with toDate" do
|
75
76
|
toDate = {"day"=>31, "month"=>12, "year"=>32767}
|
76
|
-
country.toDate.must_equal toDate
|
77
|
+
_(country.toDate).must_equal toDate
|
77
78
|
end
|
78
79
|
|
79
80
|
it "should respond with regions" do
|
80
|
-
regions = ["
|
81
|
-
country.regions.must_be_instance_of Array
|
82
|
-
country.regions.must_equal regions
|
81
|
+
regions = ["bw", "by", "be", "bb", "hb", "hh", "he", "ni", "mv", "nw", "rp", "sl", "sn", "st", "sh", "th"]
|
82
|
+
_(country.regions).must_be_instance_of Array
|
83
|
+
_(country.regions).must_equal regions
|
83
84
|
end
|
84
85
|
|
85
86
|
end
|
@@ -87,4 +88,3 @@ describe Enrico::Country do
|
|
87
88
|
end
|
88
89
|
|
89
90
|
end
|
90
|
-
|
@@ -14,19 +14,18 @@ describe Enrico::Country do
|
|
14
14
|
VCR.eject_cassette
|
15
15
|
end
|
16
16
|
|
17
|
-
let(:country) { Enrico::Country.new("
|
17
|
+
let(:country) { Enrico::Country.new("deu") }
|
18
18
|
|
19
19
|
it "should trueify that date is public holiday" do
|
20
|
-
date = Date.
|
21
|
-
country.is_public_holiday?(date).must_equal true
|
20
|
+
date = Date.parse('2020-01-01')
|
21
|
+
_(country.is_public_holiday?(date)).must_equal true
|
22
22
|
end
|
23
23
|
|
24
24
|
it "should falsify that date is public holiday" do
|
25
|
-
date = Date.
|
26
|
-
country.is_public_holiday?(date).must_equal false
|
25
|
+
date = Date.parse('2020-01-29')
|
26
|
+
_(country.is_public_holiday?(date)).must_equal false
|
27
27
|
end
|
28
28
|
|
29
29
|
end
|
30
30
|
|
31
31
|
end
|
32
|
-
|
@@ -5,28 +5,48 @@ require_relative '../../spec_helper'
|
|
5
5
|
# require (File.expand_path('./../../../spec_helper', __FILE__))
|
6
6
|
|
7
7
|
describe Enrico::VacationDay do
|
8
|
-
|
9
8
|
describe "default instance attributes" do
|
10
|
-
let(:vacatin_date) {
|
11
|
-
Enrico::VacationDay.new(Date.today.beginning_of_year, "Neujahrstag", "New Year's Day")
|
12
|
-
}
|
13
|
-
|
14
9
|
it "test initializer methods" do
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
10
|
+
beginning_of_year = Date.today.beginning_of_year
|
11
|
+
rsp = {
|
12
|
+
"date"=>{"day"=> beginning_of_year.day, "month" => beginning_of_year.month, "year"=>beginning_of_year.year, "dayOfWeek"=>beginning_of_year.wday},
|
13
|
+
"name"=>[
|
14
|
+
{
|
15
|
+
"lang"=>"de",
|
16
|
+
"text"=>"Neujahrstag"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"lang"=>"en",
|
20
|
+
"text"=>"New Year's Day"
|
21
|
+
}
|
22
|
+
],
|
23
|
+
"holidayType"=>"public_holiday"
|
24
|
+
}
|
25
|
+
day = Enrico::VacationDay.new(rsp)
|
26
|
+
_(day.date).must_equal Date.today.beginning_of_year
|
27
|
+
_(day.local_name).must_equal "Neujahrstag"
|
28
|
+
_(day.english_name).must_equal "New Year's Day"
|
20
29
|
end
|
21
30
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
31
|
+
describe 'when country has only one language' do
|
32
|
+
it "returns same names" do
|
33
|
+
beginning_of_year = Date.today.beginning_of_year
|
34
|
+
rsp = {
|
35
|
+
"date"=>{"day"=> beginning_of_year.day, "month" => beginning_of_year.month, "year"=>beginning_of_year.year, "dayOfWeek"=>beginning_of_year.wday},
|
36
|
+
"name"=>[
|
37
|
+
{
|
38
|
+
"lang"=>"en",
|
39
|
+
"text"=>"New Year's Day"
|
40
|
+
}
|
41
|
+
],
|
42
|
+
"holidayType"=>"public_holiday"
|
43
|
+
}
|
44
|
+
day = Enrico::VacationDay.new(rsp)
|
45
|
+
_(day.date).must_equal Date.today.beginning_of_year
|
46
|
+
_(day.local_name).must_equal "New Year's Day"
|
47
|
+
_(day.english_name).must_equal "New Year's Day"
|
48
|
+
end
|
29
49
|
|
50
|
+
end
|
30
51
|
end
|
31
|
-
|
32
52
|
end
|
metadata
CHANGED
@@ -1,129 +1,114 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enrico
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Kalle Saas
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2025-07-18 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: httparty
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
19
|
+
version: 0.21.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
26
|
+
version: 0.21.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: bundler
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: jeweler
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: simplecov
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - ">="
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - ">="
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: rdoc
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - ">="
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - ">="
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: shoulda
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - ">="
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - ">="
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: minitest
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - ">="
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - ">="
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '0'
|
126
|
-
description:
|
111
|
+
description: https://github.com/easyPEP/enrico
|
127
112
|
email: kalle@easypep.de
|
128
113
|
executables: []
|
129
114
|
extensions: []
|
@@ -132,7 +117,9 @@ extra_rdoc_files:
|
|
132
117
|
- README.md
|
133
118
|
- README.rdoc
|
134
119
|
files:
|
135
|
-
- .document
|
120
|
+
- ".document"
|
121
|
+
- ".github/workflows/test.yml"
|
122
|
+
- ".ruby-version"
|
136
123
|
- Gemfile
|
137
124
|
- Gemfile.lock
|
138
125
|
- LICENSE.txt
|
@@ -144,42 +131,38 @@ files:
|
|
144
131
|
- lib/enrico.rb
|
145
132
|
- lib/enrico/country.rb
|
146
133
|
- lib/enrico/vacation_day.rb
|
134
|
+
- mise.toml
|
135
|
+
- spec/fixtures/vcr_cassettes/holidays_in_date_range.yml
|
136
|
+
- spec/fixtures/vcr_cassettes/holidays_in_month.yml
|
137
|
+
- spec/fixtures/vcr_cassettes/holidays_in_year.yml
|
147
138
|
- spec/fixtures/vcr_cassettes/is_public_holiday.yml
|
148
|
-
- spec/fixtures/vcr_cassettes/public_holidays_in_date_range.yml
|
149
|
-
- spec/fixtures/vcr_cassettes/public_holidays_in_month.yml
|
150
|
-
- spec/fixtures/vcr_cassettes/public_holidays_in_year.yml
|
151
139
|
- spec/fixtures/vcr_cassettes/supported_countries.yml
|
152
140
|
- spec/lib/enrico/country_public_holidays_for_month_spec.rb
|
153
141
|
- spec/lib/enrico/country_spec.rb
|
154
142
|
- spec/lib/enrico/is_public_holiday_spec.rb
|
155
143
|
- spec/lib/enrico/vacation_day_spec.rb
|
156
144
|
- spec/spec_helper.rb
|
157
|
-
homepage:
|
145
|
+
homepage: https://github.com/easyPEP/enrico
|
158
146
|
licenses:
|
159
147
|
- MIT
|
160
|
-
|
148
|
+
metadata: {}
|
149
|
+
post_install_message:
|
161
150
|
rdoc_options: []
|
162
151
|
require_paths:
|
163
152
|
- lib
|
164
153
|
required_ruby_version: !ruby/object:Gem::Requirement
|
165
|
-
none: false
|
166
154
|
requirements:
|
167
|
-
- -
|
155
|
+
- - ">="
|
168
156
|
- !ruby/object:Gem::Version
|
169
157
|
version: '0'
|
170
|
-
segments:
|
171
|
-
- 0
|
172
|
-
hash: -4538822451665088345
|
173
158
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
|
-
none: false
|
175
159
|
requirements:
|
176
|
-
- -
|
160
|
+
- - ">="
|
177
161
|
- !ruby/object:Gem::Version
|
178
162
|
version: '0'
|
179
163
|
requirements: []
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
specification_version: 3
|
164
|
+
rubygems_version: 3.0.3.1
|
165
|
+
signing_key:
|
166
|
+
specification_version: 4
|
184
167
|
summary: A ruby wrapper around enrico holiday API
|
185
168
|
test_files: []
|
@@ -1,132 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://kayaposoft.com/enrico/json/v1.0/?action=getSupportedCountries
|
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
|
-
- '5620'
|
23
|
-
Connection:
|
24
|
-
- keep-alive
|
25
|
-
Vary:
|
26
|
-
- User-Agent,Accept-Encoding
|
27
|
-
body:
|
28
|
-
encoding: US-ASCII
|
29
|
-
string: ! '[{"fullName":"Australia","countryCode":"aus","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":["Australian
|
30
|
-
Capital Territory","Queensland","New South Wales","Northern Territory","South
|
31
|
-
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
|
32
|
-
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
|
33
|
-
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
|
34
|
-
Zealand","countryCode":"nzl","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":["Auckland","Canterbury","Chatham
|
35
|
-
Islands","Hawkes'' Bay","Marlborough","Nelson","Otago","South Canterbury","Southland","Taranaki","Wellington","Westland"]},{"fullName":"Northern
|
36
|
-
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
|
37
|
-
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
|
38
|
-
Of Columbia","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New
|
39
|
-
Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode
|
40
|
-
Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West
|
41
|
-
Virginia","Wisconsin","Wyoming"]},{"fullName":"Wales","countryCode":"wal","fromDate":{"day":1,"month":1,"year":2011},"toDate":{"day":31,"month":12,"year":32767},"regions":[]}]'
|
42
|
-
http_version:
|
43
|
-
recorded_at: Thu, 29 Nov 2012 16:49:30 GMT
|
44
|
-
- request:
|
45
|
-
method: get
|
46
|
-
uri: http://kayaposoft.com/enrico/json/v1.0/?action=getPublicHolidaysForDateRange&country=ger&fromDate=2012-01-01®ion=&toDate=2012-03-01
|
47
|
-
body:
|
48
|
-
encoding: US-ASCII
|
49
|
-
string: ''
|
50
|
-
headers: {}
|
51
|
-
response:
|
52
|
-
status:
|
53
|
-
code: 200
|
54
|
-
message: OK
|
55
|
-
headers:
|
56
|
-
Server:
|
57
|
-
- nginx
|
58
|
-
Date:
|
59
|
-
- Thu, 29 Nov 2012 16:55:42 GMT
|
60
|
-
Content-Type:
|
61
|
-
- text/html
|
62
|
-
Content-Length:
|
63
|
-
- '43'
|
64
|
-
Connection:
|
65
|
-
- keep-alive
|
66
|
-
Vary:
|
67
|
-
- User-Agent,Accept-Encoding
|
68
|
-
body:
|
69
|
-
encoding: US-ASCII
|
70
|
-
string: ! '{"error":"2012 Jan 01 is not a valid date"}'
|
71
|
-
http_version:
|
72
|
-
recorded_at: Thu, 29 Nov 2012 16:52:07 GMT
|
73
|
-
- request:
|
74
|
-
method: get
|
75
|
-
uri: http://kayaposoft.com/enrico/json/v1.0/?action=getPublicHolidaysForDateRange&country=ger&fromDate=01-01-2012®ion=&toDate=01-03-2012
|
76
|
-
body:
|
77
|
-
encoding: US-ASCII
|
78
|
-
string: ''
|
79
|
-
headers: {}
|
80
|
-
response:
|
81
|
-
status:
|
82
|
-
code: 200
|
83
|
-
message: OK
|
84
|
-
headers:
|
85
|
-
Server:
|
86
|
-
- nginx
|
87
|
-
Date:
|
88
|
-
- Thu, 29 Nov 2012 17:00:11 GMT
|
89
|
-
Content-Type:
|
90
|
-
- text/html
|
91
|
-
Content-Length:
|
92
|
-
- '115'
|
93
|
-
Connection:
|
94
|
-
- keep-alive
|
95
|
-
Vary:
|
96
|
-
- User-Agent,Accept-Encoding
|
97
|
-
body:
|
98
|
-
encoding: US-ASCII
|
99
|
-
string: ! '[{"date":{"day":1,"month":1,"year":"2012","dayOfWeek":7},"localName":"Neujahrstag","englishName":"New
|
100
|
-
Year''s Day"}]'
|
101
|
-
http_version:
|
102
|
-
recorded_at: Thu, 29 Nov 2012 16:56:36 GMT
|
103
|
-
- request:
|
104
|
-
method: get
|
105
|
-
uri: http://kayaposoft.com/enrico/json/v1.0/?action=getPublicHolidaysForDateRange&country=ger&from_date=01-01-2012®ion=&to_date=01-03-2012
|
106
|
-
body:
|
107
|
-
encoding: US-ASCII
|
108
|
-
string: ''
|
109
|
-
headers: {}
|
110
|
-
response:
|
111
|
-
status:
|
112
|
-
code: 200
|
113
|
-
message: OK
|
114
|
-
headers:
|
115
|
-
Server:
|
116
|
-
- nginx
|
117
|
-
Date:
|
118
|
-
- Fri, 30 Nov 2012 12:32:31 GMT
|
119
|
-
Content-Type:
|
120
|
-
- text/html
|
121
|
-
Content-Length:
|
122
|
-
- '50'
|
123
|
-
Connection:
|
124
|
-
- keep-alive
|
125
|
-
Vary:
|
126
|
-
- User-Agent,Accept-Encoding
|
127
|
-
body:
|
128
|
-
encoding: US-ASCII
|
129
|
-
string: ! '{"error":"Query parameter ''fromDate'' is not set!"}'
|
130
|
-
http_version:
|
131
|
-
recorded_at: Fri, 30 Nov 2012 12:28:58 GMT
|
132
|
-
recorded_with: VCR 2.3.0
|