Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tasks/updater/network.rb')
-rw-r--r--tasks/updater/network.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tasks/updater/network.rb b/tasks/updater/network.rb
index 7799f95..6502bb8 100644
--- a/tasks/updater/network.rb
+++ b/tasks/updater/network.rb
@@ -25,7 +25,7 @@ class Updater
log_http_get_files files, path_url, false
files.map do |name|
Thread.start {
- contents[name] = open("#{path_url}/#{name}").read
+ contents[name] = URI.open("#{path_url}/#{name}").read
WRITE_FILES_MUTEX.synchronize { write_cached_files path, name => contents[name] }
}
end.each(&:join)
@@ -62,7 +62,7 @@ class Updater
File.read(cache_path, mode: 'rb')
else
log_http_get_file url, false
- content = open(url).read
+ content = URI.open(url).read
File.open(cache_path, 'wb') { |f| f.write content }
content
end