bin/imagebin in dougsko-imagebin-0.1.7 vs bin/imagebin in dougsko-imagebin-0.2.3
- old
+ new
@@ -19,11 +19,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
require 'rubygems'
require 'optparse'
-require 'httpclient'
+require 'imagebin'
options = { "t" => "file",
"name" => "",
"tags" => "",
"description" => "",
@@ -63,10 +63,11 @@
end
end
opts.parse(ARGV)
-clnt = HTTPClient.new("http://imagebin.ca/upload.php")
File.open(options["f"]) do |file|
options["f"] = file
- puts clnt.post('http://imagebin.ca/upload.php', options).content.match(/http.+?\.html/)
+ Imagebin.new(options) do |link|
+ puts link
+ end
end