magister 1.3.1 → 1.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb906c0bf6e2273862a479e2a907059f437dfaaf1e67fc4f72efddbae0d04158
4
- data.tar.gz: 134cd679ba4c639a895bc8962872c465b438ef8b1011e59e88312f6311e49bc0
3
+ metadata.gz: 9e2fbdc536a8285a394d514f67ef0ac82368d5bff635488b0bceb39a5befdb2c
4
+ data.tar.gz: a9954d602e59a3ee405eacd9ee239e36bc08ffa650b0fe1d417652873cadf674
5
5
  SHA512:
6
- metadata.gz: 3ffa124a04e89903d5b878133d4b7982d23ff82da62568b4c26d73a724c526076ffd4d0779e9e2c0301dc6788e61489aea5bf64c738dc3aaa6cc1129d99bc7b4
7
- data.tar.gz: d9e7e80a09396317ce37a8550271780054fb5f564a83068189f920b686d5a7469e16c646c528c4a1cc9977174d213fee16358197cf9af5a32e956112e082fe3f
6
+ metadata.gz: 8dcaef4f408b45455c8b499491ec3b38c79e8869a1da66b202d75c014ff957c0df0a7899e56286145a9ce9e34169724bcf6f235944b4450fff76de9d55d64201
7
+ data.tar.gz: ea32318ff63d0713e8d869d7f57cf4950283c4707baf7b0796622d291d6dd81f8a1bf6e47c2d2934ed3c6236951187f6828b0f957ba8863ce74105c285a43595
@@ -36,7 +36,7 @@ module Authenticator
36
36
  puts "attempting to use cached token..."
37
37
  if expires.to_i > Time.now.to_i
38
38
  puts "using cached token."
39
- return Profile.new(cached_data["token"], school)
39
+ return Profile.new(cached_data["#{school}/#{username}"], school)
40
40
  else
41
41
  puts "cached token expired."
42
42
  end
@@ -110,7 +110,7 @@ module Authenticator
110
110
 
111
111
  if $magister_useCache
112
112
  if $magister_cacheType == "json"
113
- File.write($magister_cachingDirectory + "/auth.json", "{\"token\": \"#{token}\", \"expires\": \"#{expires.to_i}\"}")
113
+ File.write($magister_cachingDirectory + "/auth.json", "{\"#{school}/#{username}\": \"#{token}\", \"expires\": \"#{expires.to_i}\"}")
114
114
  end
115
115
  end
116
116
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magister
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Riley0122
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-29 00:00:00.000000000 Z
11
+ date: 2024-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json