Skip to content
Browse files

get rid of u.nu service and bin since it has been discontinued

  • Loading branch information...
1 parent 3e3f2ab commit df2869eabf898ea7578ee7cb1bf09360c4ba4d16 @rafmagana committed
Showing with 1 addition and 61 deletions.
  1. +1 −1 bin/mush
  2. +0 −40 bin/unu
  3. +0 −20 lib/mush/services/unu.rb
View
2 bin/mush
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
puts "the actual commands are:"
-puts "bitly, isgd, owly, unu and shorten"
+puts "bitly, isgd, owly and shorten"
View
40 bin/unu
@@ -1,40 +0,0 @@
-#!/usr/bin/env ruby
-
-STDOUT.sync = true
-
-$LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
-
-require 'rubygems'
-require 'optparse'
-require 'mush'
-
-ORIGINAL_ARGV = ARGV.dup
-
-#the defaults
-options = {}
-
-opts = OptionParser.new do |opts|
- opts.banner = <<-EOF
-Usage:
- unu url
-EOF
-
- opts.on("-v", "--version", "Print the version number and exit") do
- options[:version] = true
- end
-end
-
-opts.parse!
-
-if options[:version]
- abort("Version " + Mush.version)
-end
-
-options[:url] = ARGV.first if ARGV.length == 1
-
-# validate
-unless options[:url]
- abort("You must specify a URL to use the u.nu service")
-end
-
-puts Mush::Services::Unu.new.shorten options[:url]
View
20 lib/mush/services/unu.rb
@@ -1,20 +0,0 @@
-module Mush
-
- module Services
-
- class Unu < Service
- base_uri 'http://u.nu/'
-
- def shorten(url)
- raise InvalidURI.new("Please provide a valid URI") if url.empty?
-
- options = {}
- options[:query] = {:url => url}
- get('/unu-api-simple', options).body.chomp
- end
-
- end
-
- end
-
-end

0 comments on commit df2869e

Please sign in to comment.
Something went wrong with that request. Please try again.