magister 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/magister.rb +8 -6
- 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: bd94a0cc6b6ee2470916892afd0c9ffe626d2c7a31acd3fc2bd7e7e4485415bc
|
4
|
+
data.tar.gz: 21f397e67ca49836e84af7fd83a425223a30b385e41a116149c2a0b02074fce4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53033d79c500d959a80a63f83763091ff28900fdc52356f789022b69da6bce591e53961c7ab30254eff05df8906528daa2acf03ef3ee4336359b4176d29cc732
|
7
|
+
data.tar.gz: 6b5762af287bbaf677e06d50462d4284856de1817f0c9afa9f76d0b96f3cb03303eebc8926edffbc8eca28ac697a52220641eb2b545ed16ee7b43638e2ccec20
|
data/lib/magister.rb
CHANGED
@@ -14,12 +14,6 @@ $authMode = "selenium"
|
|
14
14
|
$magister_useCache = true
|
15
15
|
$magister_cachingDirectory = ".cache/magister"
|
16
16
|
|
17
|
-
prev = ""
|
18
|
-
$magister_cachingDirectory.split("/").each do |directory|
|
19
|
-
Dir.mkdir(prev + directory) unless File.exist?(prev + directory)
|
20
|
-
prev += directory + "/"
|
21
|
-
end
|
22
|
-
|
23
17
|
# Cache type can eitehr be "compact" or "json"
|
24
18
|
$magister_cacheType = "json"
|
25
19
|
# Wether to encrypt the cache, this can secure the acount by not exposing the token or any sensetive data.
|
@@ -35,6 +29,14 @@ class Magister
|
|
35
29
|
# @since 1.0.0
|
36
30
|
def initialize
|
37
31
|
@profile = nil
|
32
|
+
|
33
|
+
if $magister_useCache
|
34
|
+
prev = ""
|
35
|
+
$magister_cachingDirectory.split("/").each do |directory|
|
36
|
+
Dir.mkdir(prev + directory) unless File.exist?(prev + directory)
|
37
|
+
prev += directory + "/"
|
38
|
+
end
|
39
|
+
end
|
38
40
|
end
|
39
41
|
|
40
42
|
# Create a new profile and authenticate with a token
|