Sha256: 52a0c1ecd3552bc7ba8487135f20aae18cb8110a05fa8a66812c4a25258c1b1e

Contents?: true

Size: 1.24 KB

Versions: 71

Compression:

Stored size: 1.24 KB

Contents

module Bundler
  class Source
    class Path

      class Installer < Bundler::GemInstaller
        attr_reader :spec

        def initialize(spec, options = {})
          @spec              = spec
          @gem_dir           = Bundler.rubygems.path(spec.full_gem_path)
          @wrappers          = options[:wrappers] || true
          @env_shebang       = options[:env_shebang] || true
          @format_executable = options[:format_executable] || false
          @build_args        = options[:build_args] || Bundler.rubygems.build_args
          @gem_bin_dir       = "#{Bundler.rubygems.gem_dir}/bin"

          if Bundler.requires_sudo?
            @tmp_dir = Bundler.tmp(spec.full_name).to_s
            @bin_dir = "#{@tmp_dir}/bin"
          else
            @bin_dir = @gem_bin_dir
          end
        end

        def generate_bin
          return if spec.executables.nil? || spec.executables.empty?

          super

          if Bundler.requires_sudo?
            Bundler.mkdir_p @gem_bin_dir
            spec.executables.each do |exe|
              Bundler.sudo "cp -R #{@bin_dir}/#{exe} #{@gem_bin_dir}"
            end
          end
        ensure
          Bundler.rm_rf(@tmp_dir) if Bundler.requires_sudo?
        end
      end

    end
  end
end

Version data entries

71 entries across 43 versions & 4 rubygems

Version Path
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/win/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/osx/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/l32/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/l64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/osx/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/l32/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/win/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/l64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/osx/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/l64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/win/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/l32/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/osx/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/l32/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/l64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/win/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/osx/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/win/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/l64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/l32/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb