diff options
author | hut <hut@lavabit.com> | 2009-06-12 01:26:41 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-06-12 01:26:41 +0200 |
commit | 8a6f5eab0b884acd58ed86c00a30b57901442be6 (patch) | |
tree | 31672fce003ba464c922eb86188e854f7b7ccaa8 /ranger.rb | |
parent | 9ed06dcd632e3bf6c19fc3943985e9841f1fed41 (diff) | |
download | ranger-8a6f5eab0b884acd58ed86c00a30b57901442be6.tar.gz |
renamed Interface module to CLI, cleanups
Diffstat (limited to 'ranger.rb')
-rwxr-xr-x | ranger.rb | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/ranger.rb b/ranger.rb index 5b074317..d503dc50 100755 --- a/ranger.rb +++ b/ranger.rb @@ -1,14 +1,6 @@ #!/usr/bin/ruby -Ku version = '0.2.2' -# Log details -# 0 = do not log -# 1 = log fatalities -# 2 = log errors -# 3 = log everything -LOG_LEVEL = 3 -#LOG_LEVEL = 0 - require 'pathname' $: << MYDIR = File.dirname(Pathname.new(__FILE__).realpath) @@ -40,10 +32,8 @@ require 'ostruct' class OpenStruct; def __table__() @table end end require 'thread' -require 'interface/ncurses.rb' -for file in Dir["#{MYDIR}/code/**/*.rb"] - file.slice! 0..MYDIR.size - require file +for file in Dir.glob "#{MYDIR}/code/**/*.rb" + require file [MYDIR.size + 1 ... -3] end require 'data/screensaver/clock.rb' @@ -52,9 +42,13 @@ unless ARGV.empty? or File.directory?(pwd) exec(Fm.getfilehandler_frompath(pwd)) end -include Interface +include CLI include Debug +Debug.setup( :name => 'nyuron', + :stream => File.open('/tmp/errorlog', 'a'), + :level => 3 ) + ERROR_STREAM = File.open('/tmp/errorlog', 'a') Signal.trap(Scheduler::UPDATE_SIGNAL) do @@ -67,7 +61,7 @@ begin ensure log "exiting!" log "" - closei if Interface.running? + closei if CLI.running? # Fm.dump ERROR_STREAM.close |