Sha256: 847ed2abdaba0ece296e7e9ea14677f6832235f7cac6411b04e96bda3d552abe

Contents?: true

Size: 572 Bytes

Versions: 1

Compression:

Stored size: 572 Bytes

Contents

#!/usr/bin/env ruby

require 'oauth'
require 't'
require 'twitter'

# Output message to $stderr, prefixed with the program name
def pute(message="")
  $stderr.puts "#{$0}: #{message}"
end

begin
  T::CLI.start(ARGV)
rescue Interrupt
  pute "Quitting..."
  exit 1
rescue OAuth::Unauthorized
  pute "Authorization failed"
  exit 1
rescue Twitter::Error::Unauthorized => error
  pute "#{error.message} Run `#{$0} authorize --consumer-key=CONSUMER_KEY --consumer-secret=CONSUMER_SECRET` to authorize."
  exit 1
rescue Twitter::Error => error
  pute error.message
  exit 1
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
t-0.9.9 bin/t