Parent

Bundler::Source::Path::Installer

Public Class Methods

new(spec, options = {}) click to toggle source
     # File lib/bundler/source.rb, line 366
366:         def initialize(spec, options = {})
367:           @spec              = spec
368:           @bin_dir           = Bundler.requires_sudo? ? "#{Bundler.tmp}/bin" : "#{Gem.dir}/bin"
369:           @gem_dir           = spec.full_gem_path
370:           @wrappers          = options[:wrappers] || true
371:           @env_shebang       = options[:env_shebang] || true
372:           @format_executable = options[:format_executable] || false
373:         end

Public Instance Methods

generate_bin() click to toggle source
     # File lib/bundler/source.rb, line 375
375:         def generate_bin
376:           return if spec.executables.nil? || spec.executables.empty?
377: 
378:           if Bundler.requires_sudo?
379:             FileUtils.mkdir_p("#{Bundler.tmp}/bin") unless File.exist?("#{Bundler.tmp}/bin")
380:           end
381:           super
382:           if Bundler.requires_sudo?
383:             Bundler.mkdir_p "#{Gem.dir}/bin"
384:             spec.executables.each do |exe|
385:               Bundler.sudo "cp -R #{Bundler.tmp}/bin/#{exe} #{Gem.dir}/bin/"
386:             end
387:           end
388:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.