lib/link_shrink/cli.rb in link_shrink-0.0.5 vs lib/link_shrink/cli.rb in link_shrink-0.0.6
- old
+ new
@@ -17,10 +17,11 @@
@json = false
@qr_code = false
@tiny_url = false
@google = false
@is_gd = false
+ @owly = false
opts.version = LinkShrink::VERSION
opts.banner = <<MSG
Usage: link_shrink [OPTION] [URL]
Description:
LinkShrink, Turn long and nasty links into short urls.
@@ -34,10 +35,14 @@
opts.on_head('-i', '--isgd', 'use Is.gd') do
@is_gd = :true
end
+ opts.on_head('-o', '--owly', 'use Owly') do
+ @owly = :true
+ end
+
opts.on_head('-g', '--google', 'use Google (Default)') do
@google = :true
end
opts.on_head('-j', '--json', 'return JSON response') do
@@ -82,9 +87,11 @@
case
when @tiny_url
'TinyUrl'
when @is_gd
'IsGd'
+ when @owly
+ 'Owly'
else
'Google'
end
end
end