lib/client/client.rb in factor-0.0.92 vs lib/client/client.rb in factor-0.0.93
- old
+ new
@@ -59,11 +59,12 @@
code.call("downloading '#{channel['zip_url']}'")
# URI of the zip file containing the module
uri = URI.parse(channel['zip_url'])
# temp file to store the zip for download
- temp_file = Tempfile.new([uri.path.gsub(/\W+/,'-'), '.zip'], :encoding => 'ascii-8bit')
+ #temp_file = Tempfile.new([uri.path.gsub(/\W+/,'-'), '.zip'], :encoding => 'ascii-8bit')
+ temp_file = Tempfile.new([uri.to_s.gsub(/\W+/,'-'), '.zip'])
# temp directory where zip will be decompressed
unzip_dir=temp_file.path[0..-5]
# download
@@ -75,11 +76,11 @@
code.call("unzipping '#{channel['name']}'")
# unzip download zip into unzipped directory
unzip(temp_file.path,unzip_dir)
code.call("loading '#{channel['zip_url']}' into engine")
- Dir.glob("#{unzip_dir}/**/*.rb").each do |file|
- engine.load_channel(file)
+ Dir.glob("#{unzip_dir}/**/*.rb").each do |ruby_file_name|
+ engine.load_channel(ruby_file_name)
end
end
\ No newline at end of file