eac_ruby_base0 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eac_ruby_base0/runner.rb +12 -0
- data/lib/eac_ruby_base0/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48a0ec7cf52eb8b2aa5dcd93804be7bc14f03a938f74bd0b6517b4431402c459
|
4
|
+
data.tar.gz: 2d0cd06e4be834238ddc3f87bf6c39af5beaf22628fa7ca3e4014a0ceb2e5cde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d752e1245019c88e97f6845e521c750d7f17b4a30e369de49708ae9eb41434a437cd522fe69141ed69e517ee18f5cac97712bead85045a5958e59b2eec09a3d
|
7
|
+
data.tar.gz: 2acb4ffc475b300814ae09a9a44acc8aae6b82bf9034f1810db9edd6a0ca2f72f29f6387d7cc2faa2234b89644653c04dd2d71eeb770c335fbf0846ed0fa4fbb
|
@@ -10,6 +10,7 @@ module EacRubyBase0
|
|
10
10
|
include ::EacCli::DefaultRunner
|
11
11
|
runner_definition do
|
12
12
|
bool_opt '-q', '--quiet', 'Quiet mode.'
|
13
|
+
bool_opt '-I', '--no-input', 'Fail if a input is requested.'
|
13
14
|
subcommands
|
14
15
|
alt do
|
15
16
|
bool_opt '-V', '--version', 'Show version.'
|
@@ -20,6 +21,7 @@ module EacRubyBase0
|
|
20
21
|
def run
|
21
22
|
on_speaker_node do |node|
|
22
23
|
node.stderr = ::StringIO.new if options.fetch('--quiet')
|
24
|
+
node.stdin = FailIfRequestInput.new if options.fetch('--no-input')
|
23
25
|
if options.fetch('--version')
|
24
26
|
show_version
|
25
27
|
else
|
@@ -35,5 +37,15 @@ module EacRubyBase0
|
|
35
37
|
def show_version
|
36
38
|
out("#{application_version}\n")
|
37
39
|
end
|
40
|
+
|
41
|
+
class FailIfRequestInput
|
42
|
+
enable_console_speaker
|
43
|
+
|
44
|
+
%w[gets noecho].each do |method|
|
45
|
+
define_method(method) do
|
46
|
+
raise "Input method requested (\"#{method}\") and option --no-input is set"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
38
50
|
end
|
39
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_ruby_base0
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Put here the authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eac_cli
|