lib/sportdb/reader.rb in sportdb-1.8.16 vs lib/sportdb/reader.rb in sportdb-1.8.17

- old
+ new

@@ -123,11 +123,12 @@ reader.read( name, club: true, country_id: country.id ) end elsif name =~ /(?:^|\/)teams/ reader = TeamReader.new( include_path ) reader.read( name, club: is_club_fixture?( name ) ) - elsif name =~ /\/(\d{4}|\d{4}_\d{2})\// || name =~ /\/(\d{4}|\d{4}_\d{2})$/ - # e.g. must match /2012/ or /2012_13/ + elsif name =~ /\/(\d{4}|\d{4}_\d{2})(--[^\/]+)?\// || + name =~ /\/(\d{4}|\d{4}_\d{2})$/ + # e.g. must match /2012/ or /2012_13/ or /2012--xxx/ or /2012_13--xx/ # or /2012 or /2012_13 e.g. brazil/2012 or brazil/2012_13 reader = GameReader.new( include_path ) reader.read( name ) else logger.error "unknown sportdb fixture type >#{name}<"