awskeyring 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ccf8f7a584af54361cdc4250f47816e498f3a965
4
- data.tar.gz: e66a63bf9340c2f984237481b371b72d9c09daf5
3
+ metadata.gz: f560b1fef85ec599c9debb10eace0e76746e64d7
4
+ data.tar.gz: 356f577f81a1fd72ef6571e8aaf64e6bd6829a95
5
5
  SHA512:
6
- metadata.gz: 17c8af8530dfd2bf2962017afaeff0c6b7e68c59ae825982eefc932ae404e46a9b860daeeba20d2cc2b2f02bca8790d4687910859421c87f5af099f3232632b8
7
- data.tar.gz: 19992ac28d7960adcab400f9961398f3e3a34e9d17d635aa06493cb45268c27dd15dac89f8c2f48c558643c0d754fa593e312e8d7eb7fed5c848a5c77ada4ffa
6
+ metadata.gz: 7cc1ff83f60d58b3f5c9fd9ec104657425f5719649a6b28e88ce8fd6ccd46e6f550e64314129cfbeca4c0e78c0c5a809b30c93642a53f887ef2bcf2e6a2aef9f
7
+ data.tar.gz: 70f3b813b8f6c3886bb83cc290e5b065351a16f365f00a2d40761811e18bf45a4768d732443e54c195e6069b6a4c6544e1117dade9a4fc9eb5acc25db85e728b
data/.rubocop.yml CHANGED
@@ -6,7 +6,7 @@ Metrics/MethodLength:
6
6
 
7
7
  Metrics/BlockLength:
8
8
  Exclude:
9
- - spec/*
9
+ - spec/*/*
10
10
 
11
11
  Naming/FileName:
12
12
  Exclude:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.0.5](https://github.com/vibrato/awskeyring/tree/v0.0.5) (2018-02-15)
4
+ [Full Changelog](https://github.com/vibrato/awskeyring/compare/v0.0.4...v0.0.5)
5
+
6
+ **Closed issues:**
7
+
8
+ - Issue on add [\#7](https://github.com/vibrato/awskeyring/issues/7)
9
+
10
+ **Merged pull requests:**
11
+
12
+ - fix issue \#7 and add a path to open console. [\#8](https://github.com/vibrato/awskeyring/pull/8) ([tristanmorgan](https://github.com/tristanmorgan))
13
+
14
+ ## [v0.0.4](https://github.com/vibrato/awskeyring/tree/v0.0.4) (2018-01-29)
15
+ [Full Changelog](https://github.com/vibrato/awskeyring/compare/v0.0.3...v0.0.4)
16
+
3
17
  ## [v0.0.3](https://github.com/vibrato/awskeyring/tree/v0.0.3) (2018-01-28)
4
18
  [Full Changelog](https://github.com/vibrato/awskeyring/compare/v0.0.2...v0.0.3)
5
19
 
data/lib/awskeyring.rb CHANGED
@@ -26,8 +26,8 @@ module Awskeyring
26
26
  end
27
27
 
28
28
  def self.load_keychain
29
- unless File.exist?(Awskeyring::PREFS_FILE) || prefs.empty?
30
- warn "Config missing, run `#{$PROGRAM_NAME} initialise` to recreate."
29
+ unless File.exist?(Awskeyring::PREFS_FILE) && !prefs.empty?
30
+ warn "Config missing, run `#{File.basename($PROGRAM_NAME)} initialise` to recreate."
31
31
  exit 1
32
32
  end
33
33
 
@@ -1,3 +1,3 @@
1
1
  module Awskeyring
2
- VERSION = '0.0.4'.freeze
2
+ VERSION = '0.0.5'.freeze
3
3
  end
@@ -78,7 +78,7 @@ class AwskeyringCommand < Thor # rubocop:disable Metrics/ClassLength
78
78
  secret: cred.password,
79
79
  token: token
80
80
  )
81
- pid = spawn(env_vars, command.join(' '))
81
+ pid = Process.spawn(env_vars, command.join(' '))
82
82
  Process.wait pid
83
83
  end
84
84
 
@@ -204,12 +204,15 @@ class AwskeyringCommand < Thor # rubocop:disable Metrics/ClassLength
204
204
  end
205
205
 
206
206
  desc 'console ACCOUNT', 'Open the AWS Console for the ACCOUNT'
207
+ method_option :path, type: :string, aliases: '-p', desc: 'The service PATH to open.'
207
208
  def console(account = nil) # rubocop:disable all
208
209
  account = ask_missing(existing: account, message: 'account name')
209
210
  cred, temp_cred = get_valid_item_pair(account: account)
210
211
  token = temp_cred.password unless temp_cred.nil?
211
212
 
212
- console_url = 'https://console.aws.amazon.com/console/home'
213
+ path = options[:path] || 'console'
214
+
215
+ console_url = "https://console.aws.amazon.com/#{path}/home"
213
216
  signin_url = 'https://signin.aws.amazon.com/federation'
214
217
  policy_json = {
215
218
  Version: '2012-10-17',
@@ -251,7 +254,7 @@ class AwskeyringCommand < Thor # rubocop:disable Metrics/ClassLength
251
254
 
252
255
  login_url = signin_url + '?Action=login' + signin_token_param + destination_param
253
256
 
254
- pid = spawn("open \"#{login_url}\"")
257
+ pid = Process.spawn("open \"#{login_url}\"")
255
258
  Process.wait pid
256
259
  end
257
260
 
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: 0.0.4
4
+ version: 0.0.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: 2018-01-29 00:00:00.000000000 Z
11
+ date: 2018-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-iam