Sha256: d0ad8bf5a2bf4c015e6ea17fb24bb754e1a671a1921a5d919e3a2dbf24e3f7c2
Contents?: true
Size: 920 Bytes
Versions: 6
Compression:
Stored size: 920 Bytes
Contents
#!/usr/bin/env 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
6 entries across 6 versions & 2 rubygems
Version | Path |
---|---|
thartmx-0.2.2 | bin/rrtm |
thartmx-0.2.1 | bin/rrtm |
thartmx-0.2 | bin/rrtm |
thartmx-0.1.9 | bin/rrtm |
thartm-0.1.6 | bin/rrtm |
thartm-0.1.5 | bin/rrtm |