Parent

GemInstaller::GemInteractionHandler

Constants

DEPENDENCY_PROMPT

Attributes

dependent_gem[W]
noninteractive_chooser_class[W]
valid_platform_selector[W]

Public Class Methods

new() click to toggle source
   # File lib/geminstaller/gem_interaction_handler.rb, line 6
6:     def initialize
7:       check_rubygems_version
8:     end

Public Instance Methods

check_rubygems_version() click to toggle source
    # File lib/geminstaller/gem_interaction_handler.rb, line 34
34:     def check_rubygems_version
35:       if GemInstaller::RubyGemsVersionChecker.matches?('>=0.9.5')
36:         # gem_interaction_handler is not used for RubyGems >= 0.9.5
37:         raise RuntimeError.new("Internal GemInstaller Error: GemInteractionHandler should not be used for RubyGems >= 0.9.5")
38:       end
39:     end
dependent_gem_with_platform_specified?(list, noninteractive_chooser) click to toggle source
    # File lib/geminstaller/gem_interaction_handler.rb, line 30
30:     def dependent_gem_with_platform_specified?(list, noninteractive_chooser)
31:       noninteractive_chooser.dependent_gem?(@dependent_gem.name, list) and @dependent_gem.platform
32:     end
handle_ask_yes_no(question) click to toggle source
    # File lib/geminstaller/gem_interaction_handler.rb, line 10
10:     def handle_ask_yes_no(question)
11:       return unless question.index(DEPENDENCY_PROMPT)
12:       message = "Error: RubyGems is prompting to install a required dependency, and you have not " +
13:                 "specified the '--install-dependencies' option for the current gem.  You must modify your " +
14:                 "geminstaller config file to either specify the '--install-depencencies' (-y) " +
15:                 "option, or explicitly add an entry for the dependency gem earlier in the file.\n"
16:       raise GemInstaller::UnauthorizedDependencyPromptError.new(message)
17:     end
handle_choose_from_list(question, list, noninteractive_chooser = nil) click to toggle source
    # File lib/geminstaller/gem_interaction_handler.rb, line 19
19:     def handle_choose_from_list(question, list, noninteractive_chooser = nil)
20:       noninteractive_chooser ||= @noninteractive_chooser_class.new
21:       valid_platforms = nil
22:       if dependent_gem_with_platform_specified?(list, noninteractive_chooser) or noninteractive_chooser.uninstall_list_type?(question)
23:         valid_platforms = [@dependent_gem.platform]
24:       else
25:         valid_platforms = @valid_platform_selector.select(@dependent_gem.platform)
26:       end
27:       noninteractive_chooser.choose(question, list, @dependent_gem.name, @dependent_gem.version, valid_platforms)
28:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.