method
s3_source_auth

v2_6_3 -
Show latest stable
-
0 notes -
Class: RemoteFetcher
- 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?
s3_source_auth(uri)
private
Hide source
# File lib/rubygems/remote_fetcher.rb, line 389 def s3_source_auth(uri) return [uri.user, uri.password] if uri.user && uri.password s3_source = Gem.configuration[:s3_source] || Gem.configuration['s3_source'] host = uri.host raise FetchError.new("no s3_source key exists in .gemrc", "s3://#{host}") unless s3_source auth = s3_source[host] || s3_source[host.to_sym] raise FetchError.new("no key for host #{host} in s3_source in .gemrc", "s3://#{host}") unless auth id = auth[:id] || auth['id'] secret = auth[:secret] || auth['secret'] raise FetchError.new("s3_source for #{host} missing id or secret", "s3://#{host}") unless id and secret [id, secret] end