10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/minigems/script_helper.rb', line 10
def run_command(command_name, args)
args.unshift command_name.to_s
do_configuration(args)
cmd_manager = @command_manager_class.instance
config_args = Gem.configuration[command_name.to_s]
config_args = case config_args
when String
config_args.split ' '
else
Array(config_args)
end
Command.(command_name, config_args)
cmd_manager.run(Gem.configuration.args)
rescue Gem::SystemExitException
cmd_manager.cmd
ensure
cmd_manager.cmd
end
|