Skip to content

Instantly share code, notes, and snippets.

@makimoto
Created February 27, 2018 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makimoto/ce8aab25e03ba212d672226200c3bbf4 to your computer and use it in GitHub Desktop.
Save makimoto/ce8aab25e03ba212d672226200c3bbf4 to your computer and use it in GitHub Desktop.
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