eac_ruby_utils 0.70.0 → 0.71.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_utils/envs/executable.rb +15 -3
- data/lib/eac_ruby_utils/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: 5ac58b6068bc75fe11061fa1f801f9ad5968349e926091224a60b7f2e3ed035a
|
4
|
+
data.tar.gz: 61d5b30e7d2e3c78c396024793dcc1666b062471793914910c2a787c717fc160
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb8f48fff07497fb711ce0bff11268436073d191d94160c3f1c328a8330e55177b4697b4428bc3049ddf41ac9ebc13f8c3ebc4262898b17e7c2ce973d2a1bf30
|
7
|
+
data.tar.gz: 2f12ec4daab1375f8d7165edc804e486dde44783b830dbe9d3d5c432d805658430e6674f9f2c5660ed1a07c5d2e53b4105d5905be3c61cfe902d6d2a434cb254
|
@@ -22,7 +22,7 @@ module EacRubyUtils
|
|
22
22
|
def validate
|
23
23
|
return nil if exist?
|
24
24
|
|
25
|
-
"Program \"#{
|
25
|
+
"Program \"#{::Shellwords.join(executable_args)}\" not found in environment #{env}"
|
26
26
|
end
|
27
27
|
|
28
28
|
def validate!
|
@@ -33,13 +33,25 @@ module EacRubyUtils
|
|
33
33
|
|
34
34
|
def command(*command_args)
|
35
35
|
validate!
|
36
|
-
env.command(
|
36
|
+
env.command(*executable_args, *command_args)
|
37
|
+
end
|
38
|
+
|
39
|
+
def executable_args
|
40
|
+
executable_args_from_envvar || [name]
|
41
|
+
end
|
42
|
+
|
43
|
+
def executable_args_envvar
|
44
|
+
"#{name}_command".variableize.upcase
|
45
|
+
end
|
46
|
+
|
47
|
+
def executable_args_from_envvar
|
48
|
+
ENV[executable_args_envvar].if_present { |v| ::Shellwords.split(v) }
|
37
49
|
end
|
38
50
|
|
39
51
|
private
|
40
52
|
|
41
53
|
def exist_uncached
|
42
|
-
env.command(
|
54
|
+
env.command(*executable_args, *check_args).execute!
|
43
55
|
true
|
44
56
|
rescue Errno::ENOENT
|
45
57
|
false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_ruby_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.71.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|