aws-keychain-util 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "aws-keychain-util"
7
- gem.version = '0.0.4'
7
+ gem.version = '0.0.5'
8
8
  gem.authors = ["Zach Wily"]
9
9
  gem.email = ["zach@zwily.com"]
10
10
  gem.description = %q{Helps manage a keychain of AWS credentials on OS X.}
@@ -4,6 +4,8 @@ module AwsKeychainUtil
4
4
  class CredentialProvider
5
5
  include AWS::Core::CredentialProviders::Provider
6
6
 
7
+ attr_reader :item, :keychain
8
+
7
9
  def initialize(item = 'AWS', keychain = nil)
8
10
  @item, @keychain = item, keychain
9
11
  end
@@ -11,6 +13,7 @@ module AwsKeychainUtil
11
13
  def get_credentials
12
14
  keychain = @keychain ? Keychain.open(@keychain) : Keychain.default
13
15
  item = keychain.generic_passwords.where(:label => @item).first
16
+ return {} unless item
14
17
  {
15
18
  access_key_id: item.attributes[:account],
16
19
  secret_access_key: item.password
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-keychain-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-26 00:00:00.000000000 Z
12
+ date: 2013-05-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby-keychain