picgarage 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/MIT-LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Sean Porter
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.org CHANGED
@@ -1,11 +1,31 @@
1
+ * Requirements
2
+
3
+ - Ruby (MRI)
4
+ - RubyGems
5
+
1
6
  * Install
7
+
2
8
  : gem install picgarage
9
+
3
10
  * Usage
11
+
4
12
  ** Tool
13
+
5
14
  : pgupload /path/to/image.jpg
6
- The short URL will be returned & copied to your clipboard
7
- ** Gem
15
+
16
+ The image URL will be returned & copied to your clipboard
17
+
18
+ ** Library
19
+
8
20
  : require 'picgarage'
9
- : picgarage = PicGarage::PicGarage.new
10
- : short_url = picgarage.upload_image('/path/to/image.jpg')
11
- : puts short_url
21
+ : begin
22
+ : picgarage = PicGarage::PicGarage.new
23
+ : image_url = picgarage.upload_image('/path/to/image.jpg')
24
+ : puts image_url
25
+ : rescue => error
26
+ : puts error
27
+ : end
28
+
29
+ * License
30
+
31
+ PicGarage is released under the [[https://github.com/portertech/picgarage/blob/master/MIT-LICENSE.txt][MIT license]].
data/bin/pgupload CHANGED
@@ -15,19 +15,19 @@ begin
15
15
 
16
16
  picgarage = PicGarage::PicGarage.new
17
17
 
18
- short_url = picgarage.upload_image(image)
18
+ image_url = picgarage.upload_image(image)
19
19
 
20
20
  if RUBY_PLATFORM.downcase.include?("darwin")
21
21
 
22
22
  IO.popen('pbcopy', 'r+') do |clipboard|
23
23
 
24
- clipboard.puts short_url
24
+ clipboard.puts image_url
25
25
 
26
26
  end
27
27
 
28
28
  end
29
29
 
30
- puts short_url
30
+ puts image_url
31
31
 
32
32
  rescue => error
33
33
 
data/lib/picgarage.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'rubygems'
1
+ require 'rubygems' if RUBY_VERSION < '1.9.0'
2
2
  require 'json'
3
3
  require 'curb'
4
4
 
data/picgarage.gemspec CHANGED
@@ -1,10 +1,6 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "picgarage/version"
4
-
5
1
  Gem::Specification.new do |s|
6
2
  s.name = "picgarage"
7
- s.version = PicGarage::VERSION
3
+ s.version = "0.0.6"
8
4
  s.platform = Gem::Platform::RUBY
9
5
  s.authors = ["Sean Porter"]
10
6
  s.email = ["portertech@gmail.com"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: picgarage
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.4
5
+ version: 0.0.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sean Porter
@@ -10,8 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-10 00:00:00 +09:00
14
- default_executable:
13
+ date: 2011-08-26 00:00:00 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: json
@@ -47,13 +46,12 @@ extra_rdoc_files: []
47
46
  files:
48
47
  - .gitignore
49
48
  - Gemfile
49
+ - MIT-LICENSE.txt
50
50
  - README.org
51
51
  - Rakefile
52
52
  - bin/pgupload
53
53
  - lib/picgarage.rb
54
- - lib/picgarage/version.rb
55
54
  - picgarage.gemspec
56
- has_rdoc: true
57
55
  homepage: https://github.com/portertech/picgarage
58
56
  licenses: []
59
57
 
@@ -77,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
75
  requirements: []
78
76
 
79
77
  rubyforge_project: picgarage
80
- rubygems_version: 1.6.2
78
+ rubygems_version: 1.8.8
81
79
  signing_key:
82
80
  specification_version: 3
83
81
  summary: A tool & ruby gem for uploading images to PicGarage.net
@@ -1,3 +0,0 @@
1
- module PicGarage
2
- VERSION = "0.0.4"
3
- end