Permalink
Browse files

Fixed bug of coping URL to clipboard on Lion

  • Loading branch information...
1 parent dbfe75c commit 343d48af2d415b80e029fab75641b5541d538089 Isshu Rakusai committed Jan 14, 2012
Showing with 9 additions and 6 deletions.
  1. +4 −4 Gyazo.app/Contents/Info.plist
  2. +5 −2 Gyazo.app/Contents/Resources/script
@@ -25,7 +25,7 @@
<key>CFBundleExecutable</key>
<string>Gyazo</string>
<key>CFBundleGetInfoString</key>
- <string>Gyazo 1.0 Copyright 2010 Toshiyuki Masui</string>
+ <string>Gyazo 1.0.1 Copyright 2010 Toshiyuki Masui</string>
<key>CFBundleIconFile</key>
<string>appIcon.icns</string>
<key>CFBundleIdentifier</key>
@@ -37,11 +37,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.0</string>
+ <string>1.0.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.0</string>
+ <string>1.0.1</string>
<key>LSEnvironment</key>
<dict>
<key>APP_BUNDLER</key>
@@ -54,7 +54,7 @@
<key>NSAppleScriptEnabled</key>
<false/>
<key>NSHumanReadableCopyright</key>
- <string>Gyazo 1.0 Copyright 2010 Toshiyuki Masui</string>
+ <string>Gyazo 1.0.1 Copyright 2010 Toshiyuki Masui</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
@@ -40,7 +40,7 @@ boundary = '----BOUNDARYBOUNDARY----'
HOST = 'gyazo.com'
CGI = '/upload.cgi'
-UA = 'Gyazo/1.0'
+UA = 'Gyazo/1.0.1'
data = <<EOF
--#{boundary}\r
@@ -63,7 +63,10 @@ header ={
Net::HTTP.start(HOST,80){|http|
res = http.post(CGI,data,header)
url = res.response.body
- system "echo -n #{url} | pbcopy"
+ IO.popen("pbcopy","r+"){|io|
+ io.write url
+ io.close
+ }
system "open #{url}"
# save id

0 comments on commit 343d48a

Please sign in to comment.