picgarage 0.0.4 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE.txt +20 -0
- data/README.org +25 -5
- data/bin/pgupload +3 -3
- data/lib/picgarage.rb +1 -1
- data/picgarage.gemspec +1 -5
- metadata +4 -6
- data/lib/picgarage/version.rb +0 -3
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
|
-
|
7
|
-
|
15
|
+
|
16
|
+
The image URL will be returned & copied to your clipboard
|
17
|
+
|
18
|
+
** Library
|
19
|
+
|
8
20
|
: require 'picgarage'
|
9
|
-
:
|
10
|
-
:
|
11
|
-
:
|
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
|
-
|
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
|
24
|
+
clipboard.puts image_url
|
25
25
|
|
26
26
|
end
|
27
27
|
|
28
28
|
end
|
29
29
|
|
30
|
-
puts
|
30
|
+
puts image_url
|
31
31
|
|
32
32
|
rescue => error
|
33
33
|
|
data/lib/picgarage.rb
CHANGED
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 =
|
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.
|
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-
|
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.
|
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
|
data/lib/picgarage/version.rb
DELETED