awskeyring 0.7.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/awskeyring/input.rb +37 -0
- data/lib/awskeyring/version.rb +1 -1
- data/lib/awskeyring_command.rb +2 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ad1f180eac2ee0404c4c8d96eb0206d4e1812de
|
4
|
+
data.tar.gz: 431a1d18c5547c6ab5f6c7f8c3b3a15ab2ca2467
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc88bb7611ca1fe6c391e21a099a964726e87093b78278c19f972909f22a259b97af373927917df6b5a4f61d67362265dc1033914b4ddf61d30d018d7d51268f
|
7
|
+
data.tar.gz: 83132abd48684e6b58593781494a7ff43ec9c061e467a3efdbf5b68d2b066d1626999681620dc51323e7bc9e11fd5f1b4bf2d6f06b8a6c225683f859de6aa647
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v0.8.0](https://github.com/vibrato/awskeyring/tree/v0.8.0) (2018-12-19)
|
4
|
+
[Full Changelog](https://github.com/vibrato/awskeyring/compare/v0.7.2...v0.8.0)
|
5
|
+
|
6
|
+
**Implemented enhancements:**
|
7
|
+
|
8
|
+
- Provide input feedback for secret fields. [\#41](https://github.com/vibrato/awskeyring/pull/41) ([tristanmorgan](https://github.com/tristanmorgan))
|
9
|
+
|
10
|
+
**Fixed bugs:**
|
11
|
+
|
12
|
+
- Cannot enter secret access key when adding new accounts in 0.7.0 [\#36](https://github.com/vibrato/awskeyring/issues/36)
|
13
|
+
|
3
14
|
## [v0.7.2](https://github.com/vibrato/awskeyring/tree/v0.7.2) (2018-12-17)
|
4
15
|
[Full Changelog](https://github.com/vibrato/awskeyring/compare/v0.7.1...v0.7.2)
|
5
16
|
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'io/console'
|
2
|
+
|
3
|
+
# Awskeyring Module,
|
4
|
+
module Awskeyring
|
5
|
+
# Input methods for Awskeyring
|
6
|
+
module Input
|
7
|
+
# Read a secret in without echoing the characters
|
8
|
+
#
|
9
|
+
# @param [String] prompt text to prompt user with.
|
10
|
+
def self.read_secret(prompt)
|
11
|
+
$stdout.print(prompt)
|
12
|
+
hide_input
|
13
|
+
end
|
14
|
+
|
15
|
+
private_class_method def self.hide_input # rubocop:disable Metrics/MethodLength
|
16
|
+
password = ''
|
17
|
+
loop do
|
18
|
+
character = $stdin.getch
|
19
|
+
break unless character
|
20
|
+
|
21
|
+
if ["\n", "\r"].include? character
|
22
|
+
puts ''
|
23
|
+
break
|
24
|
+
elsif ["\b", "\u007f"].include? character
|
25
|
+
password.chop!
|
26
|
+
print "\b\e[P"
|
27
|
+
elsif character == "\u0003"
|
28
|
+
exit 1
|
29
|
+
else
|
30
|
+
print '*'
|
31
|
+
password << character
|
32
|
+
end
|
33
|
+
end
|
34
|
+
password
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/lib/awskeyring/version.rb
CHANGED
data/lib/awskeyring_command.rb
CHANGED
@@ -3,6 +3,7 @@ require 'thor'
|
|
3
3
|
|
4
4
|
require 'awskeyring'
|
5
5
|
require 'awskeyring/awsapi'
|
6
|
+
require 'awskeyring/input'
|
6
7
|
require 'awskeyring/validate'
|
7
8
|
require 'awskeyring/version'
|
8
9
|
|
@@ -461,7 +462,7 @@ class AwskeyringCommand < Thor # rubocop:disable Metrics/ClassLength
|
|
461
462
|
|
462
463
|
def ask(message:, secure: false, optional: false)
|
463
464
|
if secure
|
464
|
-
|
465
|
+
Awskeyring::Input.read_secret(message.rjust(20) + ': ')
|
465
466
|
elsif optional
|
466
467
|
Thor::LineEditor.readline((message + ' (optional)').rjust(20) + ': ')
|
467
468
|
else
|
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.
|
4
|
+
version: 0.8.0
|
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-12-
|
11
|
+
date: 2018-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-iam
|
@@ -85,6 +85,7 @@ files:
|
|
85
85
|
- i18n/en.yml
|
86
86
|
- lib/awskeyring.rb
|
87
87
|
- lib/awskeyring/awsapi.rb
|
88
|
+
- lib/awskeyring/input.rb
|
88
89
|
- lib/awskeyring/validate.rb
|
89
90
|
- lib/awskeyring/version.rb
|
90
91
|
- lib/awskeyring_command.rb
|