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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ff3ce4b84d20568268d1bdc3562e53d879d9bf43aab3a4dd02e230d90e78c55
4
- data.tar.gz: 2377ec56804df5e5540eb844ccf4817b3d24f49340c88a085a4d16797d9bfdc8
3
+ metadata.gz: df49a867fa247712bc62cae7be000a45302ba12b5b3c02a9af9949132f11fa0f
4
+ data.tar.gz: 6f6d4682d773569f6bfe46506d6417d365408c6ad570e485b97a5163f0d743e0
5
5
  SHA512:
6
- metadata.gz: 1b04426b4e02c57329ce063bf8fa8268174e613d155c7f0903711d3fd4e4ad4c8b450ec19cd745090f9ee91fc771739cca97897da703bf6191d1dbaf4bc0a1de
7
- data.tar.gz: a7143a0f3c43c859db26909bb0701ef8caf2ebe025642f829e006249e70ec48359ebf13137d507b1d9aad3b6f1e02931fa4227407d4a77681e7ca2a608f59574
6
+ metadata.gz: 2cc8247df39a5d07118ed074f0f1126aaa321964379dfe27c88bededc409a66a725453a41c3ce232fb8b9d9c28e35db009e48b0beee894fa7b1b6d331ef5f60e
7
+ data.tar.gz: 6a1c30cf85e0e46a594c2e7dda3c15f33a0b68a98f3d9f645d528fc303300d7f6b4f7a1d27c5362225406c023022e7afbb13f06eaa64639b39d21ef45b08e2b8
@@ -6,7 +6,7 @@ require "slop"
6
6
  require "dreck"
7
7
  require "abbrev"
8
8
  require "pastel"
9
- require "termios"
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
- old_attrs = Termios.tcgetattr(self.class.stdin)
166
- new_attrs = old_attrs.dup
167
- new_attrs.lflag &= ~Termios::ECHO unless echo
168
- Termios.tcsetattr(self.class.stdin, Termios::TCSANOW, new_attrs)
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
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module KBSecret
4
4
  # kbsecret's current version
5
- VERSION = "1.7.1"
5
+ VERSION = "1.7.2"
6
6
  end
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.1
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-06 00:00:00.000000000 Z
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