enrico 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,23 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :development do
9
+ gem "bundler"
10
+ gem "jeweler"
11
+ gem "simplecov"
12
+ gem "rdoc"
13
+ gem "shoulda"
14
+ gem "minitest"
15
+ gem 'httparty'
16
+ end
17
+
18
+ group :test do
19
+ gem 'webmock', "< 1.9"
20
+ gem 'vcr'
21
+ gem 'turn'
22
+ gem 'rake'
23
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,58 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activesupport (3.2.9)
5
+ i18n (~> 0.6)
6
+ multi_json (~> 1.0)
7
+ addressable (2.3.2)
8
+ ansi (1.4.3)
9
+ crack (0.3.1)
10
+ git (1.2.5)
11
+ httparty (0.9.0)
12
+ multi_json (~> 1.0)
13
+ multi_xml
14
+ i18n (0.6.1)
15
+ jeweler (1.8.4)
16
+ bundler (~> 1.0)
17
+ git (>= 1.2.5)
18
+ rake
19
+ rdoc
20
+ json (1.7.5)
21
+ minitest (4.3.2)
22
+ multi_json (1.3.7)
23
+ multi_xml (0.5.1)
24
+ rake (10.0.2)
25
+ rdoc (3.12)
26
+ json (~> 1.4)
27
+ shoulda (3.3.2)
28
+ shoulda-context (~> 1.0.1)
29
+ shoulda-matchers (~> 1.4.1)
30
+ shoulda-context (1.0.1)
31
+ shoulda-matchers (1.4.1)
32
+ activesupport (>= 3.0.0)
33
+ simplecov (0.7.1)
34
+ multi_json (~> 1.0)
35
+ simplecov-html (~> 0.7.1)
36
+ simplecov-html (0.7.1)
37
+ turn (0.9.6)
38
+ ansi
39
+ vcr (2.3.0)
40
+ webmock (1.8.9)
41
+ addressable (>= 2.2.7)
42
+ crack (>= 0.1.7)
43
+
44
+ PLATFORMS
45
+ ruby
46
+
47
+ DEPENDENCIES
48
+ bundler
49
+ httparty
50
+ jeweler
51
+ minitest
52
+ rake
53
+ rdoc
54
+ shoulda
55
+ simplecov
56
+ turn
57
+ vcr
58
+ webmock (< 1.9)
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Kalle Saas
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
File without changes
data/README.rdoc ADDED
@@ -0,0 +1,19 @@
1
+ = enrico
2
+
3
+ Description goes here.
4
+
5
+ == Contributing to enrico
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
9
+ * Fork the project.
10
+ * Start a feature/bugfix branch.
11
+ * Commit and push until you are happy with your contribution.
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2012 Kalle Saas. See LICENSE.txt for
18
+ further details.
19
+
data/Rakefile ADDED
@@ -0,0 +1,45 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "enrico"
18
+ gem.homepage = "http://github.com/fluxsaas/enrico"
19
+ gem.license = "MIT"
20
+ gem.summary = "A ruby wrapper around enrico holiday API"
21
+ gem.description = "http://github.com/fluxsaas/enrico"
22
+ gem.email = "kalle@easypep.de"
23
+ gem.authors = ["Kalle Saas"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rake/testtask'
29
+ Rake::TestTask.new(:test) do |test|
30
+ test.libs << 'lib' << 'test'
31
+ test.pattern = 'spec/**/*_spec.rb'
32
+ test.verbose = true
33
+ end
34
+
35
+ task :default => :test
36
+
37
+ require 'rdoc/task'
38
+ Rake::RDocTask.new do |rdoc|
39
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
40
+
41
+ rdoc.rdoc_dir = 'rdoc'
42
+ rdoc.title = "enrico #{version}"
43
+ rdoc.rdoc_files.include('README*')
44
+ rdoc.rdoc_files.include('lib/**/*.rb')
45
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
data/enrico.gemspec ADDED
@@ -0,0 +1,80 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "enrico"
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Kalle Saas"]
12
+ s.date = "2012-11-29"
13
+ s.description = "http://github.com/fluxsaas/enrico"
14
+ s.email = "kalle@easypep.de"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.md",
18
+ "README.rdoc"
19
+ ]
20
+ s.files = [
21
+ ".document",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.md",
26
+ "README.rdoc",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "enrico.gemspec",
30
+ "lib/enrico.rb",
31
+ "lib/enrico/country.rb",
32
+ "lib/enrico/vacation_day.rb",
33
+ "spec/fixtures/vcr_cassettes/is_public_holiday.yml",
34
+ "spec/fixtures/vcr_cassettes/public_holidays_in_date_range.yml",
35
+ "spec/fixtures/vcr_cassettes/public_holidays_in_month.yml",
36
+ "spec/fixtures/vcr_cassettes/public_holidays_in_year.yml",
37
+ "spec/fixtures/vcr_cassettes/supported_countries.yml",
38
+ "spec/lib/enrico/country_public_holidays_for_month_spec.rb",
39
+ "spec/lib/enrico/country_spec.rb",
40
+ "spec/lib/enrico/is_public_holiday_spec.rb",
41
+ "spec/lib/enrico/vacation_day_spec.rb",
42
+ "spec/spec_helper.rb"
43
+ ]
44
+ s.homepage = "http://github.com/fluxsaas/enrico"
45
+ s.licenses = ["MIT"]
46
+ s.require_paths = ["lib"]
47
+ s.rubygems_version = "1.8.23"
48
+ s.summary = "A ruby wrapper around enrico holiday API"
49
+
50
+ if s.respond_to? :specification_version then
51
+ s.specification_version = 3
52
+
53
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
54
+ s.add_development_dependency(%q<bundler>, [">= 0"])
55
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
56
+ s.add_development_dependency(%q<simplecov>, [">= 0"])
57
+ s.add_development_dependency(%q<rdoc>, [">= 0"])
58
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
59
+ s.add_development_dependency(%q<minitest>, [">= 0"])
60
+ s.add_development_dependency(%q<httparty>, [">= 0"])
61
+ else
62
+ s.add_dependency(%q<bundler>, [">= 0"])
63
+ s.add_dependency(%q<jeweler>, [">= 0"])
64
+ s.add_dependency(%q<simplecov>, [">= 0"])
65
+ s.add_dependency(%q<rdoc>, [">= 0"])
66
+ s.add_dependency(%q<shoulda>, [">= 0"])
67
+ s.add_dependency(%q<minitest>, [">= 0"])
68
+ s.add_dependency(%q<httparty>, [">= 0"])
69
+ end
70
+ else
71
+ s.add_dependency(%q<bundler>, [">= 0"])
72
+ s.add_dependency(%q<jeweler>, [">= 0"])
73
+ s.add_dependency(%q<simplecov>, [">= 0"])
74
+ s.add_dependency(%q<rdoc>, [">= 0"])
75
+ s.add_dependency(%q<shoulda>, [">= 0"])
76
+ s.add_dependency(%q<minitest>, [">= 0"])
77
+ s.add_dependency(%q<httparty>, [">= 0"])
78
+ end
79
+ end
80
+
@@ -0,0 +1,82 @@
1
+ # encoding: utf-8
2
+
3
+ module Enrico
4
+ class Country
5
+
6
+ attr_accessor :country_code, :region
7
+
8
+ include HTTParty
9
+
10
+ base_uri 'http://kayaposoft.com/enrico/json/v1.0'
11
+
12
+ def initialize(country_code, region = nil)
13
+ self.country_code = country_code
14
+ self.region = region
15
+ end
16
+
17
+ def self.all
18
+ self.get_countries
19
+ end
20
+
21
+ def details
22
+ self.class.all.select{|country| country["countryCode"] == self.country_code }.first
23
+ end
24
+
25
+ def public_holidays_for_month(date)
26
+ response = self.get_public_holidays_for_month(date)
27
+ self.vacation_days_from_response(response)
28
+ end
29
+
30
+ def public_holidays_for_year(date)
31
+ response = self.get_public_holidays_for_year(date)
32
+ self.vacation_days_from_response(response)
33
+ end
34
+
35
+ def public_holidays_for_date_range(from_date, to_date)
36
+ response = self.get_public_holidays_for_date_range(from_date, to_date)
37
+ self.vacation_days_from_response(response)
38
+ end
39
+
40
+ def is_public_holiday?(date)
41
+ response = self.is_public_holiday(date)
42
+ response["isPublicHoliday"]
43
+ end
44
+
45
+ def method_missing(name, *args, &block)
46
+ method_name = name.to_s.camelize(:lower)
47
+ details.has_key?(method_name) ? details[method_name] : super
48
+ end
49
+
50
+ def self.get_countries
51
+ JSON.parse(self.get("/?action=getSupportedCountries"))
52
+ end
53
+
54
+ def vacation_days_from_response(response)
55
+ vacation_days = []
56
+ response.each do |vacation_day|
57
+ vacation_days.push( Enrico::VacationDay.new(vacation_day) )
58
+ end
59
+ vacation_days
60
+ end
61
+
62
+ def is_public_holiday(date)
63
+ JSON.parse(self.class.get("/?action=isPublicHoliday&date=#{date.strftime("%d-%m-%Y")}&country=#{self.country_code}&region=#{self.region}"))
64
+ end
65
+
66
+ def get_public_holidays_for_month(date)
67
+ JSON.parse(self.class.get("/?action=getPublicHolidaysForMonth&month=#{date.month}&year=#{date.year}&country=#{self.country_code}&region=#{self.region}"))
68
+ end
69
+
70
+ def get_public_holidays_for_year(date)
71
+ JSON.parse(self.class.get("/?action=getPublicHolidaysForYear&year=#{date.year}&country=#{self.country_code}&region=#{self.region}"))
72
+ end
73
+
74
+ def get_public_holidays_for_date_range(from_date, to_date)
75
+ JSON.parse(self.class.get("/?action=getPublicHolidaysForDateRange&fromDate=#{from_date.strftime("%d-%m-%Y")}&toDate=#{to_date.strftime("%d-%m-%Y")}&country=#{self.country_code}&region=#{self.region}"))
76
+ end
77
+
78
+ end
79
+ end
80
+
81
+
82
+
@@ -0,0 +1,15 @@
1
+ # encoding: utf-8
2
+
3
+ module Enrico
4
+ class VacationDay
5
+
6
+ attr_accessor :date, :local_name, :english_name
7
+
8
+ def initialize(args)
9
+ self.date = Date.new( args["date"]["year"].to_i, args["date"]["month"].to_i, args["date"]["day"].to_i )
10
+ self.local_name = args["localName"]
11
+ self.english_name = args["englishName"]
12
+ end
13
+
14
+ end
15
+ end
data/lib/enrico.rb ADDED
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+
3
+ require "httparty"
4
+ require 'json'
5
+ require 'active_support/all'
6
+
7
+ Dir[File.dirname(__FILE__) + '/enrico/*.rb'].each do |file|
8
+ require file
9
+ end
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://kayaposoft.com/enrico/json/v1.0/?action=isPublicHoliday&country=ger&date=01-01-2012&region=
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 17:17:50 GMT
19
+ Content-Type:
20
+ - text/html
21
+ Content-Length:
22
+ - '24'
23
+ Connection:
24
+ - keep-alive
25
+ Vary:
26
+ - User-Agent,Accept-Encoding
27
+ body:
28
+ encoding: US-ASCII
29
+ string: ! '{"isPublicHoliday":true}'
30
+ http_version:
31
+ recorded_at: Thu, 29 Nov 2012 17:14:16 GMT
32
+ - request:
33
+ method: get
34
+ uri: http://kayaposoft.com/enrico/json/v1.0/?action=isPublicHoliday&country=ger&date=29-01-2012&region=
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ''
38
+ headers: {}
39
+ response:
40
+ status:
41
+ code: 200
42
+ message: OK
43
+ headers:
44
+ Server:
45
+ - nginx
46
+ Date:
47
+ - Thu, 29 Nov 2012 17:19:13 GMT
48
+ Content-Type:
49
+ - text/html
50
+ Content-Length:
51
+ - '25'
52
+ Connection:
53
+ - keep-alive
54
+ Vary:
55
+ - User-Agent,Accept-Encoding
56
+ body:
57
+ encoding: US-ASCII
58
+ string: ! '{"isPublicHoliday":false}'
59
+ http_version:
60
+ recorded_at: Thu, 29 Nov 2012 17:15:38 GMT
61
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,103 @@
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&region=&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&region=&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
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,74 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://kayaposoft.com/enrico/json/v1.0/?action=getPublicHolidaysForMonth&country=ger&month=1&region=&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