# File lib/bundler/installer.rb, line 12 12: def run(options) 13: # Create the BUNDLE_PATH directory 14: begin 15: Bundler.bundle_path.mkpath unless Bundler.bundle_path.exist? 16: rescue Errno::EEXIST 17: raise PathError, "Could not install to path `#{Bundler.settings[:path]}` " + 18: "because of an invalid symlink. Remove the symlink so the directory can be created." 19: end 20: 21: if Bundler.settings[:frozen] 22: @definition.ensure_equivalent_gemfile_and_lockfile(options[:deployment]) 23: end 24: 25: if dependencies.empty? 26: Bundler.ui.warn "The Gemfile specifies no dependencies" 27: return 28: end 29: 30: if Bundler.default_lockfile.exist? && !options["update"] 31: begin 32: tmpdef = Definition.build(Bundler.default_gemfile, Bundler.default_lockfile, nil) 33: local = true unless tmpdef.new_platform? || tmpdef.missing_specs.any? 34: rescue BundlerError 35: end 36: end 37: 38: # Since we are installing, we can resolve the definition 39: # using remote specs 40: unless local 41: options["local"] ? 42: @definition.resolve_with_cache! : 43: @definition.resolve_remotely! 44: end 45: 46: # Must install gems in the order that the resolver provides 47: # as dependencies might actually affect the installation of 48: # the gem. 49: specs.each do |spec| 50: spec.source.fetch(spec) if spec.source.respond_to?(:fetch) 51: 52: # unless requested_specs.include?(spec) 53: # Bundler.ui.debug " * Not in requested group; skipping." 54: # next 55: # end 56: 57: Bundler.rubygems.with_build_args [Bundler.settings["build.#{spec.name}"]] do 58: spec.source.install(spec) 59: Bundler.ui.debug "from #{spec.loaded_from} " 60: end 61: 62: Bundler.ui.info "" 63: generate_bundler_executable_stubs(spec) if Bundler.settings[:bin] 64: FileUtils.rm_rf(Bundler.tmp) 65: end 66: 67: lock 68: end
# File lib/bundler/installer.rb, line 72 72: def generate_bundler_executable_stubs(spec) 73: bin_path = Bundler.bin_path 74: template = File.read(File.expand_path('../templates/Executable', __FILE__)) 75: relative_gemfile_path = Bundler.default_gemfile.relative_path_from(bin_path) 76: ruby_command = Thor::Util.ruby_command 77: 78: spec.executables.each do |executable| 79: next if executable == "bundle" 80: File.open "#{bin_path}/#{executable}", 'w', 0755 do |f| 81: f.puts ERB.new(template, nil, '-').result(binding) 82: end 83: end 84: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.