diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-02-17 22:20:47 -0600 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-02-23 15:42:55 -0600 |
commit | 700aabb26dc04587c3d90d26b913bd70cb7c2f63 (patch) | |
tree | a6c0076e1bfc8800ca666ab27cbbe23a3f552ad7 | |
parent | cb6e8891c6320210861dfc106b4adb80368def1a (diff) | |
download | bundler-700aabb26dc04587c3d90d26b913bd70cb7c2f63.tar.gz |
[Path] Set spec installed_by_version so RubyGems will know it has an extensions dir
-rw-r--r-- | lib/bundler/source/path.rb | 1 | ||||
-rw-r--r-- | spec/commands/clean_spec.rb | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb index 0bb5f1b8b3..0e00837ba6 100644 --- a/lib/bundler/source/path.rb +++ b/lib/bundler/source/path.rb @@ -137,6 +137,7 @@ module Bundler Dir["#{expanded_path}/#{@glob}"].sort_by {|p| -p.split(File::SEPARATOR).size }.each do |file| next unless spec = Bundler.load_gemspec(file) spec.source = self + spec.installed_by_version = Gem::Version.create(Gem::VERSION) # Validation causes extension_dir to be calculated, which depends # on #source, so we validate here instead of load_gemspec Bundler.rubygems.validate(spec) diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb index 95035555d4..37f569b267 100644 --- a/spec/commands/clean_spec.rb +++ b/spec/commands/clean_spec.rb @@ -660,9 +660,11 @@ describe "bundle clean" do gem "very_simple_git_binary", :git => "#{lib_path("very_simple_git_binary-1.0")}", :ref => "#{revision}" G - bundle "install --path vendor/bundle" - bundle :clean + bundle! "install --path vendor/bundle" + expect(vendored_gems("bundler/gems/extensions")).to exist + expect(vendored_gems("bundler/gems/very_simple_git_binary-1.0-#{revision[0..11]}")).to exist + bundle! :clean expect(out).to eq("") expect(vendored_gems("bundler/gems/extensions")).to exist |