rbbt-util 5.26.149 → 5.26.150
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/util/misc/system.rb +13 -0
- 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: ad40e6919c3e8e77360dbfae0ea25c736c6144989517232d958f1438c8f80097
|
4
|
+
data.tar.gz: 825d7c86c2ae9acf7d47341cc9871a9e999e9591cdcdbfc6270e197be156ebae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34951a010cac42122a179959356a0e8f164489de0de3f04888754826563c156a384af687d7c8119b4ea228a0429db5d7cc1757f60c8ee81117b5ad161d0fc01d
|
7
|
+
data.tar.gz: 7a5ca9c1f0bf6cc2684aecd6a44eb2fe4f777b6c16de2069a01eed8196525e5ec40a521ad9a6b026dba9fd5c44bb63ffc789051eab14d88bd78bc32046565ccf
|
@@ -85,6 +85,19 @@ end
|
|
85
85
|
return false
|
86
86
|
end
|
87
87
|
|
88
|
+
|
89
|
+
def self.relative_link(source, target_dir)
|
90
|
+
path = "."
|
91
|
+
current = target_dir
|
92
|
+
while ! Misc.common_path current, source
|
93
|
+
current = File.dirname(current)
|
94
|
+
path = File.join(path, '..')
|
95
|
+
return nil if current == "/"
|
96
|
+
end
|
97
|
+
|
98
|
+
File.join(path, Misc.path_relative_to(current, source))
|
99
|
+
end
|
100
|
+
|
88
101
|
# WARN: probably not thread safe...
|
89
102
|
def self.in_dir(dir)
|
90
103
|
old_pwd = FileUtils.pwd
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.26.
|
4
|
+
version: 5.26.150
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|