Class Index [+]

Quicksearch

Bundler::Source::Path::Installer

Public Class Methods

new(spec, options = {}) click to toggle source
     # File lib/bundler/source.rb, line 376
376:         def initialize(spec, options = {})
377:           @spec              = spec
378:           @bin_dir           = Bundler.requires_sudo? ? "#{Bundler.tmp}/bin" : "#{Bundler.rubygems.gem_dir}/bin"
379:           @gem_dir           = Bundler.rubygems.path(spec.full_gem_path)
380:           @wrappers          = options[:wrappers] || true
381:           @env_shebang       = options[:env_shebang] || true
382:           @format_executable = options[:format_executable] || false
383:         end

Public Instance Methods

generate_bin() click to toggle source
     # File lib/bundler/source.rb, line 385
385:         def generate_bin
386:           return if spec.executables.nil? || spec.executables.empty?
387: 
388:           if Bundler.requires_sudo?
389:             FileUtils.mkdir_p("#{Bundler.tmp}/bin") unless File.exist?("#{Bundler.tmp}/bin")
390:           end
391:           super
392:           if Bundler.requires_sudo?
393:             Bundler.mkdir_p "#{Bundler.rubygems.gem_dir}/bin"
394:             spec.executables.each do |exe|
395:               Bundler.sudo "cp -R #{Bundler.tmp}/bin/#{exe} #{Bundler.rubygems.gem_dir}/bin/"
396:             end
397:           end
398:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.