Class: Bundler::Standalone
- Inherits:
-
Object
- Object
- Bundler::Standalone
- Defined in:
- lib/bundler/installer/standalone.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(groups, definition) ⇒ Standalone
constructor
A new instance of Standalone.
Constructor Details
#initialize(groups, definition) ⇒ Standalone
Returns a new instance of Standalone.
5 6 7 |
# File 'lib/bundler/installer/standalone.rb', line 5 def initialize(groups, definition) @specs = definition.specs_for(groups) end |
Instance Method Details
#generate ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/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 reverse_rubygems_kernel_mixin paths.each do |path| if Pathname.new(path).absolute? file.puts %($:.unshift "#{path}") else file.puts %($:.unshift File.expand_path("\#{__dir__}/#{path}")) end end end end |