files that won't cause problems when reloaded TODO expand this list / convert to blacklist
# File lib/sup/modes/console-mode.rb, line 6 def initialize mode @mode = mode end
# File lib/sup/modes/console-mode.rb, line 14 def add_labels(query, *labels) query(query).each { |m| m.labels += labels; m.save Index } end
# File lib/sup/modes/console-mode.rb, line 60 def clear_hooks HookManager.clear nil end
# File lib/sup/modes/console-mode.rb, line 23 def ferret; Index.instance.instance_variable_get :@index; end
# File lib/sup/modes/console-mode.rb, line 25 def loglevel; Redwood::Logger.level; end
# File lib/sup/modes/console-mode.rb, line 10 def query(query) Enumerable::Enumerator.new(Index, :each_message, Index.parse_query(query)) end
# File lib/sup/modes/console-mode.rb, line 34 def reload old_verbose = $VERBOSE $VERBOSE = nil old_features = $".dup begin fs = $".grep(/^sup\//) fs.reject! { |f| not RELOAD_WHITELIST.member? f } fs.each { |f| $".delete f } fs.each do |f| @mode << "reloading #{f}\n" begin require f rescue LoadError => e raise unless e.message =~ /no such file to load/ end end rescue Exception $".clear $".concat old_features raise ensure $VERBOSE = old_verbose end true end
# File lib/sup/modes/console-mode.rb, line 18 def remove_labels(query, *labels) query(query).each { |m| m.labels -= labels; m.save Index } end
# File lib/sup/modes/console-mode.rb, line 26 def set_loglevel(level); Redwood::Logger.level = level; end
# File lib/sup/modes/console-mode.rb, line 28 def special_methods; methods - Object.methods end
# File lib/sup/modes/console-mode.rb, line 22 def xapian; Index.instance.instance_variable_get :@xapian; end