omniauth-cas 3.0.1 → 3.0.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: 2de73f37fbd84b39dfff1317a99f4d50a7dd756e09a2b2c6686f08f740055305
4
- data.tar.gz: ac829cab419a5135fd8e57cc619e8290dac0002bdc55bcb1e1893e5ab8d2d115
3
+ metadata.gz: c081ab74fc1dca73df7c4a403c77714e378467d304f0bc461d63455944eee813
4
+ data.tar.gz: 13d48e3204d30d85b0d77a06cb0c9a4ae5e6a101075beef8f8cf9c781098305d
5
5
  SHA512:
6
- metadata.gz: a627507ea0c508e238fa4e347b704fb496fe69f6a38ba617799849cc9a1eb78a673577768b77db49b9745a0d78ab450171a8e924f505a1175cf19c3e562c87ca
7
- data.tar.gz: a2354812aea469f35a89ad1fe0f4f9462aa789418f839a82fb1246bf1b3dd40f797b5811a318f74917b4d224d2427e2131ef98c89eeaa89b1918dee5501b7f5d
6
+ metadata.gz: ca58926494b20100c4fa7400fd2bf173a0bb6e932875d80d7b9e5c660fc6a7848cf965294a6e3e7eabec1504e667070400089b70157d5ad6a43818de7dd91cda
7
+ data.tar.gz: 4658cf8858bbc9571cf2497c93c413f6c86512ad1c2149d9bdd02c38bf384a39198274d408065f8d9b9cbbf67da74f1608638908c2514b7607e61d0bb239a594
data/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/) and this
6
6
  project adheres to [Semantic Versioning](https://semver.org/)
7
7
 
8
+ ## 3.0.2 - 2025-07-26
9
+
10
+ * Minor refactor to service ticket validator (#96).
11
+
8
12
  ## 3.0.1 - 2025-02-28
9
13
 
10
14
  * Prefer `require_relative` over `require`
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module Cas
5
- VERSION = '3.0.1'
5
+ VERSION = '3.0.2'
6
6
  end
7
7
  end
@@ -58,23 +58,22 @@ module OmniAuth
58
58
  def parse_user_info(node)
59
59
  return nil if node.nil?
60
60
 
61
- {}.tap do |hash|
62
- node.children.each do |e|
63
- node_name = e.name.sub(/^cas:/, '')
64
- unless e.is_a?(Nokogiri::XML::Text) || node_name == 'proxies'
65
- # There are no child elements
66
- if e.element_children.count == 0
67
- hash[node_name] = attribute_value(hash, node_name, e.content)
68
- elsif e.element_children.count
69
- # JASIG style extra attributes
70
- if node_name == 'attributes'
71
- hash.merge!(parse_user_info(e))
72
- else
73
- hash[node_name] = [] if hash[node_name].nil?
74
- hash[node_name].push(parse_user_info(e))
75
- end
61
+ node.children.each_with_object({}) do |e, hash|
62
+ node_name = e.name.sub(/^cas:/, '')
63
+ unless e.is_a?(Nokogiri::XML::Text) || node_name == 'proxies'
64
+ # rubocop:disable Style/IfInsideElse -- preserve `else` branch for clarity
65
+ if e.element_children.empty?
66
+ hash[node_name] = attribute_value(hash, node_name, e.content)
67
+ else
68
+ # JASIG style extra attributes
69
+ if node_name == 'attributes'
70
+ hash.merge!(parse_user_info(e))
71
+ else
72
+ hash[node_name] = [] if hash[node_name].nil?
73
+ hash[node_name].push(parse_user_info(e))
76
74
  end
77
75
  end
76
+ # rubocop:enable Style/IfInsideElse
78
77
  end
79
78
  end
80
79
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-cas
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Lindahl
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-28 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: addressable
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
- rubygems_version: 3.6.2
94
+ rubygems_version: 3.6.9
95
95
  specification_version: 4
96
96
  summary: CAS Strategy for OmniAuth
97
97
  test_files: []