kbsecret 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kbsecret/cli.rb +6 -15
- data/lib/kbsecret/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df49a867fa247712bc62cae7be000a45302ba12b5b3c02a9af9949132f11fa0f
|
4
|
+
data.tar.gz: 6f6d4682d773569f6bfe46506d6417d365408c6ad570e485b97a5163f0d743e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cc8247df39a5d07118ed074f0f1126aaa321964379dfe27c88bededc409a66a725453a41c3ce232fb8b9d9c28e35db009e48b0beee894fa7b1b6d331ef5f60e
|
7
|
+
data.tar.gz: 6a1c30cf85e0e46a594c2e7dda3c15f33a0b68a98f3d9f645d528fc303300d7f6b4f7a1d27c5362225406c023022e7afbb13f06eaa64639b39d21ef45b08e2b8
|
data/lib/kbsecret/cli.rb
CHANGED
@@ -6,7 +6,7 @@ require "slop"
|
|
6
6
|
require "dreck"
|
7
7
|
require "abbrev"
|
8
8
|
require "pastel"
|
9
|
-
require "
|
9
|
+
require "io/console"
|
10
10
|
|
11
11
|
module KBSecret
|
12
12
|
# An encapsulation of useful methods for kbsecret's CLI.
|
@@ -161,20 +161,11 @@ module KBSecret
|
|
161
161
|
# @param echo [Boolean] whether or not to echo the user's input
|
162
162
|
# @return [String] the user's response, with trailing newline removed
|
163
163
|
def prompt(question, echo: true)
|
164
|
-
if self.class.stdin.tty?
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
end
|
170
|
-
|
171
|
-
self.class.stdout.print "#{question} "
|
172
|
-
response = self.class.stdin.gets.chomp
|
173
|
-
response
|
174
|
-
ensure
|
175
|
-
if self.class.stdin.tty?
|
176
|
-
self.class.stdout.puts unless echo
|
177
|
-
Termios.tcsetattr(self.class.stdin, Termios::TCSANOW, old_attrs)
|
164
|
+
if !echo && self.class.stdin.tty?
|
165
|
+
self.class.stdin.getpass("#{question} ")
|
166
|
+
else
|
167
|
+
self.class.stdout.print "#{question} "
|
168
|
+
self.class.stdin.gets.chomp
|
178
169
|
end
|
179
170
|
end
|
180
171
|
|
data/lib/kbsecret/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kbsecret
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Woodruff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -170,20 +170,6 @@ dependencies:
|
|
170
170
|
- - "~>"
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '0.7'
|
173
|
-
- !ruby/object:Gem::Dependency
|
174
|
-
name: ruby-termios
|
175
|
-
requirement: !ruby/object:Gem::Requirement
|
176
|
-
requirements:
|
177
|
-
- - "~>"
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
version: '1.0'
|
180
|
-
type: :runtime
|
181
|
-
prerelease: false
|
182
|
-
version_requirements: !ruby/object:Gem::Requirement
|
183
|
-
requirements:
|
184
|
-
- - "~>"
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
version: '1.0'
|
187
173
|
- !ruby/object:Gem::Dependency
|
188
174
|
name: slop
|
189
175
|
requirement: !ruby/object:Gem::Requirement
|