Project

General

Profile

« Previous | Next » 

Revision 5174b503

Added by Marc Dequènes about 14 years ago

  • ID 5174b503ce8e352baae3100d518158bf23758b87

[evol] added support for multiple worlds (closes #144)

View differences:

bin/shadowwalker
:debug => false,
:expert => false,
:handles => false,
:world_name => nil,
:shadow_name => nil
}
......
opt.on("-d", "--debug", "Output debug info without being formated") {|t| $program_options[:debug] = true }
opt.on("-e", "--expert", "Output extra info for expert users") {|t| $program_options[:expert] = true }
opt.on("-H", "--handles", "Output with handles (objects/field/... keys used for manipulations)") {|t| $program_options[:handles] = true }
opt.on("-w WORLD", "--world WORLD", "Choose world to enter") {|t| $program_options[:world_name] = t }
opt.on("-s SHADOW", "--shadow SHADOW", "Choose shadow to travel through") {|t| $program_options[:shadow_name] = t }
end
......
def execute(args)
config = LdapShadows::Config.instance
config.load_global_config([File.join(ENV['HOME'], ".shadowwalker")])
config.load_world_config($program_options[:world_name], [File.join(ENV['HOME'], ".shadowwalker")])
begin
@shadow = config.load_shadow($program_options[:shadow_name])
rescue ActiveLdap::Error => e

Also available in: Unified diff