rya 0.5.1 → 0.6.0
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 +29 -0
- 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: 8eb2fd69948270d6e98f44081e99ca387451f9d8
|
4
|
+
data.tar.gz: e37122a07b4a149e0b96b7bd8be1b7de2efd4e8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d664d9d6e4fc3ac2c9e2194f4beca9bfadf2396936f7efe8e41e8944f883f34cbf13602dd98bd94c411f6a22ca65d9aa5d1e57ac2be6dbbe83c7ddd49d3e9e5
|
7
|
+
data.tar.gz: 9df918880d832efdd5c9821a2f660efa6c51c33d8c250f7ab3f33a6ea56278f291f9d9c3e141bcbf075dc297493922e97b862bdc33bc81ed2fc29a5213da7aa7
|
data/Gemfile.lock
CHANGED
data/lib/rya/core_extensions.rb
CHANGED
@@ -19,6 +19,35 @@ module Rya
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
+
module File
|
23
|
+
# Check if a string specifies an executable command on the PATH.
|
24
|
+
#
|
25
|
+
# @param cmd The name of a command to check.
|
26
|
+
#
|
27
|
+
# @return nil if the cmd is not on the PATH and executable
|
28
|
+
# @return [String] /path/to/cmd if the cmd is on the PATH and executable
|
29
|
+
#
|
30
|
+
# @example
|
31
|
+
# File.extend Rya::CoreExtensions::File
|
32
|
+
# File.command? "ls" #=> /bin/ls
|
33
|
+
# File.command? "arstoien" #=> nil
|
34
|
+
#
|
35
|
+
# @note See https://stackoverflow.com/questions/2108727.
|
36
|
+
def command? cmd
|
37
|
+
exts = ENV["PATHEXT"] ? ENV["PATHEXT"].split(";") : [""]
|
38
|
+
|
39
|
+
ENV["PATH"].split(Object::File::PATH_SEPARATOR).each do |path|
|
40
|
+
exts.each do |ext|
|
41
|
+
exe = Object::File.join path, "#{cmd}#{ext}"
|
42
|
+
|
43
|
+
return exe if Object::File.executable?(exe) && !Object::File.directory?(exe)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
nil
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
22
51
|
module Math
|
23
52
|
def scale val, old_min, old_max, new_min, new_max
|
24
53
|
# This can happen if you use the mean across non-zero samples.
|
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.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Moore
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|