picgarage 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/bin/pgupload CHANGED
@@ -11,18 +11,26 @@ end
11
11
 
12
12
  image = ARGV[0]
13
13
 
14
- picgarage = PicGarage::PicGarage.new
14
+ begin
15
15
 
16
- short_url = picgarage.upload_image(image)
16
+ picgarage = PicGarage::PicGarage.new
17
17
 
18
- if RUBY_PLATFORM.downcase.include?("darwin")
18
+ short_url = picgarage.upload_image(image)
19
19
 
20
- IO.popen('pbcopy', 'r+') do |clipboard|
20
+ if RUBY_PLATFORM.downcase.include?("darwin")
21
21
 
22
- clipboard.puts short_url
22
+ IO.popen('pbcopy', 'r+') do |clipboard|
23
+
24
+ clipboard.puts short_url
25
+
26
+ end
23
27
 
24
28
  end
25
29
 
26
- end
30
+ puts short_url
27
31
 
28
- puts short_url
32
+ rescue => error
33
+
34
+ puts error
35
+
36
+ end
@@ -1,3 +1,3 @@
1
1
  module PicGarage
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/picgarage.rb CHANGED
@@ -28,19 +28,19 @@ module PicGarage
28
28
 
29
29
  else
30
30
 
31
- "Bad response from server, please try again."
31
+ raise "Bad response from server, please try again."
32
32
 
33
33
  end
34
34
 
35
35
  else
36
36
 
37
- "Given image type is not accepted."
37
+ raise "Given image type is not accepted."
38
38
 
39
39
  end
40
40
 
41
41
  else
42
42
 
43
- "Given image does not exist."
43
+ raise "Given image does not exist."
44
44
 
45
45
  end
46
46
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: picgarage
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sean Porter