filebin 0.2.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +1 -0
  2. data/VERSION +1 -1
  3. data/lib/filebin.rb +2 -4
  4. metadata +14 -2
data/Rakefile CHANGED
@@ -15,6 +15,7 @@ begin
15
15
  gem.files = FileList["[A-Z]*", "{bin,generators,lib,spec}/**/*"]
16
16
  gem.add_dependency "hpricot"
17
17
  gem.add_dependency "httpclient"
18
+ gem.add_dependency "urlshort"
18
19
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
19
20
  end
20
21
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.4.2
@@ -7,6 +7,7 @@ require 'rubygems'
7
7
  require 'httpclient'
8
8
  require 'net/http'
9
9
  require 'hpricot'
10
+ require 'urlshort'
10
11
 
11
12
  class Filebin
12
13
  # This method takes a hash containing the variables in the POST
@@ -43,10 +44,7 @@ class Filebin
43
44
 
44
45
  # Returns a shortened link to the uploaded file.
45
46
  def short_link
46
- clnt = HTTPClient.new
47
- res = clnt.get('http://is.gd/api.php', {:longurl => @link} ).content
48
- doc = Hpricot(res)
49
- doc.html
47
+ Isgd.new.short @link
50
48
  end
51
49
 
52
50
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
+ - 4
7
8
  - 2
8
- - 1
9
- version: 0.2.1
9
+ version: 0.4.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - dougsko
@@ -53,6 +53,18 @@ dependencies:
53
53
  version: "0"
54
54
  type: :runtime
55
55
  version_requirements: *id003
56
+ - !ruby/object:Gem::Dependency
57
+ name: urlshort
58
+ prerelease: false
59
+ requirement: &id004 !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ segments:
64
+ - 0
65
+ version: "0"
66
+ type: :runtime
67
+ version_requirements: *id004
56
68
  description: Command line interface to filebin.ca
57
69
  email: dougtko@gmail.com
58
70
  executables: