Merge remote branch 'wombleton/master'

master
Alex Dunae 2010-11-12 13:27:22 -08:00
commit b7a288fdcd
4 changed files with 20 additions and 1 deletions

View File

@ -1 +1,5 @@
<<<<<<< HEAD
0.0.0
=======
0.9.9
>>>>>>> wombleton/master

View File

@ -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

View File

@ -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]

View File

@ -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"]