lib/gyazo.rb in gyazo-0.2.0 vs lib/gyazo.rb in gyazo-0.2.1
- old
+ new
@@ -4,11 +4,11 @@
require 'net/http'
require 'json'
class Gyazo
- VERSION = '0.2.0'
+ VERSION = '0.2.1'
def initialize(app = '/Applications/Gyazo.app')
@user = IO.popen("whoami", "r+").gets.chomp
@program = app
@idfile = "/Users/#{@user}/Library/Gyazo/id"
@@ -19,9 +19,11 @@
elsif File.exist?(@old_idfile) then
@id = File.read(@old_idfile).chomp
end
@host = 'gyazo.com'
end
+
+ attr_accessor :id
def info(gyazoid)
gyazoid =~ /[0-9a-f]{32}/
gyazoid = $&
cgi = "/api/image/get?image_id=#{gyazoid}"