lib/rubysketch/processing.rb in rubysketch-0.2.4 vs lib/rubysketch/processing.rb in rubysketch-0.2.5

- old
+ new

@@ -1052,17 +1052,16 @@ end # @private private def getImage__ (uri, ext) ext ||= File.extname uri - raise "unsupported image type" unless ext =~ /^\.?(png)$/i + raise "unsupported image type -- #{ext}" unless ext =~ /^\.?(png)$/i tmpdir = Pathname(Dir.tmpdir) + Digest::SHA1.hexdigest(self.class.name) path = tmpdir + Digest::SHA1.hexdigest(uri) path = path.sub_ext ext unless path.file? - p "getting #{uri}" URI.open uri do |input| tmpdir.mkdir unless tmpdir.directory? path.open('w') do |output| while buf = input.read(2 ** 16) output.write buf