In Files

  • bundler/installer/standalone.rb

Parent

Methods

Class/Module Index [+]

Quicksearch

Bundler::Standalone

Public Class Methods

new(groups, definition) click to toggle source
 
               # File bundler/installer/standalone.rb, line 5
def initialize(groups, definition)
  @specs = groups.empty? ? definition.requested_specs : definition.specs_for(groups.map(&:to_sym))
end
            

Public Instance Methods

generate() click to toggle source
 
               # File bundler/installer/standalone.rb, line 9
def generate
  SharedHelpers.filesystem_access(bundler_path) do |p|
    FileUtils.mkdir_p(p)
  end
  File.open File.join(bundler_path, "setup.rb"), "w" do |file|
    file.puts "require 'rbconfig'"
    file.puts "ruby_engine = RUBY_ENGINE"
    file.puts "ruby_version = RbConfig::CONFIG[\"ruby_version\"]"
    file.puts "path = File.expand_path('..', __FILE__)"
    paths.each do |path|
      file.puts %Q($:.unshift "\#{path}/#{path}")
    end
  end
end