Created
February 27, 2018 19:05
-
-
Save makimoto/ce8aab25e03ba212d672226200c3bbf4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'stackprof' | |
require 'tmpdir' | |
$LOAD_PATH.unshift('./lib') | |
require 'bundler' | |
StackProf.run(mode: :cpu, raw: true, out: 'out.dump') do | |
bundler_gemspec = Gem::Specification.load(File.expand_path("./bundler.gemspec")) | |
bundler_gemspec.instance_variable_set(:@full_gem_path, File.expand_path(".")) | |
bundler_gemspec.activate if bundler_gemspec.respond_to?(:activate) | |
1.times do | |
Dir.mktmpdir do |dir| | |
require "bundler/friendly_errors" | |
Bundler.with_friendly_errors do | |
require "bundler/cli" | |
File.delete('TestGemfile.lock') if File.exists?('TestGemfile.lock') | |
ENV['BUNDLE_PATH'] = dir | |
args = ["install", "--gemfile=TestGemfile"] | |
Bundler::CLI.start(args, debug: true) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment