Merge remote branch 'wombleton/master'
This commit is contained in:
commit
b7a288fdcd
|
@ -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
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
||||
|
|
|
@ -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"]
|
||||
|
|
Loading…
Reference in a new issue