lib/sportdb/updater.rb in sportdb-1.7.5 vs lib/sportdb/updater.rb in sportdb-1.7.6
- old
+ new
@@ -20,11 +20,11 @@
return nil if repo_path.nil? # no match/mapping found; cancel download
season_path = season_key.gsub( '/', '_') # convert 2013/14 to 2013_14
###
- # e.g. https://raw.github.com/openfootball/at-austria/master/2013_14/bl.txt
+ # e.g. https://raw.github.com/openfootball/at-austria/master/2013_14
dlurl = "https://raw.github.com/openfootball/#{repo_path}/master"
dlurl << "/#{folder_path}" if folder_path.present?
dlurl << "/#{season_path}"
dlurl
@@ -36,11 +36,21 @@
### allow * for regex match w/ .+
map = [
[ 'at', 'at-austria' ],
[ 'at.*', 'at-austria' ],
[ 'de', 'de-deutschland' ],
+ [ 'de.*', 'de-deutschland' ],
+ [ 'en', 'en-england' ],
+ [ 'es', 'es-espana' ],
+ [ 'it', 'it-italy' ],
[ 'be', 'europe', 'be-belgium' ], # NB: europe/be-belgium
+ [ 'ro', 'europe', 'ro-romania' ],
[ 'cl', 'europe' ],
+ [ 'el', 'europe' ],
+ [ 'br', 'br-brazil' ],
+ [ 'mx', 'mx-mexico' ], # todo: add mx.* for clausura etc ??
+ [ 'euro', 'euro-cup', ],
+ [ 'world', 'world-cup' ],
[ 'world.*', 'world-cup' ]]
map.each do |entry|
pattern = entry[0]
path = [ entry[1], entry[2] ] # repo n folder path
\ No newline at end of file