Sha256: 46307c6b020760ee204ab9fc1a805cd49592e663b3c8faca26dd345eeecaa441
Contents?: true
Size: 916 Bytes
Versions: 4
Compression:
Stored size: 916 Bytes
Contents
#!/usr/bin/ruby require File.dirname(__FILE__) + '/../lib/thartm.rb' CONFIGFILE = File.join(File.expand_path(ENV['HOME']), '.rtm') begin @@config = YAML.load_file(CONFIGFILE) rescue raise "please create a .rtm file in your $HOME" end #ENV['TZ'] = @@config['tz'] # validating token unless @@config['token'] @rtm = ThaRememberTheMilk.new(@@config['key'],@@config['secret']) puts "please authorize this program: open the following url and puts the frob value back here." puts @rtm.auth_url frob = gets auth = @rtm.auth.getToken('frob' => frob.chomp) token_file = File.open(CONFIGFILE,"+w") token_file << "token: " + auth.token puts "restart the program now" exit end cli = CommandLineInterface.new(@@config['key'],@@config['secret'],@@config['token']) if ARGV[0] begin cli.send ARGV[0] rescue Exception => e puts e, "command #{ARGV[0]} is not available" cli.help end else cli.tasks end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
thartm-0.1.4 | bin/rrtm |
thartm-0.1.3 | bin/rrtm |
thartm-0.1.2 | bin/rrtm |
thartm-0.1.1 | bin/rrtm |