Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gemspec #6

Merged
merged 1 commit into from
Oct 3, 2017
Merged

Fix gemspec #6

merged 1 commit into from
Oct 3, 2017

Conversation

joshuaspence
Copy link
Contributor

Currently this gem fails to load because the aws-sdk is not declared as a dependency:

[!] There was an error while loading `hiera-eyaml-kms.gemspec`: cannot load such file -- aws-sdk
Does it try to require a relative path? That's been removed in Ruby 1.9. Bundler cannot continue.

 #  from /etc/puppet/vendor/bundle/ruby/2.3.0/bundler/gems/hiera-eyaml-kms-f223553dbd50/hiera-eyaml-kms.gemspec:4
 #  -------------------------------------------
 #  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
 >  require 'hiera/backend/eyaml/encryptors/kms'
 #
 #  -------------------------------------------

This diff fixes this issue and also bumps the AWS SDK to version 3.

Currently this gem fails to load because the `aws-sdk` is not declared as a dependency:

```
[!] There was an error while loading `hiera-eyaml-kms.gemspec`: cannot load such file -- aws-sdk
Does it try to require a relative path? That's been removed in Ruby 1.9. Bundler cannot continue.

 #  from /etc/puppet/vendor/bundle/ruby/2.3.0/bundler/gems/hiera-eyaml-kms-f223553dbd50/hiera-eyaml-kms.gemspec:4
 #  -------------------------------------------
 #  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
 >  require 'hiera/backend/eyaml/encryptors/kms'
 #
 #  -------------------------------------------
```

This diff fixes this issue and also bumps the AWS SDK to version 3.
@adenot
Copy link
Owner

adenot commented Sep 26, 2017

Thanks for the PR.

I noticed it is rolling back the changes from PR #4 , was that on purpose or you made your changes based on an old revision?

@joshuaspence
Copy link
Contributor Author

I didn't roll back the changes from #4, I just moved the profile option to the Aws::KMS::Client object. Otherwise I was getting the following error:

Error: Evaluation Error: Error while evaluating a Resource Statement, undefined method `access_key_id'

This error can be reproduced with the following code (running on an EC2 instance):

require 'aws-sdk-kms'

creds = Aws::SharedCredentials.new(profile_name: 'default')
kms = Aws::KMS::Client.new(region: 'ap-southeast-2', credentials: creds)
kms.decrypt({ciphertext_blob: ''})

@adenot adenot merged commit 182d7be into adenot:master Oct 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants