raykit 0.0.280 → 0.0.281
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/lib/raykit/environment.rb +2 -2
- data/lib/raykit/secrets.rb +12 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cce8fdf22d6fc96be550b48a5e2f88102a341e6ca13d92b4eb67eea143e84f87
|
4
|
+
data.tar.gz: 20d0192d12dc1b0d52f8717be1efc3fe7560322ffd3bb9fea7a6b8faf59c702c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31af0233b410c60cc437725dc24dcd388d34e291b21ad0236cad087d462beacc402a85810dcd7f280387c54f0b6073e09b0e8f29049f4a6b4be1911af955a3d7
|
7
|
+
data.tar.gz: a57943df33a23921547571f8e022494c75b6b680bb8f45115265a8ec2542295974f8d8469e1446a5073aed7a17eda68800648349117f9a3ce1e73dee8476058b
|
data/lib/raykit/environment.rb
CHANGED
@@ -29,11 +29,11 @@ module Raykit
|
|
29
29
|
def self.get_dev_dir(name)
|
30
30
|
dir = Pathname.new("#{Environment::root_dir}/#{name}")
|
31
31
|
dir.mkpath
|
32
|
-
dir.to_s
|
32
|
+
dir.to_s().gsub('//','/')
|
33
33
|
end
|
34
34
|
|
35
35
|
def self.get_work_dir(url)
|
36
|
-
Raykit::Environment::get_dev_dir('work') + url.gsub('://','/').gsub('.git','')
|
36
|
+
Raykit::Environment::get_dev_dir('work') +'/' + url.gsub('://','/').gsub('.git','')
|
37
37
|
end
|
38
38
|
# Get the size of a directory and its contents
|
39
39
|
def self.get_dir_size(dir)
|
data/lib/raykit/secrets.rb
CHANGED
@@ -6,13 +6,15 @@ module Raykit
|
|
6
6
|
def initialize()
|
7
7
|
if ENV.has_key?('RAYKIT_SECRETS_PATH')
|
8
8
|
secrets_file = ENV['RAYKIT_SECRETS_PATH']
|
9
|
-
|
9
|
+
if File.exists?(secrets_file)
|
10
10
|
text = IO.read(secrets_file)
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
if (text.length > 7 )
|
12
|
+
data = JSON.parse(text)
|
13
|
+
data.each{|key,value|
|
14
|
+
self[key] = value
|
15
|
+
}
|
16
|
+
end
|
17
|
+
end
|
16
18
|
end
|
17
19
|
end
|
18
20
|
|
@@ -27,10 +29,10 @@ module Raykit
|
|
27
29
|
end
|
28
30
|
|
29
31
|
def save()
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
32
|
+
if ENV.has_key?('RAYKIT_SECRETS_PATH')
|
33
|
+
secrets_file = ENV['RAYKIT_SECRETS_PATH']
|
34
|
+
File.open(secrets_file,"w") { |f| f.puts self.to_json }
|
35
|
+
end
|
34
36
|
end
|
35
37
|
end
|
36
38
|
end
|