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