method
spec_from_gem

v2_6_3 -
Show latest stable
-
0 notes -
Class: RubygemsIntegration
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3 (0)
- What's this?
spec_from_gem(path, policy = nil)
public
Hide source
# File lib/bundler/rubygems_integration.rb, line 304 def spec_from_gem(path, policy = nil) require "rubygems/security" require "bundler/psyched_yaml" gem_from_path(path, security_policies[policy]).spec rescue Gem::Package::FormatError raise GemspecError, "Could not read gem at #{path}. It may be corrupted." rescue Exception, Gem::Exception, Gem::Security::Exception => e if e.is_a?(Gem::Security::Exception) || e.message =~ /unknown trust policy|unsigned gem/ || e.message =~ /couldn't verify (meta)?data signature/ raise SecurityError, "The gem #{File.basename(path, ".gem")} can't be installed because " "the security policy didn't allow it, with the message: #{e.message}" else raise e end end