magister 1.3.1 → 1.3.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/magister/authenticator.rb +2 -2
  3. metadata +2 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb906c0bf6e2273862a479e2a907059f437dfaaf1e67fc4f72efddbae0d04158
4
- data.tar.gz: 134cd679ba4c639a895bc8962872c465b438ef8b1011e59e88312f6311e49bc0
3
+ metadata.gz: 49898bcb456763eaf09a409b74c970350e5016f235fa91d18ec3a8b6213acaa9
4
+ data.tar.gz: baf41bd051d5f45d9c691bc6e9dd961c9ff3220a00e4e0ed52e2bebf6436fbba
5
5
  SHA512:
6
- metadata.gz: 3ffa124a04e89903d5b878133d4b7982d23ff82da62568b4c26d73a724c526076ffd4d0779e9e2c0301dc6788e61489aea5bf64c738dc3aaa6cc1129d99bc7b4
7
- data.tar.gz: d9e7e80a09396317ce37a8550271780054fb5f564a83068189f920b686d5a7469e16c646c528c4a1cc9977174d213fee16358197cf9af5a32e956112e082fe3f
6
+ metadata.gz: ce3046dee365d08a07fd780187bf4e672622251528a6845d43e7f5a9ebb68c1c37ea7ace9518709f7996f9da156c7329ef2456f7f348bea52f6b0e14a0b8c7af
7
+ data.tar.gz: 2199bbcca79427924224800b7293af9a30c484510a1bc66f518d49518b18124ab3d7acce1a5644935029788f3c170430a4bd0ea4d8c1f7b20b77bb78f8365c5e
@@ -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.3
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-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -72,20 +72,6 @@ dependencies:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '4.17'
75
- - !ruby/object:Gem::Dependency
76
- name: magister_cli
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
81
- version: '0'
82
- type: :runtime
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- version: '0'
89
75
  description: An unofficial Magister API wrapper for ruby
90
76
  email: contact@riley0122.dev
91
77
  executables: []