1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

tool/downloader.rb: Made Unicode data file location available

via :unicode Symbol.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
duerst 2014-09-24 08:55:09 +00:00
parent 9c0f09dae0
commit d2172c8d19
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Tue Sep 24 17:55:55 2014 Martin Duerst <duerst@it.aoyama.ac.jp>
* tool/downloader.rb: Made Unicode data file location available
via :unicode Symbol.
Tue Sep 24 10:45:45 2014 Martin Duerst <duerst@it.aoyama.ac.jp>
* tool/downloader.rb: Small fix to documentation comment.

View file

@ -9,6 +9,10 @@ class Downloader
"https://rubygems.org/downloads/#{name}"
end
def self.unicode(name)
"http://www.unicode.org/Public/UCD/latest/ucd/#{name}"
end
def self.uri_to_download(url, name)
from, url = url
case from
@ -16,6 +20,8 @@ class Downloader
url = gnu(url || name)
when :rubygems, :gems
url = rubygems(url || name)
when :unicode
url = unicode(url || name)
when Symbol
raise ArgumentError, "unkonwn site - #{from}"
else