diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-02-17 23:55:59 -0600 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-02-23 15:42:55 -0600 |
commit | 86453c17fbaed0e4fce9980c42139dcfee202f30 (patch) | |
tree | 195cb91562fd7c62d557674c147715ef8d05e4bd | |
parent | 8bcb7d09f9c7dff79865be7af496be175d45f4a6 (diff) | |
download | bundler-86453c17fbaed0e4fce9980c42139dcfee202f30.tar.gz |
Ensure rubygems functionality is done in rubygemsintegration
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 9 | ||||
-rw-r--r-- | lib/bundler/source/git.rb | 2 | ||||
-rw-r--r-- | lib/bundler/source/path.rb | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index b00f3dea13..4e5ca7d1f8 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -62,6 +62,15 @@ module Bundler nil end + def set_installed_by_version(spec, installed_by_version = Gem::VERSION) + return unless spec.respond_to?(:installed_by_version=) + spec.installed_by_version = Gem::Version.create(installed_by_version) + end + + def spec_missing_extensions?(spec) + !spec.respond_to?(:missing_extensions?) || spec.missing_extensions? + end + def path(obj) obj.to_s end diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index 51fcd44dfd..228ab61a67 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -223,7 +223,7 @@ module Bundler private def build_extensions(installer) - super if installer.spec.missing_extensions? + super if Bundler.rubygems.spec_missing_extensions?(installer.spec) end def serialize_gemspecs_in(destination) diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb index 0e00837ba6..9790ba5164 100644 --- a/lib/bundler/source/path.rb +++ b/lib/bundler/source/path.rb @@ -137,7 +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) + Bundler.rubygems.set_installed_by_version(spec) # Validation causes extension_dir to be calculated, which depends # on #source, so we validate here instead of load_gemspec Bundler.rubygems.validate(spec) |