hubssolib 4.0.2 → 4.1.1

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: f56f69bd23843c0ff1575651e4a01eb111f121363ad046c0e3356ec14bdb5dcf
4
- data.tar.gz: f05e756267b131d91d3e3d71752781a33050cbd8b903cbe61d213614d229fe3d
3
+ metadata.gz: f3035432f69ae046e6de723684c7a03c177107db64792f48e36257b022c4c940
4
+ data.tar.gz: 20e0b9eeb1107716fb9d2df5c110ddae8881fef6679418050b61665fd3331d40
5
5
  SHA512:
6
- metadata.gz: c3fb0fe6bd80d59959116218cddb8d328e0cfeddd1de858ad352eb7fa3bf439237510a63695a057dd5d488bfd2a8027921f683b50ea7161343daf3983cd75fa8
7
- data.tar.gz: e637ddc3a7d73ad9892d8d17176d464485a501c6c60a045bb54551fb6bb2d5bc2c32dca9f80bceccba7c51b76216d664e40efcbc94a3116427f46e33f5854441
6
+ metadata.gz: abb832881a16e048588feb667360e97fbe8667336e63d0875315bce7323df6ad8f668ddd96a14e1c5c0e3d363a786a30d102cf3682fbae11783916e5859cc790
7
+ data.tar.gz: 90bf41d4e0dca4d6fceabfa9259fed8c1d5afdc215ce99e79af668f73031508da60ae63b5f46b25c3abfcc0c1229cac844a7317c11509327745dfbacdeb1d9f4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 4.1.1, 16-Oct-2026
2
+
3
+ * Swaps `JSON.fast_generate` to `JSON.generate`, since v3 of the JSON gem removes the former.
4
+ * General maintenance update.
5
+
6
+ ## 4.1.0, 31-Jul-2026
7
+
8
+ * Adds the concept of suspended Hub users. A Hub user with `user_suspended_at` set will always act as if logged out. This is backwards compatible, since the attribute when unset / `nil` means "not suspended".
9
+
10
+
1
11
  ## 4.0.0, 4.0.1 and 4.0.2, 24-Jul-2026
2
12
 
3
13
  * Despite the major version bump, this is a maintenance release for client apps. Integration for all Hub features including the Hub Trust mechanism is unchanged.
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hubssolib (4.0.1)
5
- base64 (~> 0.2)
4
+ hubssolib (4.1.1)
5
+ base64 (~> 0.3)
6
6
  drb (~> 2.2)
7
7
 
8
8
  GEM
@@ -10,29 +10,29 @@ GEM
10
10
  specs:
11
11
  action_text-trix (2.1.19)
12
12
  railties
13
- actioncable (8.1.3)
14
- actionpack (= 8.1.3)
15
- activesupport (= 8.1.3)
13
+ actioncable (8.1.4)
14
+ actionpack (= 8.1.4)
15
+ activesupport (= 8.1.4)
16
16
  nio4r (~> 2.0)
17
17
  websocket-driver (>= 0.6.1)
18
18
  zeitwerk (~> 2.6)
19
- actionmailbox (8.1.3)
20
- actionpack (= 8.1.3)
21
- activejob (= 8.1.3)
22
- activerecord (= 8.1.3)
23
- activestorage (= 8.1.3)
24
- activesupport (= 8.1.3)
19
+ actionmailbox (8.1.4)
20
+ actionpack (= 8.1.4)
21
+ activejob (= 8.1.4)
22
+ activerecord (= 8.1.4)
23
+ activestorage (= 8.1.4)
24
+ activesupport (= 8.1.4)
25
25
  mail (>= 2.8.0)
26
- actionmailer (8.1.3)
27
- actionpack (= 8.1.3)
28
- actionview (= 8.1.3)
29
- activejob (= 8.1.3)
30
- activesupport (= 8.1.3)
26
+ actionmailer (8.1.4)
27
+ actionpack (= 8.1.4)
28
+ actionview (= 8.1.4)
29
+ activejob (= 8.1.4)
30
+ activesupport (= 8.1.4)
31
31
  mail (>= 2.8.0)
32
32
  rails-dom-testing (~> 2.2)
33
- actionpack (8.1.3)
34
- actionview (= 8.1.3)
35
- activesupport (= 8.1.3)
33
+ actionpack (8.1.4)
34
+ actionview (= 8.1.4)
35
+ activesupport (= 8.1.4)
36
36
  nokogiri (>= 1.8.5)
37
37
  rack (>= 2.2.4)
38
38
  rack-session (>= 1.0.1)
@@ -40,36 +40,36 @@ GEM
40
40
  rails-dom-testing (~> 2.2)
41
41
  rails-html-sanitizer (~> 1.6)
42
42
  useragent (~> 0.16)
43
- actiontext (8.1.3)
43
+ actiontext (8.1.4)
44
44
  action_text-trix (~> 2.1.15)
45
- actionpack (= 8.1.3)
46
- activerecord (= 8.1.3)
47
- activestorage (= 8.1.3)
48
- activesupport (= 8.1.3)
45
+ actionpack (= 8.1.4)
46
+ activerecord (= 8.1.4)
47
+ activestorage (= 8.1.4)
48
+ activesupport (= 8.1.4)
49
49
  globalid (>= 0.6.0)
50
50
  nokogiri (>= 1.8.5)
51
- actionview (8.1.3)
52
- activesupport (= 8.1.3)
51
+ actionview (8.1.4)
52
+ activesupport (= 8.1.4)
53
53
  builder (~> 3.1)
54
54
  erubi (~> 1.11)
55
55
  rails-dom-testing (~> 2.2)
56
56
  rails-html-sanitizer (~> 1.6)
57
- activejob (8.1.3)
58
- activesupport (= 8.1.3)
57
+ activejob (8.1.4)
58
+ activesupport (= 8.1.4)
59
59
  globalid (>= 0.3.6)
60
- activemodel (8.1.3)
61
- activesupport (= 8.1.3)
62
- activerecord (8.1.3)
63
- activemodel (= 8.1.3)
64
- activesupport (= 8.1.3)
60
+ activemodel (8.1.4)
61
+ activesupport (= 8.1.4)
62
+ activerecord (8.1.4)
63
+ activemodel (= 8.1.4)
64
+ activesupport (= 8.1.4)
65
65
  timeout (>= 0.4.0)
66
- activestorage (8.1.3)
67
- actionpack (= 8.1.3)
68
- activejob (= 8.1.3)
69
- activerecord (= 8.1.3)
70
- activesupport (= 8.1.3)
66
+ activestorage (8.1.4)
67
+ actionpack (= 8.1.4)
68
+ activejob (= 8.1.4)
69
+ activerecord (= 8.1.4)
70
+ activesupport (= 8.1.4)
71
71
  marcel (~> 1.0)
72
- activesupport (8.1.3)
72
+ activesupport (8.1.4)
73
73
  base64
74
74
  bigdecimal
75
75
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -83,33 +83,32 @@ GEM
83
83
  tzinfo (~> 2.0, >= 2.0.5)
84
84
  uri (>= 0.13.1)
85
85
  base64 (0.3.0)
86
- bigdecimal (4.1.2)
86
+ bigdecimal (4.1.3)
87
87
  builder (3.3.0)
88
88
  concurrent-ruby (1.3.8)
89
89
  connection_pool (3.0.2)
90
90
  crass (1.0.7)
91
- date (3.5.1)
91
+ date (3.6.0)
92
92
  debug (1.11.1)
93
93
  irb (~> 1.10)
94
94
  reline (>= 0.3.8)
95
95
  diff-lcs (1.6.2)
96
- docile (1.4.1)
97
96
  doggo (1.4.0)
98
97
  rspec-core (~> 3.13)
99
98
  drb (2.2.3)
100
- erb (6.0.6)
99
+ erb (6.0.7)
101
100
  erubi (1.13.1)
102
101
  globalid (1.4.0)
103
102
  activesupport (>= 6.1)
104
103
  i18n (1.15.2)
105
104
  concurrent-ruby (~> 1.0)
106
- io-console (0.8.2)
105
+ io-console (0.9.4)
107
106
  irb (1.18.0)
108
107
  pp (>= 0.6.0)
109
108
  prism (>= 1.3.0)
110
109
  rdoc (>= 4.0.0)
111
110
  reline (>= 0.4.2)
112
- json (2.21.1)
111
+ json (3.1.0)
113
112
  logger (1.7.0)
114
113
  loofah (2.25.2)
115
114
  crass (~> 1.0.2)
@@ -126,14 +125,14 @@ GEM
126
125
  minitest (6.0.6)
127
126
  drb (~> 2.0)
128
127
  prism (~> 1.5)
129
- net-imap (0.6.6)
128
+ net-imap (0.6.8)
130
129
  date
131
130
  net-protocol
132
131
  net-pop (0.1.2)
133
132
  net-protocol
134
- net-protocol (0.2.2)
133
+ net-protocol (0.4.0)
135
134
  timeout
136
- net-smtp (0.5.1)
135
+ net-smtp (0.5.2)
137
136
  net-protocol
138
137
  nio4r (2.7.5)
139
138
  nokogiri (1.19.4)
@@ -141,10 +140,10 @@ GEM
141
140
  racc (~> 1.4)
142
141
  pp (0.6.4)
143
142
  prettyprint
144
- prettyprint (0.2.0)
143
+ prettyprint (0.2.1)
145
144
  prism (1.9.0)
146
145
  racc (1.8.1)
147
- rack (3.2.6)
146
+ rack (3.2.7)
148
147
  rack-session (2.1.2)
149
148
  base64 (>= 0.1.0)
150
149
  rack (>= 3.0.0)
@@ -152,20 +151,20 @@ GEM
152
151
  rack (>= 1.3)
153
152
  rackup (2.3.1)
154
153
  rack (>= 3)
155
- rails (8.1.3)
156
- actioncable (= 8.1.3)
157
- actionmailbox (= 8.1.3)
158
- actionmailer (= 8.1.3)
159
- actionpack (= 8.1.3)
160
- actiontext (= 8.1.3)
161
- actionview (= 8.1.3)
162
- activejob (= 8.1.3)
163
- activemodel (= 8.1.3)
164
- activerecord (= 8.1.3)
165
- activestorage (= 8.1.3)
166
- activesupport (= 8.1.3)
154
+ rails (8.1.4)
155
+ actioncable (= 8.1.4)
156
+ actionmailbox (= 8.1.4)
157
+ actionmailer (= 8.1.4)
158
+ actionpack (= 8.1.4)
159
+ actiontext (= 8.1.4)
160
+ actionview (= 8.1.4)
161
+ activejob (= 8.1.4)
162
+ activemodel (= 8.1.4)
163
+ activerecord (= 8.1.4)
164
+ activestorage (= 8.1.4)
165
+ activesupport (= 8.1.4)
167
166
  bundler (>= 1.15.0)
168
- railties (= 8.1.3)
167
+ railties (= 8.1.4)
169
168
  rails-dom-testing (2.3.0)
170
169
  activesupport (>= 5.0.0)
171
170
  minitest
@@ -173,9 +172,9 @@ GEM
173
172
  rails-html-sanitizer (1.7.1)
174
173
  loofah (~> 2.25, >= 2.25.2)
175
174
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
176
- railties (8.1.3)
177
- actionpack (= 8.1.3)
178
- activesupport (= 8.1.3)
175
+ railties (8.1.4)
176
+ actionpack (= 8.1.4)
177
+ activesupport (= 8.1.4)
179
178
  irb (~> 1.13)
180
179
  rackup (>= 1.0.0)
181
180
  rake (>= 12.2)
@@ -183,16 +182,16 @@ GEM
183
182
  tsort (>= 0.2)
184
183
  zeitwerk (~> 2.6)
185
184
  rake (13.4.2)
186
- rbs (4.0.3)
185
+ rbs (4.2.0)
187
186
  logger
188
187
  prism (>= 1.6.0)
189
188
  tsort
190
- rdoc (8.0.0)
189
+ rdoc (8.1.0)
191
190
  erb
192
191
  prism (>= 1.6.0)
193
192
  rbs (>= 4.0.0)
194
193
  tsort
195
- reline (0.6.3)
194
+ reline (0.7.0)
196
195
  io-console (~> 0.5)
197
196
  rspec (3.13.2)
198
197
  rspec-core (~> 3.13.0)
@@ -208,36 +207,31 @@ GEM
208
207
  rspec-support (~> 3.13.0)
209
208
  rspec-support (3.13.7)
210
209
  securerandom (0.4.1)
211
- simplecov (0.22.0)
212
- docile (~> 1.1)
213
- simplecov-html (~> 0.11)
214
- simplecov_json_formatter (~> 0.1)
215
- simplecov-html (0.13.2)
216
- simplecov_json_formatter (0.1.4)
210
+ simplecov (1.3.2)
217
211
  thor (1.5.0)
218
212
  timeout (0.6.1)
219
213
  tsort (0.2.0)
220
214
  tzinfo (2.0.6)
221
215
  concurrent-ruby (~> 1.0)
222
- uri (1.1.1)
216
+ uri (1.1.2)
223
217
  useragent (0.16.11)
224
218
  websocket-driver (0.8.2)
225
219
  base64
226
220
  websocket-extensions (>= 0.1.0)
227
221
  websocket-extensions (0.1.5)
228
- zeitwerk (2.8.2)
222
+ zeitwerk (2.8.3)
229
223
 
230
224
  PLATFORMS
231
225
  ruby
232
226
 
233
227
  DEPENDENCIES
234
- debug (~> 1.1)
228
+ debug (~> 1.11)
235
229
  doggo (~> 1.4)
236
230
  hubssolib!
237
- rails (~> 8.0)
231
+ rails (~> 8.1)
238
232
  rspec (~> 3.13)
239
233
  rspec-mocks (~> 3.13)
240
- simplecov (~> 0.22)
234
+ simplecov (~> 1.3)
241
235
 
242
236
  BUNDLED WITH
243
237
  4.0.10
Binary file
data/hubssolib.gemspec CHANGED
@@ -4,10 +4,10 @@ spec = Gem::Specification.new do |s|
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.name = 'hubssolib'
6
6
 
7
- s.version = '4.0.2'
7
+ s.version = '4.1.1'
8
8
  s.author = 'Andrew Hodgkinson and others'
9
9
  s.email = 'ahodgkin@rowing.org.uk'
10
- s.homepage = 'http://pond.org.uk/'
10
+ s.homepage = 'https://pond.org.uk/'
11
11
  s.summary = 'Cross-application single sign-on support library.'
12
12
  s.license = 'MIT'
13
13
 
@@ -27,11 +27,11 @@ spec = Gem::Specification.new do |s|
27
27
  s.required_ruby_version = '>= 3.0.0' # Not tested on earlier versions
28
28
 
29
29
  s.add_dependency 'drb', '~> 2.2'
30
- s.add_dependency 'base64', '~> 0.2'
30
+ s.add_dependency 'base64', '~> 0.3'
31
31
 
32
- s.add_development_dependency 'debug', '~> 1.1'
33
- s.add_development_dependency 'rails', '~> 8.0'
34
- s.add_development_dependency 'simplecov', '~> 0.22'
32
+ s.add_development_dependency 'debug', '~> 1.11'
33
+ s.add_development_dependency 'rails', '~> 8.1'
34
+ s.add_development_dependency 'simplecov', '~> 1.3'
35
35
  s.add_development_dependency 'doggo', '~> 1.4'
36
36
  s.add_development_dependency 'rspec', '~> 3.13'
37
37
  s.add_development_dependency 'rspec-mocks', '~> 3.13'
data/lib/hub_sso_lib.rb CHANGED
@@ -376,22 +376,23 @@ module HubSsoLib
376
376
  #
377
377
  class User
378
378
 
379
- attr_accessor :user_salt
380
- attr_accessor :user_roles
381
- attr_accessor :user_updated_at
382
379
  attr_accessor :user_activated_at
383
- attr_accessor :user_real_name
384
- attr_accessor :user_crypted_password
385
- attr_accessor :user_remember_token_expires_at
386
380
  attr_accessor :user_activation_code
387
- attr_accessor :user_member_id
381
+ attr_accessor :user_created_at
382
+ attr_accessor :user_crypted_password
383
+ attr_accessor :user_email
388
384
  attr_accessor :user_id
385
+ attr_accessor :user_member_id
389
386
  attr_accessor :user_password_reset_code
390
- attr_accessor :user_remember_token
391
- attr_accessor :user_email
392
- attr_accessor :user_created_at
393
387
  attr_accessor :user_password_reset_code_expires_at
388
+ attr_accessor :user_real_name
389
+ attr_accessor :user_remember_token
390
+ attr_accessor :user_remember_token_expires_at
391
+ attr_accessor :user_roles
392
+ attr_accessor :user_salt
393
+ attr_accessor :user_suspended_at
394
394
  attr_accessor :user_trusted
395
+ attr_accessor :user_updated_at
395
396
 
396
397
  end # User class
397
398
 
@@ -1052,7 +1053,11 @@ module HubSsoLib
1052
1053
  hub_session = self.hubssolib_get_session()
1053
1054
  user = hub_session&.session_user
1054
1055
 
1055
- return (user&.user_id.nil? ? nil : user)
1056
+ if user.nil? or user.user_id.nil? or ! user.user_suspended_at.nil?
1057
+ return nil
1058
+ else
1059
+ return user
1060
+ end
1056
1061
  end
1057
1062
 
1058
1063
  # Sets the currently signed in user. Note that although this works and is
@@ -1454,7 +1459,7 @@ module HubSsoLib
1454
1459
  task: task_name
1455
1460
  }
1456
1461
 
1457
- file.write(JSON.fast_generate(commands_hash))
1462
+ file.write(JSON.generate(commands_hash))
1458
1463
  file.truncate(file.pos)
1459
1464
  end
1460
1465
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubssolib
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Hodgkinson and others
@@ -29,56 +29,56 @@ dependencies:
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: '0.2'
32
+ version: '0.3'
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.2'
39
+ version: '0.3'
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: debug
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '1.1'
46
+ version: '1.11'
47
47
  type: :development
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '1.1'
53
+ version: '1.11'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: rails
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '8.0'
60
+ version: '8.1'
61
61
  type: :development
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '8.0'
67
+ version: '8.1'
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: simplecov
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '0.22'
74
+ version: '1.3'
75
75
  type: :development
76
76
  prerelease: false
77
77
  version_requirements: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.22'
81
+ version: '1.3'
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: doggo
84
84
  requirement: !ruby/object:Gem::Requirement
@@ -138,9 +138,10 @@ files:
138
138
  - Gemfile
139
139
  - Gemfile.lock
140
140
  - README.md
141
+ - hubssolib-3.8.0.gem
141
142
  - hubssolib.gemspec
142
143
  - lib/hub_sso_lib.rb
143
- homepage: http://pond.org.uk/
144
+ homepage: https://pond.org.uk/
144
145
  licenses:
145
146
  - MIT
146
147
  metadata: