ucb_ldap 3.1.4 → 3.2.0

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: be216f579b159613fde7a79b5dc100e72a5e4454e855f225dfbd9df8ca6abfb6
4
- data.tar.gz: c1ad4e6dd11a2860f23473ca406f685597bf8f1961b44f9e95d52c181b1f7380
3
+ metadata.gz: a1c9ab2edf0879477a72b853a3e08582f9119c870bb36bf10ce9242b62e0b170
4
+ data.tar.gz: 02661ec9025485d04f567e3d0b2c407fcae286c73097228b3d78190bc607923b
5
5
  SHA512:
6
- metadata.gz: 02e1fec4d2d15e46bf45580efa58e8374de2821e119e81cda05d74326beaf61bd3ec0a1013a8d67db3ef553fc6bc9a49380a533c794b72a167839a890d6c79e2
7
- data.tar.gz: 27432f5acd6589f5b899b4d9122355315b18e1f18a1e7407443faa28e3ecf3736adc518c362bbf3cd925752ace3f4a967ba26ac7ea3e744e9064fe56a9bdcafc
6
+ metadata.gz: 35f6137aa483d89cfcb7813b02f766266945471f2d9b87141717db287ad304a502c0efdc00259c0ad938bbc61c4afcc3179f7592829058c66a2ceced71727e55
7
+ data.tar.gz: a94a1d42e624424dac8e912d01384c076069cbe3cb8269f6974e4f4c4e20eae1a8c2ef6dc9d82781ba94aac25f19ce4d53876c7a4720e938cd9f941ab3f0b1fd
data/CHANGELOG CHANGED
@@ -1,5 +1,12 @@
1
1
  # UCB::LDAP Changelog
2
2
 
3
+ ## Version 3.2.0, November 4, 2026
4
+ * Support Ruby 4.0: allow net-ldap >= 0.17.1, < 1.0 (the exact 0.17.1 pin broke on Ruby 4.0 because net-ldap 0.17.1 requires `ostruct` without declaring it; net-ldap 0.20+ declares it)
5
+ * Remove the unused `bundler ~> 1.3` development dependency pin
6
+ * Spec helper: replace `File.exists?` (removed in Ruby 3.2) with `File.exist?`
7
+ * Minimum Ruby is now 3.0 (net-ldap 0.20+)
8
+ * Spec helper: read LDAP credentials from `UCB_LDAP_USERNAME` / `UCB_LDAP_PASSWORD` (and optionally `UCB_LDAP_HOST`, `UCB_LDAP_INCLUDE_TEST_ENTRIES`) so specs can run without a credentials file; `spec/ldap_config.yml` still works. See "Running the specs" in the README
9
+
3
10
  ## Version 3.1.4, May 6, 2024
4
11
  * Move from berkeleyEduOfficialEmail to berkeleyAlternateId as source for officialemail and ucbemail
5
12
 
data/README.md CHANGED
@@ -87,7 +87,26 @@ If you want to access via a privileged bind, authenticate before querying:
87
87
  ## Dependencies
88
88
 
89
89
  * Net::LDAP
90
- * Ruby 2.2 or higher
90
+ * Ruby 3.0 or higher (required by net-ldap 0.20+; tested on Ruby 4.0)
91
+
92
+ ## Running the specs
93
+
94
+ The specs run against the live directory and need LDAP credentials. Supply them in one of two ways.
95
+
96
+ **Environment variables (preferred; nothing is written to disk):**
97
+
98
+ ```
99
+ read -rp 'LDAP user: ' UCB_LDAP_USERNAME
100
+ read -rsp 'LDAP password: ' UCB_LDAP_PASSWORD
101
+ export UCB_LDAP_USERNAME UCB_LDAP_PASSWORD
102
+ bundle exec rspec
103
+ ```
104
+
105
+ Optional: `UCB_LDAP_HOST` (default `ldap-test.berkeley.edu`) and `UCB_LDAP_INCLUDE_TEST_ENTRIES` (default `true`).
106
+
107
+ **Config file:** `cp spec/ldap_config.yml.example spec/ldap_config.yml`, fill in the username and password, and `chmod 600` it. The file is gitignored.
108
+
109
+ The environment is checked first, then the config file. Some org and person specs depend on live directory data and may fail when that data changes.
91
110
 
92
111
  ## Maintainers
93
112
 
@@ -1,3 +1,3 @@
1
1
  module UcbLdap
2
- VERSION = "3.1.4"
2
+ VERSION = "3.2.0"
3
3
  end
data/lib/ucb_ldap.rb CHANGED
@@ -205,7 +205,7 @@ module UCB
205
205
  @net_ldap = Net::LDAP.new(params)
206
206
  @net_ldap.bind || raise(BindFailedException)
207
207
  @net_ldap
208
- rescue Net::LDAP::Error => e
208
+ rescue Net::LDAP::Error
209
209
  raise(BindFailedException)
210
210
  end
211
211
 
data/ucb_ldap.gemspec CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = %q{Convenience classes for interacing with UCB's LDAP directory}
12
12
  spec.homepage = "https://github.com/ucb-ist-eas/ucb-ldap"
13
13
  spec.license = "MIT"
14
+ spec.required_ruby_version = ">= 3.0"
14
15
 
15
16
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
16
17
  f.match(%r{^(test|spec|features)/}) || f.match(/ucb_rails_cli.*\.gem/)
@@ -20,9 +21,9 @@ Gem::Specification.new do |spec|
20
21
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
22
  spec.require_paths = ["lib"]
22
23
 
23
- spec.add_development_dependency "bundler", "~> 1.3"
24
+ spec.add_development_dependency "bundler"
24
25
  spec.add_development_dependency "rake"
25
26
  spec.add_development_dependency "rspec"
26
27
 
27
- spec.add_runtime_dependency "net-ldap", "0.17.1"
28
+ spec.add_runtime_dependency "net-ldap", ">= 0.17.1", "< 1.0"
28
29
  end
metadata CHANGED
@@ -1,29 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ucb_ldap
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.4
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Hansen, Steve Downey, Darin Wilson
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-05-06 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - "~>"
16
+ - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: '1.3'
18
+ version: '0'
20
19
  type: :development
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
- - - "~>"
23
+ - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: '1.3'
25
+ version: '0'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: rake
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -56,16 +55,22 @@ dependencies:
56
55
  name: net-ldap
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
- - - '='
58
+ - - ">="
60
59
  - !ruby/object:Gem::Version
61
60
  version: 0.17.1
61
+ - - "<"
62
+ - !ruby/object:Gem::Version
63
+ version: '1.0'
62
64
  type: :runtime
63
65
  prerelease: false
64
66
  version_requirements: !ruby/object:Gem::Requirement
65
67
  requirements:
66
- - - '='
68
+ - - ">="
67
69
  - !ruby/object:Gem::Version
68
70
  version: 0.17.1
71
+ - - "<"
72
+ - !ruby/object:Gem::Version
73
+ version: '1.0'
69
74
  description: Convenience classes for interacing with UCB's LDAP directory
70
75
  email:
71
76
  - adminit@berkeley.edu
@@ -103,7 +108,6 @@ homepage: https://github.com/ucb-ist-eas/ucb-ldap
103
108
  licenses:
104
109
  - MIT
105
110
  metadata: {}
106
- post_install_message:
107
111
  rdoc_options: []
108
112
  require_paths:
109
113
  - lib
@@ -111,15 +115,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
115
  requirements:
112
116
  - - ">="
113
117
  - !ruby/object:Gem::Version
114
- version: '0'
118
+ version: '3.0'
115
119
  required_rubygems_version: !ruby/object:Gem::Requirement
116
120
  requirements:
117
121
  - - ">="
118
122
  - !ruby/object:Gem::Version
119
123
  version: '0'
120
124
  requirements: []
121
- rubygems_version: 3.2.33
122
- signing_key:
125
+ rubygems_version: 4.0.20
123
126
  specification_version: 4
124
127
  summary: Convenience classes for interacing with UCB's LDAP directory
125
128
  test_files: []