Skip to content

Commit

Permalink
Ignore additional files added in tzdata 2014g.
Browse files Browse the repository at this point in the history
  • Loading branch information
philr committed Aug 31, 2014
1 parent b51be04 commit 22fabc5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion lib/tzinfo/data/tzdataparser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,14 @@ def initialize(input_dir, output_dir)
# Reads the tzdata source and generates the classes. Progress information
# is written to standard out.
def execute
# Note that the backzone file is ignored. backzone contains alternative
# definitions of certain zones, primarily for pre-1970 data. It is not
# recommended for ordinary use and the tzdata Makefile does not
# install its entries by default.

files = Dir.entries(@input_dir).select do |file|
file =~ /\A[^\.]+\z/ &&
!%w(leapseconds leapseconds.awk leap-seconds.list Makefile README SOURCE).include?(file) &&
!%w(backzone checktab.awk leapseconds leapseconds.awk leap-seconds.list CONTRIBUTING Makefile NEWS README SOURCE Theory zoneinfo2tdf.pl).include?(file) &&
File.file?(File.join(@input_dir, file))
end

Expand Down
2 changes: 1 addition & 1 deletion test/tc_definitions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TCDefinitions < Minitest::Test
def data_files
files = Dir.entries(DATA_DIR).select do |name|
name =~ /\A[^\.]+\z/ &&
!%w(leapseconds leapseconds.awk leap-seconds.list Makefile README SOURCE).include?(name) &&
!%w(backzone checktab.awk leapseconds leapseconds.awk leap-seconds.list CONTRIBUTING Makefile NEWS README SOURCE Theory zoneinfo2tdf.pl).include?(name) &&
File.file?(File.join(DATA_DIR, name))
end

Expand Down
2 changes: 1 addition & 1 deletion test/tc_timezone_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class TCTimezoneIndex < Minitest::Test
DATA_DIR = File.expand_path(File.join(File.dirname(__FILE__), '..', 'data'))

def data_files
files = Dir.entries(DATA_DIR).select {|name| name =~ /^[^\.]+$/ && name != 'leapseconds'}
files = Dir.entries(DATA_DIR).select {|name| name =~ /\A[^\.]+\z/ && !%w(backzone leapseconds).include?(name) }
files.collect {|name| File.join(DATA_DIR, name)}
end

Expand Down

0 comments on commit 22fabc5

Please sign in to comment.