rya 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rya/core_extensions.rb +7 -5
- data/lib/rya/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: e8d27865a1d6cb8ca8975bb7f3f72aac8c0d9038
|
4
|
+
data.tar.gz: adc52e9ecdaa29ea6c86262d395597071b9fda07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86a3ebcee9b3de4b4ccc74c1dc9c75a5642c1cf2bf5d3490762c77aa9d977a907e9743598959a3502a088e0f74dfba9437e1cc1860ddb8f477040497f50e94b8
|
7
|
+
data.tar.gz: ee0f780156d40e913de737f4c8632f02e4a2906d035305c25def61b797cf87a7eae01f75453b21a0735843d96fb4c719272d354ec782dd344d212aff70be70b4
|
data/Gemfile.lock
CHANGED
data/lib/rya/core_extensions.rb
CHANGED
@@ -22,18 +22,21 @@ module Rya
|
|
22
22
|
module File
|
23
23
|
# Check if a string specifies an executable command on the PATH.
|
24
24
|
#
|
25
|
-
# @param cmd The name of a command to check.
|
25
|
+
# @param cmd The name of a command to check, or a path to an actual executable binary.
|
26
26
|
#
|
27
|
-
# @return nil if the cmd is not on the PATH
|
28
|
-
# @return [String] /path/to/cmd if the cmd is on the PATH
|
27
|
+
# @return nil if the cmd is not executable or it is not on the PATH.
|
28
|
+
# @return [String] /path/to/cmd if the cmd is executable or is on the PATH.
|
29
29
|
#
|
30
30
|
# @example
|
31
31
|
# File.extend Rya::CoreExtensions::File
|
32
|
-
# File.command? "ls" #=> /bin/ls
|
32
|
+
# File.command? "ls" #=> "/bin/ls"
|
33
33
|
# File.command? "arstoien" #=> nil
|
34
|
+
# File.command? "/bin/ls" #=> "/bin/ls"
|
34
35
|
#
|
35
36
|
# @note See https://stackoverflow.com/questions/2108727.
|
36
37
|
def command? cmd
|
38
|
+
return cmd if Object::File.executable? cmd
|
39
|
+
|
37
40
|
exts = ENV["PATHEXT"] ? ENV["PATHEXT"].split(";") : [""]
|
38
41
|
|
39
42
|
ENV["PATH"].split(Object::File::PATH_SEPARATOR).each do |path|
|
@@ -260,4 +263,3 @@ module Rya
|
|
260
263
|
STRING = Class.new.extend(Rya::CoreExtensions::String)
|
261
264
|
end
|
262
265
|
end
|
263
|
-
|
data/lib/rya/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rya
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Moore
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|