everyday-cli-utils 1.8.4 → 1.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/everyday-cli-utils/ask.rb +11 -0
- data/lib/everyday-cli-utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b85fb09b8d0abe4d585f7f1ce611bc4f34ef69a
|
4
|
+
data.tar.gz: bbd3827ffeeb0dd6bdef1d6e0b458019613d0a22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8e1886399ad21bed65f8f6f48550ad97e40069fc9e40699143ef58446a2eb8e5dee0741a0b5647aa13f76282cf87342d5f859a14a45356b58b9ca2e3aae6f73
|
7
|
+
data.tar.gz: d857d3df802a6208bdb30f6d0f4d3b5ce4c61e2f633cdf2ded75405bb3251f7392f6aad9f95ccacd16b3500d606ac20bd6ca2c2e8121d57a7c0fc73fe0ae772a
|
@@ -27,6 +27,17 @@ module EverydayCliUtils
|
|
27
27
|
block.call(val) if !options[:only] || options[:only] == (val ? :yes : :no)
|
28
28
|
end
|
29
29
|
|
30
|
+
def self.ask_prefill(question, prefill)
|
31
|
+
old_hook = Readline.pre_input_hook
|
32
|
+
Readline.pre_input_hook =-> {
|
33
|
+
Readline.insert_text(prefill)
|
34
|
+
Readline.redisplay
|
35
|
+
}
|
36
|
+
rval = Readline.readline(question, true)
|
37
|
+
Readline.pre_input_hook = old_hook
|
38
|
+
rval
|
39
|
+
end
|
40
|
+
|
30
41
|
def self.hash_to_options(hash, extra = [])
|
31
42
|
hash.keys + extra
|
32
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: everyday-cli-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Henderson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|