Gem::StreamUI
# File lib/geminstaller/enhanced_stream_ui.rb, line 51
51: def alert_error(statement, question=nil)
52: # if alert_error got called due to a GemInstaller::UnexpectedPromptError, re-throw it
53: last_exception = $!
54: if last_exception.class == GemInstaller::UnauthorizedDependencyPromptError || last_exception.class == GemInstaller::RubyGemsExit
55: raise last_exception
56: end
57: # otherwise let alert_error continue normally...
58: super(statement, question)
59: end
# File lib/geminstaller/enhanced_stream_ui.rb, line 24
24: def ask(question)
25: raise_unexpected_prompt_error(question)
26: end
# File lib/geminstaller/enhanced_stream_ui.rb, line 10
10: def ask_yes_no(question, default=nil)
11: if GemInstaller::RubyGemsVersionChecker.matches?('<=0.9.4')
12: # Using defaults, we expect no interactive prompts RubyGems >= 0.9.5
13: begin
14: @gem_interaction_handler.handle_ask_yes_no(question)
15: rescue Exception => e
16: @outs.print(question)
17: @outs.flush
18: raise e
19: end
20: end
21: raise_unexpected_prompt_error(question)
22: end
# File lib/geminstaller/enhanced_stream_ui.rb, line 28
28: def choose_from_list(question, list)
29: if GemInstaller::RubyGemsVersionChecker.matches?('<=0.9.4')
30: # Using defaults, we expect no interactive prompts RubyGems >= 0.9.5
31: @gem_interaction_handler.handle_choose_from_list(question, list)
32: else
33: list_string = list.join("\n")
34: question_and_list = "#{question}\n#{list_string}"
35: raise_unexpected_prompt_error(question_and_list)
36: end
37: end
# File lib/geminstaller/enhanced_stream_ui.rb, line 62
62: def raise_error(status)
63: raise GemInstaller::GemInstallerError.new("RubyGems exited abnormally. Status: #{status}\n")
64: end
# File lib/geminstaller/enhanced_stream_ui.rb, line 66
66: def raise_unexpected_prompt_error(question)
67: raise GemInstaller::UnexpectedPromptError.new("GemInstaller Internal Error - Unexpected prompt received from RubyGems: '#{question}'.")
68: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.