imgur2 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +7 -1
- data/lib/imgur2.rb +12 -5
- metadata +42 -54
data/CHANGELOG.rdoc
CHANGED
data/lib/imgur2.rb
CHANGED
@@ -9,13 +9,20 @@ require 'json'
|
|
9
9
|
# client.upload f
|
10
10
|
# }
|
11
11
|
class Imgur2 < Struct.new(:key)
|
12
|
-
VERSION = '1.2.
|
12
|
+
VERSION = '1.2.1'
|
13
13
|
|
14
14
|
def self.run argv
|
15
|
-
client
|
16
|
-
fh
|
17
|
-
|
18
|
-
|
15
|
+
client = Imgur2.new '65aea9a07b4f6110c90248ffa247d41a'
|
16
|
+
fh = get_image argv[0]
|
17
|
+
response = client.upload(fh)
|
18
|
+
|
19
|
+
if response.key? 'error'
|
20
|
+
$stderr.puts response['error']['message']
|
21
|
+
exit 1
|
22
|
+
end
|
23
|
+
|
24
|
+
link = response['upload']['links']['original']
|
25
|
+
link = client.follow_redirect link
|
19
26
|
client.paste link
|
20
27
|
puts link
|
21
28
|
ensure
|
metadata
CHANGED
@@ -1,51 +1,49 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: imgur2
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 2
|
9
|
-
- 0
|
10
|
-
version: 1.2.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Aaron Patterson
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
12
|
+
date: 2012-02-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rdoc
|
16
|
+
requirement: &70106106285840 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.10'
|
22
|
+
type: :development
|
23
23
|
prerelease: false
|
24
|
-
|
24
|
+
version_requirements: *70106106285840
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: hoe
|
27
|
+
requirement: &70106106285380 !ruby/object:Gem::Requirement
|
25
28
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 2
|
32
|
-
- 9
|
33
|
-
- 1
|
34
|
-
version: 2.9.1
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.12'
|
35
33
|
type: :development
|
36
|
-
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70106106285380
|
37
36
|
description: Upload stuff to imgur. Yay.
|
38
|
-
email:
|
37
|
+
email:
|
39
38
|
- aaron@tenderlovemaking.com
|
40
|
-
executables:
|
39
|
+
executables:
|
41
40
|
- imgur2
|
42
41
|
extensions: []
|
43
|
-
|
44
|
-
extra_rdoc_files:
|
42
|
+
extra_rdoc_files:
|
45
43
|
- Manifest.txt
|
46
44
|
- CHANGELOG.rdoc
|
47
45
|
- README.rdoc
|
48
|
-
files:
|
46
|
+
files:
|
49
47
|
- .autotest
|
50
48
|
- CHANGELOG.rdoc
|
51
49
|
- Manifest.txt
|
@@ -53,40 +51,30 @@ files:
|
|
53
51
|
- Rakefile
|
54
52
|
- bin/imgur2
|
55
53
|
- lib/imgur2.rb
|
56
|
-
has_rdoc: true
|
57
54
|
homepage: http://github.com/tenderlove/imgur2
|
58
55
|
licenses: []
|
59
|
-
|
60
56
|
post_install_message:
|
61
|
-
rdoc_options:
|
57
|
+
rdoc_options:
|
62
58
|
- --main
|
63
59
|
- README.rdoc
|
64
|
-
require_paths:
|
60
|
+
require_paths:
|
65
61
|
- lib
|
66
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
63
|
none: false
|
68
|
-
requirements:
|
69
|
-
- -
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
|
72
|
-
|
73
|
-
- 0
|
74
|
-
version: "0"
|
75
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
69
|
none: false
|
77
|
-
requirements:
|
78
|
-
- -
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
|
81
|
-
segments:
|
82
|
-
- 0
|
83
|
-
version: "0"
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
84
74
|
requirements: []
|
85
|
-
|
86
75
|
rubyforge_project: imgur2
|
87
|
-
rubygems_version: 1.
|
76
|
+
rubygems_version: 1.8.11
|
88
77
|
signing_key:
|
89
78
|
specification_version: 3
|
90
79
|
summary: Upload stuff to imgur
|
91
80
|
test_files: []
|
92
|
-
|