diff options
Diffstat (limited to 'lib/bundler/endpoint_specification.rb')
-rw-r--r-- | lib/bundler/endpoint_specification.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb index 863544b1f9..87cb352efa 100644 --- a/lib/bundler/endpoint_specification.rb +++ b/lib/bundler/endpoint_specification.rb @@ -94,7 +94,7 @@ module Bundler def _local_specification return unless @loaded_from && File.exist?(local_specification_path) - eval(File.read(local_specification_path)).tap do |spec| + eval(File.read(local_specification_path), nil, local_specification_path).tap do |spec| spec.loaded_from = @loaded_from end end @@ -125,7 +125,11 @@ module Bundler next unless v case k.to_s when "checksum" - @checksum = v.last + begin + @checksum = Checksum.from_api(v.last, @spec_fetcher.uri) + rescue ArgumentError => e + raise ArgumentError, "Invalid checksum for #{full_name}: #{e.message}" + end when "rubygems" @required_rubygems_version = Gem::Requirement.new(v) when "ruby" |