Sha256: b8fb7638639ba6b3968597df1fcf21a17834825eaee28a6bf7ea70a8d74212e9

Contents?: true

Size: 514 Bytes

Versions: 11

Compression:

Stored size: 514 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
  pute "Run `#{$0} authorize` to authorize."
  exit 1
rescue Twitter::Error => error
  pute error.message
  exit 1
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
t-1.6.0 bin/t
t-1.5.1 bin/t
t-1.5.0 bin/t
t-1.4.0 bin/t
t-1.3.1 bin/t
t-1.3.0 bin/t
t-1.2.0 bin/t
t-1.1.1 bin/t
t-1.1.0 bin/t
t-1.0.1 bin/t
t-1.0.0 bin/t