blackstack_commons 1.1.31 → 1.1.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/functions.rb +7 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf2a3706d12af1ed68a4fe8ee11fab224a47859d
|
4
|
+
data.tar.gz: 6d7bd517914e50690ff504a4431311294d5a7b5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e66f18f3903ad218d5241ca74c8b9e074c3a2689d81f8e3421d68ac7d8a9801038e424b6206f752b35e87ffac0de815d391a395a17e63498577929995771237f
|
7
|
+
data.tar.gz: 82b5657efed2447d1bd7ac7095882378117221c23b7fb1bcb19e88a4506be777c9f822c9eda853b38b0fca1c2c6679c5c2dca127e56ed60d3d9ca219f3098c63
|
data/lib/functions.rb
CHANGED
@@ -11,12 +11,15 @@ module BlackStack
|
|
11
11
|
# script is running inside an OCRA temp folder, since the local folder
|
12
12
|
# of the running command is not the filder where the exe file is hosted.
|
13
13
|
#
|
14
|
-
# More information:
|
14
|
+
# More information:
|
15
|
+
# * https://stackoverflow.com/questions/1937743/how-to-get-the-current-working-directorys-absolute-path-from-irb
|
16
|
+
# * https://stackoverflow.com/questions/8577223/ruby-get-the-file-being-executed
|
17
|
+
# * https://stackoverflow.com/questions/7399882/ruby-getting-path-from-pathfilename/7400057
|
15
18
|
#
|
16
|
-
def self.require_in_working_path(filename, path
|
19
|
+
def self.require_in_working_path(filename, path,show_path_info=false)
|
17
20
|
puts '' if show_path_info
|
18
|
-
path = File.expand_path File.dirname(path)
|
19
|
-
|
21
|
+
#path = File.expand_path File.dirname(path)
|
22
|
+
path = Dir.pwd
|
20
23
|
puts "require_in_working_path.path:#{path}:." if show_path_info
|
21
24
|
file = "#{path}/#{filename}"
|
22
25
|
puts "require_in_working_path.file:#{file}:." if show_path_info
|