awskeyring 1.9.3 → 1.9.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.
- checksums.yaml +4 -4
 - data/LICENSE.txt +1 -1
 - data/README.md +1 -1
 - data/awskeyring.gemspec +1 -1
 - data/lib/awskeyring/version.rb +1 -1
 - data/lib/awskeyring_command.rb +20 -30
 - data/man/awskeyring.5 +1 -1
 - metadata +4 -6
 - data/Gemfile +0 -20
 - data/Rakefile +0 -63
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: b6ba49e965bca0b0058320cec1abfaaad640ce032c8e0307e1eb00c234de1290
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 74c07eac3bf8080a776460a6466e789e6c18a31880fc619ea8ce2dca200b5d01
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 93fe4ab30ce3b64de1ca11f3db11253593c5aba9935bb9b766ab17121f8fd4ae931ce3ac99769ca97bb00682b13b8909092e2741e95f4aa6fdffc967edeb345a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 39ababe4689fd33f5c5600adb08646e3e42fa0a67e5e93b69d608c346d90b4628ec828e35f1646038904f9b1e4f0017ed62e756222791f24cf4ae14acd275fd2
         
     | 
    
        data/LICENSE.txt
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -2,7 +2,7 @@ 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
            * [](https://travis-ci.com/servian/awskeyring)
         
     | 
| 
      
 5 
     | 
    
         
            +
            * [](https://app.travis-ci.com/github/servian/awskeyring)
         
     | 
| 
       6 
6 
     | 
    
         
             
            * [](https://badge.fury.io/rb/awskeyring)
         
     | 
| 
       7 
7 
     | 
    
         
             
            * [](https://opensource.org/licenses/MIT)
         
     | 
| 
       8 
8 
     | 
    
         
             
            * [](https://rubygems.org/gems/awskeyring)
         
     | 
    
        data/awskeyring.gemspec
    CHANGED
    
    | 
         @@ -15,7 +15,7 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       15 
15 
     | 
    
         
             
              spec.homepage      = Awskeyring::HOMEPAGE
         
     | 
| 
       16 
16 
     | 
    
         
             
              spec.licenses      = ['MIT']
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
              spec.files         =  
     | 
| 
      
 18 
     | 
    
         
            +
              spec.files         = %w[awskeyring.gemspec README.md LICENSE.txt] + Dir['exe/*', 'lib/**/*.rb', 'man/*.5', 'i18n/*']
         
     | 
| 
       19 
19 
     | 
    
         
             
              spec.bindir        = 'exe'
         
     | 
| 
       20 
20 
     | 
    
         
             
              spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
         
     | 
| 
       21 
21 
     | 
    
         
             
              spec.require_paths = ['lib']
         
     | 
    
        data/lib/awskeyring/version.rb
    CHANGED
    
    
    
        data/lib/awskeyring_command.rb
    CHANGED
    
    | 
         @@ -364,21 +364,16 @@ class AwskeyringCommand < Thor # rubocop:disable Metrics/ClassLength 
     | 
|
| 
       364 
364 
     | 
    
         
             
                end
         
     | 
| 
       365 
365 
     | 
    
         
             
                item_hash = age_check_and_get(account: account, no_token: true)
         
     | 
| 
       366 
366 
     | 
    
         | 
| 
       367 
     | 
    
         
            -
                 
     | 
| 
       368 
     | 
    
         
            -
                   
     | 
| 
       369 
     | 
    
         
            -
             
     | 
| 
       370 
     | 
    
         
            -
             
     | 
| 
       371 
     | 
    
         
            -
             
     | 
| 
       372 
     | 
    
         
            -
             
     | 
| 
       373 
     | 
    
         
            -
             
     | 
| 
       374 
     | 
    
         
            -
             
     | 
| 
       375 
     | 
    
         
            -
             
     | 
| 
       376 
     | 
    
         
            -
             
     | 
| 
       377 
     | 
    
         
            -
                  Awskeyring.delete_token(account: account, message: '# Removing STS credentials')
         
     | 
| 
       378 
     | 
    
         
            -
                rescue Aws::Errors::ServiceError => e
         
     | 
| 
       379 
     | 
    
         
            -
                  warn e.to_s
         
     | 
| 
       380 
     | 
    
         
            -
                  exit 1
         
     | 
| 
       381 
     | 
    
         
            -
                end
         
     | 
| 
      
 367 
     | 
    
         
            +
                new_creds = Awskeyring::Awsapi.get_token(
         
     | 
| 
      
 368 
     | 
    
         
            +
                  code: code,
         
     | 
| 
      
 369 
     | 
    
         
            +
                  role_arn: (Awskeyring.get_role_arn(role_name: role) if role),
         
     | 
| 
      
 370 
     | 
    
         
            +
                  duration: default_duration(options[:duration], role, code),
         
     | 
| 
      
 371 
     | 
    
         
            +
                  mfa: item_hash[:mfa],
         
     | 
| 
      
 372 
     | 
    
         
            +
                  key: item_hash[:key],
         
     | 
| 
      
 373 
     | 
    
         
            +
                  secret: item_hash[:secret],
         
     | 
| 
      
 374 
     | 
    
         
            +
                  user: ENV.fetch('USER', 'awskeyring')
         
     | 
| 
      
 375 
     | 
    
         
            +
                )
         
     | 
| 
      
 376 
     | 
    
         
            +
                Awskeyring.delete_token(account: account, message: '# Removing STS credentials')
         
     | 
| 
       382 
377 
     | 
    
         | 
| 
       383 
378 
     | 
    
         
             
                Awskeyring.add_token(
         
     | 
| 
       384 
379 
     | 
    
         
             
                  account: account,
         
     | 
| 
         @@ -409,18 +404,13 @@ class AwskeyringCommand < Thor # rubocop:disable Metrics/ClassLength 
     | 
|
| 
       409 
404 
     | 
    
         | 
| 
       410 
405 
     | 
    
         
             
                path = options[:path] || 'console'
         
     | 
| 
       411 
406 
     | 
    
         | 
| 
       412 
     | 
    
         
            -
                 
     | 
| 
       413 
     | 
    
         
            -
                   
     | 
| 
       414 
     | 
    
         
            -
             
     | 
| 
       415 
     | 
    
         
            -
             
     | 
| 
       416 
     | 
    
         
            -
             
     | 
| 
       417 
     | 
    
         
            -
             
     | 
| 
       418 
     | 
    
         
            -
             
     | 
| 
       419 
     | 
    
         
            -
                  )
         
     | 
| 
       420 
     | 
    
         
            -
                rescue Aws::Errors::ServiceError => e
         
     | 
| 
       421 
     | 
    
         
            -
                  warn e.to_s
         
     | 
| 
       422 
     | 
    
         
            -
                  exit 1
         
     | 
| 
       423 
     | 
    
         
            -
                end
         
     | 
| 
      
 407 
     | 
    
         
            +
                login_url = Awskeyring::Awsapi.get_login_url(
         
     | 
| 
      
 408 
     | 
    
         
            +
                  key: cred[:key],
         
     | 
| 
      
 409 
     | 
    
         
            +
                  secret: cred[:secret],
         
     | 
| 
      
 410 
     | 
    
         
            +
                  token: cred[:token],
         
     | 
| 
      
 411 
     | 
    
         
            +
                  path: path,
         
     | 
| 
      
 412 
     | 
    
         
            +
                  user: ENV.fetch('USER', 'awskeyring')
         
     | 
| 
      
 413 
     | 
    
         
            +
                )
         
     | 
| 
       424 
414 
     | 
    
         | 
| 
       425 
415 
     | 
    
         
             
                if options['no-open']
         
     | 
| 
       426 
416 
     | 
    
         
             
                  puts login_url
         
     | 
| 
         @@ -436,8 +426,8 @@ class AwskeyringCommand < Thor # rubocop:disable Metrics/ClassLength 
     | 
|
| 
       436 
426 
     | 
    
         
             
              # autocomplete
         
     | 
| 
       437 
427 
     | 
    
         
             
              def autocomplete(curr, prev = nil)
         
     | 
| 
       438 
428 
     | 
    
         
             
                curr, prev = fix_args(curr, prev)
         
     | 
| 
       439 
     | 
    
         
            -
                comp_line = ENV 
     | 
| 
       440 
     | 
    
         
            -
                comp_point_str = ENV 
     | 
| 
      
 429 
     | 
    
         
            +
                comp_line = ENV.fetch('COMP_LINE', nil)
         
     | 
| 
      
 430 
     | 
    
         
            +
                comp_point_str = ENV.fetch('COMP_POINT', nil)
         
     | 
| 
       441 
431 
     | 
    
         
             
                unless comp_line && comp_point_str
         
     | 
| 
       442 
432 
     | 
    
         
             
                  exec_name = File.basename($PROGRAM_NAME)
         
     | 
| 
       443 
433 
     | 
    
         
             
                  warn I18n.t('message.awskeyring', path: $PROGRAM_NAME, bin: exec_name)
         
     | 
| 
         @@ -609,7 +599,7 @@ class AwskeyringCommand < Thor # rubocop:disable Metrics/ClassLength 
     | 
|
| 
       609 
599 
     | 
    
         
             
                bundled_env = to_delete.map { |elem| elem[('BUNDLER_ORIG_'.length)..] }
         
     | 
| 
       610 
600 
     | 
    
         
             
                to_delete << 'BUNDLE_GEMFILE'
         
     | 
| 
       611 
601 
     | 
    
         
             
                bundled_env.each do |env_name|
         
     | 
| 
       612 
     | 
    
         
            -
                  ENV[env_name] = ENV 
     | 
| 
      
 602 
     | 
    
         
            +
                  ENV[env_name] = ENV.fetch("BUNDLER_ORIG_#{env_name}", nil)
         
     | 
| 
       613 
603 
     | 
    
         
             
                  to_delete << env_name if ENV["BUNDLER_ORIG_#{env_name}"].start_with? 'BUNDLER_'
         
     | 
| 
       614 
604 
     | 
    
         
             
                end
         
     | 
| 
       615 
605 
     | 
    
         
             
                to_delete.each do |env_name|
         
     | 
    
        data/man/awskeyring.5
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            .\" generated with Ronn/v0.7.3
         
     | 
| 
       2 
2 
     | 
    
         
             
            .\" http://github.com/rtomayko/ronn/tree/0.7.3
         
     | 
| 
       3 
3 
     | 
    
         
             
            .
         
     | 
| 
       4 
     | 
    
         
            -
            .TH "AWSKEYRING" "5" " 
     | 
| 
      
 4 
     | 
    
         
            +
            .TH "AWSKEYRING" "5" "October 2022" "" ""
         
     | 
| 
       5 
5 
     | 
    
         
             
            .
         
     | 
| 
       6 
6 
     | 
    
         
             
            .SH "NAME"
         
     | 
| 
       7 
7 
     | 
    
         
             
            \fBAwskeyring\fR \- is a small tool to manage AWS account keys in the macOS Keychain
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: awskeyring
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.9. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.9.5
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Tristan Morgan
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2022- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-10-31 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: aws-sdk-iam
         
     | 
| 
         @@ -73,10 +73,8 @@ executables: 
     | 
|
| 
       73 
73 
     | 
    
         
             
            extensions: []
         
     | 
| 
       74 
74 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       75 
75 
     | 
    
         
             
            files:
         
     | 
| 
       76 
     | 
    
         
            -
            - Gemfile
         
     | 
| 
       77 
76 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       78 
77 
     | 
    
         
             
            - README.md
         
     | 
| 
       79 
     | 
    
         
            -
            - Rakefile
         
     | 
| 
       80 
78 
     | 
    
         
             
            - awskeyring.gemspec
         
     | 
| 
       81 
79 
     | 
    
         
             
            - exe/awskeyring
         
     | 
| 
       82 
80 
     | 
    
         
             
            - i18n/en.yml
         
     | 
| 
         @@ -94,9 +92,9 @@ licenses: 
     | 
|
| 
       94 
92 
     | 
    
         
             
            metadata:
         
     | 
| 
       95 
93 
     | 
    
         
             
              bug_tracker_uri: https://github.com/servian/awskeyring/issues
         
     | 
| 
       96 
94 
     | 
    
         
             
              changelog_uri: https://github.com/servian/awskeyring/blob/main/CHANGELOG.md
         
     | 
| 
       97 
     | 
    
         
            -
              documentation_uri: https://rubydoc.info/gems/awskeyring/1.9. 
     | 
| 
      
 95 
     | 
    
         
            +
              documentation_uri: https://rubydoc.info/gems/awskeyring/1.9.5
         
     | 
| 
       98 
96 
     | 
    
         
             
              rubygems_mfa_required: 'true'
         
     | 
| 
       99 
     | 
    
         
            -
              source_code_uri: https://github.com/servian/awskeyring/tree/v1.9. 
     | 
| 
      
 97 
     | 
    
         
            +
              source_code_uri: https://github.com/servian/awskeyring/tree/v1.9.5
         
     | 
| 
       100 
98 
     | 
    
         
             
              wiki_uri: https://github.com/servian/awskeyring/wiki
         
     | 
| 
       101 
99 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       102 
100 
     | 
    
         
             
            rdoc_options: []
         
     | 
    
        data/Gemfile
    DELETED
    
    | 
         @@ -1,20 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            source 'https://rubygems.org'
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            # Specify your gem's dependencies in awskeyring.gemspec
         
     | 
| 
       6 
     | 
    
         
            -
            gemspec
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
            group :development do
         
     | 
| 
       9 
     | 
    
         
            -
              gem 'github_changelog_generator'
         
     | 
| 
       10 
     | 
    
         
            -
              gem 'rake'
         
     | 
| 
       11 
     | 
    
         
            -
              gem 'ronn'
         
     | 
| 
       12 
     | 
    
         
            -
              gem 'rspec'
         
     | 
| 
       13 
     | 
    
         
            -
              gem 'rubocop'
         
     | 
| 
       14 
     | 
    
         
            -
              gem 'rubocop-performance'
         
     | 
| 
       15 
     | 
    
         
            -
              gem 'rubocop-rake'
         
     | 
| 
       16 
     | 
    
         
            -
              gem 'rubocop-rspec'
         
     | 
| 
       17 
     | 
    
         
            -
              gem 'rubocop-rubycw'
         
     | 
| 
       18 
     | 
    
         
            -
              gem 'simplecov'
         
     | 
| 
       19 
     | 
    
         
            -
              gem 'yard'
         
     | 
| 
       20 
     | 
    
         
            -
            end
         
     | 
    
        data/Rakefile
    DELETED
    
    | 
         @@ -1,63 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            require 'bundler/gem_tasks'
         
     | 
| 
       4 
     | 
    
         
            -
            require 'rubocop/rake_task'
         
     | 
| 
       5 
     | 
    
         
            -
            require 'ronn'
         
     | 
| 
       6 
     | 
    
         
            -
            require 'github_changelog_generator/task'
         
     | 
| 
       7 
     | 
    
         
            -
            require 'yard'
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
            GitHubChangelogGenerator::RakeTask.new :changelog do |config|
         
     | 
| 
       10 
     | 
    
         
            -
              config.user = 'servian'
         
     | 
| 
       11 
     | 
    
         
            -
              config.project = 'awskeyring'
         
     | 
| 
       12 
     | 
    
         
            -
              config.future_release = "v#{Awskeyring::VERSION}"
         
     | 
| 
       13 
     | 
    
         
            -
              config.since_tag = 'v0.10.0'
         
     | 
| 
       14 
     | 
    
         
            -
            end
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
            RuboCop::RakeTask.new do |rubocop|
         
     | 
| 
       17 
     | 
    
         
            -
              rubocop.options = %w[-D --enable-pending-cops]
         
     | 
| 
       18 
     | 
    
         
            -
              rubocop.requires << 'rubocop-performance'
         
     | 
| 
       19 
     | 
    
         
            -
              rubocop.requires << 'rubocop-rake'
         
     | 
| 
       20 
     | 
    
         
            -
              rubocop.requires << 'rubocop-rspec'
         
     | 
| 
       21 
     | 
    
         
            -
              rubocop.requires << 'rubocop-rubycw'
         
     | 
| 
       22 
     | 
    
         
            -
            end
         
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
            desc 'Run RSpec code examples'
         
     | 
| 
       25 
     | 
    
         
            -
            task :spec do
         
     | 
| 
       26 
     | 
    
         
            -
              puts 'Running RSpec...'
         
     | 
| 
       27 
     | 
    
         
            -
              require 'rspec/core'
         
     | 
| 
       28 
     | 
    
         
            -
              runner = RSpec::Core::Runner
         
     | 
| 
       29 
     | 
    
         
            -
              xcode = runner.run(%w[--pattern spec/**{,/*/**}/*_spec.rb --order rand --format documentation --color])
         
     | 
| 
       30 
     | 
    
         
            -
              abort 'RSpec failed' if xcode.positive?
         
     | 
| 
       31 
     | 
    
         
            -
            end
         
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
            desc 'Check filemode bits'
         
     | 
| 
       34 
     | 
    
         
            -
            task :filemode do
         
     | 
| 
       35 
     | 
    
         
            -
              puts 'Running FileMode...'
         
     | 
| 
       36 
     | 
    
         
            -
              files = Set.new(`git ls-files -z`.split("\x0"))
         
     | 
| 
       37 
     | 
    
         
            -
              dirs = Set.new(files.map { |file| File.dirname(file) })
         
     | 
| 
       38 
     | 
    
         
            -
              failure = []
         
     | 
| 
       39 
     | 
    
         
            -
              files.merge(dirs).each do |file|
         
     | 
| 
       40 
     | 
    
         
            -
                mode = File.stat(file).mode
         
     | 
| 
       41 
     | 
    
         
            -
                print '.'
         
     | 
| 
       42 
     | 
    
         
            -
                failure << file if (mode & 0x7) != ((mode >> 3) & 0x7)
         
     | 
| 
       43 
     | 
    
         
            -
              end
         
     | 
| 
       44 
     | 
    
         
            -
              abort "\nError: Incorrect file mode found\n#{failure.join("\n")}" unless failure.empty?
         
     | 
| 
       45 
     | 
    
         
            -
              print "\n"
         
     | 
| 
       46 
     | 
    
         
            -
            end
         
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
            desc 'generate manpage'
         
     | 
| 
       49 
     | 
    
         
            -
            task :ronn do
         
     | 
| 
       50 
     | 
    
         
            -
              puts 'Running Ronn...'
         
     | 
| 
       51 
     | 
    
         
            -
              doc = Ronn::Document.new('man/awskeyring.5.ronn')
         
     | 
| 
       52 
     | 
    
         
            -
              doc.date = Time.parse(`git show -s --format=%ad --date=short`)
         
     | 
| 
       53 
     | 
    
         
            -
              File.write('man/awskeyring.5', doc.to_roff)
         
     | 
| 
       54 
     | 
    
         
            -
              puts "done\n\n"
         
     | 
| 
       55 
     | 
    
         
            -
            end
         
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
            YARD::Rake::YardocTask.new do |t|
         
     | 
| 
       58 
     | 
    
         
            -
              t.options = ['--fail-on-warning', '--no-progress', '--files', '*.md']
         
     | 
| 
       59 
     | 
    
         
            -
              t.stats_options = ['--list-undoc']
         
     | 
| 
       60 
     | 
    
         
            -
            end
         
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
            desc 'Run Linting, Tests and Documetation tasks'
         
     | 
| 
       63 
     | 
    
         
            -
            task default: %i[filemode rubocop spec ronn yard]
         
     |