diff --git a/VERSION b/VERSION index 77d6f4c..3c82e72 100644 --- a/VERSION +++ b/VERSION @@ -1 +1,5 @@ +<<<<<<< HEAD 0.0.0 +======= +0.9.9 +>>>>>>> wombleton/master diff --git a/lib/holidays.rb b/lib/holidays.rb index b818ed0..f4b72c7 100644 --- a/lib/holidays.rb +++ b/lib/holidays.rb @@ -252,6 +252,8 @@ private # Found sub region wild-card regions.delete_if do |reg| if reg.to_s =~ /_$/ + prefix = reg.to_s.split('_').first + raise UnknownRegionError unless @@regions.include?(prefix.to_sym) or begin require "holidays/#{prefix}"; rescue LoadError; false; end regions << @@regions.select { |dr| dr.to_s =~ Regexp.new("^#{reg}") } true end @@ -261,7 +263,7 @@ private require "holidays/north_america" if regions.include?(:us) # special case for north_america/US cross-linking - raise UnknownRegionError unless regions.all? { |r| r == :any or @@regions.include?(r) or begin require "holidays/#{r.to_s.split('_').first}"; rescue LoadError; false; end } + raise UnknownRegionError unless regions.all? { |r| r == :any or @@regions.include?(r) or begin require "holidays/#{r.to_s}"; rescue LoadError; false; end } regions end diff --git a/test/test_multiple_regions.rb b/test/test_multiple_regions.rb index 1815352..2201616 100644 --- a/test/test_multiple_regions.rb +++ b/test/test_multiple_regions.rb @@ -11,6 +11,10 @@ class MultipleRegionsTests < Test::Unit::TestCase h = Holidays.on(Date.civil(2008,12,26), :ie) assert_equal 'St. Stephen\'s Day', h[0][:name] + h = Holidays.on(Date.civil(2008,5,9), :gb_) + assert_equal 'Liberation Day', (h[0] || {})[:name] + + h = Holidays.on(Date.civil(2008,5,9), :je) assert_equal 'Liberation Day', h[0][:name] diff --git a/wombleton-holidays.gemspec b/wombleton-holidays.gemspec index 1d0678a..ddd207e 100644 --- a/wombleton-holidays.gemspec +++ b/wombleton-holidays.gemspec @@ -5,7 +5,11 @@ Gem::Specification.new do |s| s.name = %q{wombleton-holidays} +<<<<<<< HEAD s.version = "0.9.7" +======= + s.version = "0.9.9" +>>>>>>> wombleton/master s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Alex Dunae", "Rowan Crawford"] @@ -105,7 +109,12 @@ Gem::Specification.new do |s| "test/test_date.rb", "test/test_helper.rb", "test/test_holidays.rb", +<<<<<<< HEAD "test/test_multiple_regions.rb" +======= + "test/test_multiple_regions.rb", + "wombleton-holidays.gemspec" +>>>>>>> wombleton/master ] s.homepage = %q{http://github.com/wombleton/holidays} s.rdoc_options = ["--charset=UTF-8"]