lib/gyazo.rb in gyazo-0.0.3 vs lib/gyazo.rb in gyazo-0.0.5

- old
+ new

@@ -3,11 +3,11 @@ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) require 'net/http' class Gyazo - VERSION = '0.0.3' + VERSION = '0.0.5' def initialize(app = '/Applications/Gyazo.app') @user = IO.popen("whoami", "r+").gets.chomp @program = app @idfile = "/Users/#{@user}/Library/Gyazo/id" @@ -21,10 +21,10 @@ end def upload(imagefile) tmpfile = "/tmp/image_upload#{$$}.png" if imagefile && File.exist?(imagefile) then - system "sips -s format png \"#{imagefile}\" --out \"#{tmpfile}\"" + system "sips -s format png \"#{imagefile}\" --out \"#{tmpfile}\" > /dev/null" end imagedata = File.read(tmpfile) File.delete(tmpfile) boundary = '----BOUNDARYBOUNDARY----'