summaryrefslogtreecommitdiff
path: root/lib/bundler/source/git.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-03-31 10:47:39 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-03-31 11:47:30 -0500
commit574eaf4505bad2a9ba6fc09417567d1a30131d65 (patch)
treed9d22004ffc8fe90fb93d8e8049d70065b0ca34e /lib/bundler/source/git.rb
parentfa61ff501492b74cb11cff1fef82aa9038784511 (diff)
downloadbundler-seg-validate-git-specs.tar.gz
[Source::Git] Only validate specs once (on download)seg-validate-git-specs
Instead of validating every time we setup, only do so when we re-serialize the spec
Diffstat (limited to 'lib/bundler/source/git.rb')
-rw-r--r--lib/bundler/source/git.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index 30ff27c446..c95c94583f 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -234,6 +234,7 @@ module Bundler
# The gemspecs we cache should already be evaluated.
spec = Bundler.load_gemspec(spec_path)
next unless spec
+ Bundler.rubygems.validate(spec)
File.open(spec_path, "wb") {|file| file.write(spec.to_ruby) }
end
end
@@ -298,6 +299,9 @@ module Bundler
raise unless Bundler.feature_flag.allow_offline_install?
Bundler.ui.warn "Using cached git data because of network errors"
end
+
+ # no-op, since we validate when re-serializing the gemspec
+ def validate_spec(_spec); end
end
end
end