activeldap 7.0.0 → 7.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +27 -1
- data/lib/active_ldap/adapter/net_ldap.rb +1 -1
- data/lib/active_ldap/associations.rb +2 -2
- data/lib/active_ldap/base.rb +4 -4
- data/lib/active_ldap/callbacks.rb +1 -1
- data/lib/active_ldap/compatible.rb +0 -12
- data/lib/active_ldap/configuration.rb +1 -1
- data/lib/active_ldap/connection.rb +3 -3
- data/lib/active_ldap/deprecator.rb +7 -0
- data/lib/active_ldap/ldif.rb +1 -1
- data/lib/active_ldap/operations.rb +1 -1
- data/lib/active_ldap/railtie.rb +5 -2
- data/lib/active_ldap/version.rb +1 -1
- data/lib/active_ldap.rb +2 -0
- data/test/test_associations.rb +1 -1
- metadata +6 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98229dfe7a23adefa5ac97f2a5bc44d2aab7b692caa9c00ecbd6a47acc588596
|
4
|
+
data.tar.gz: f9dc3de4af65f6bbcbf4ce5f1a7363ec7c819cef979e76c870b673ee00362b17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8b8af8dfa46f2ee5a9881d2065fad2f03773501a1b2bc38ebd529dc1476fbcc478f6f0ab07b83c8fe38fc9c63d41fbbb0e9d3eebbc9cc757b71fde89401d03b
|
7
|
+
data.tar.gz: a453265f81f2dd69d0cd55b4987c29087334bccba054c7ba25c5b01c19ef1f64fc85052f233f5e5de715c12792e8736e47d1143b1ccc4a2e4a9f62a84d83882f
|
data/doc/text/news.md
CHANGED
@@ -1,6 +1,32 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
-
## 7.
|
3
|
+
## 7.2.0: 2024-09-24 {#release-7-2-0}
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* Added support for Active Model 7.2.
|
8
|
+
|
9
|
+
* Dropped support for Active Model 5.
|
10
|
+
|
11
|
+
* Dropped support for Active Model 6.
|
12
|
+
|
13
|
+
* Added support for Psych 4.
|
14
|
+
* GH-198
|
15
|
+
* Patch by Carlos Palhares.
|
16
|
+
|
17
|
+
### Fixes
|
18
|
+
|
19
|
+
* net-ldap: Fixed paged search
|
20
|
+
* GH-197
|
21
|
+
* Patch by Patrick Marchi
|
22
|
+
|
23
|
+
### Thanks
|
24
|
+
|
25
|
+
* Patrick Marchi
|
26
|
+
|
27
|
+
* Carlos Palhares
|
28
|
+
|
29
|
+
## 7.0.0: 2024-02-23 {#release-7-0-0}
|
4
30
|
|
5
31
|
### Improvements
|
6
32
|
|
@@ -78,7 +78,7 @@ module ActiveLdap
|
|
78
78
|
filter: search_options[:filter],
|
79
79
|
attributes: search_options[:attributes],
|
80
80
|
size: search_options[:limit],
|
81
|
-
|
81
|
+
paged_searches_supported: search_options[:use_paged_results],
|
82
82
|
}
|
83
83
|
execute(:search, info, args) do |entry|
|
84
84
|
attributes = {}
|
@@ -67,7 +67,7 @@ module ActiveLdap
|
|
67
67
|
if foreign_key_name
|
68
68
|
message = _(":foreign_key belongs_to(:many) option is " \
|
69
69
|
"deprecated since 1.1.0. Use :primary_key instead.")
|
70
|
-
|
70
|
+
ActiveLdap.deprecator.warn(message)
|
71
71
|
opts[:primary_key_name] ||= foreign_key_name
|
72
72
|
end
|
73
73
|
opts[:primary_key_name] ||= dn_attribute
|
@@ -135,7 +135,7 @@ module ActiveLdap
|
|
135
135
|
!new.have_attribute?(primary_key_name)
|
136
136
|
message = _(":primary_key and :foreign_key has_many options are " \
|
137
137
|
"inverted their mean since 1.1.0. Please invert them.")
|
138
|
-
|
138
|
+
ActiveLdap.deprecator.warn(message)
|
139
139
|
opts[:foreign_key_name] = primary_key_name
|
140
140
|
opts[:primary_key_name] = foreign_key_name
|
141
141
|
end
|
data/lib/active_ldap/base.rb
CHANGED
@@ -55,7 +55,7 @@ module ActiveLdap
|
|
55
55
|
_("ActiveLdap::ConnectionNotEstablished has been deprecated " \
|
56
56
|
"since 1.1.0. " \
|
57
57
|
"Please use ActiveLdap::ConnectionNotSetup instead.")
|
58
|
-
|
58
|
+
ActiveLdap.deprecator.warn(message)
|
59
59
|
const_set("ConnectionNotEstablished", ConnectionNotSetup)
|
60
60
|
ConnectionNotEstablished
|
61
61
|
else
|
@@ -175,7 +175,7 @@ module ActiveLdap
|
|
175
175
|
NEAREST_MARK = "|@|"
|
176
176
|
private
|
177
177
|
def detect_nearest(line, column)
|
178
|
-
lines =
|
178
|
+
lines = @ldif.lines
|
179
179
|
nearest = lines[line - 1] || ""
|
180
180
|
if column - 1 == nearest.size # for JRuby 1.0.2 :<
|
181
181
|
nearest << NEAREST_MARK
|
@@ -205,7 +205,7 @@ module ActiveLdap
|
|
205
205
|
|
206
206
|
def numbered_ldif
|
207
207
|
return @ldif if @ldif.blank?
|
208
|
-
lines =
|
208
|
+
lines = @ldif.lines
|
209
209
|
format = "%#{Math.log10(lines.size).truncate + 1}d: %s"
|
210
210
|
i = 0
|
211
211
|
lines.collect do |line|
|
@@ -391,7 +391,7 @@ module ActiveLdap
|
|
391
391
|
_("ActiveLdap::Base.establish_connection has been deprecated " \
|
392
392
|
"since 1.1.0. " \
|
393
393
|
"Please use ActiveLdap::Base.setup_connection instead.")
|
394
|
-
|
394
|
+
ActiveLdap.deprecator.warn(message)
|
395
395
|
setup_connection(config)
|
396
396
|
end
|
397
397
|
|
@@ -26,7 +26,7 @@ module ActiveLdap
|
|
26
26
|
def method_added(meth)
|
27
27
|
super
|
28
28
|
if CALLBACKS.include?(meth.to_sym)
|
29
|
-
|
29
|
+
ActiveLdap.deprecator.warn("Base##{meth} has been deprecated, please use Base.#{meth} :method instead", caller[0,1])
|
30
30
|
send(meth.to_sym, meth.to_sym)
|
31
31
|
end
|
32
32
|
end
|
@@ -28,17 +28,5 @@ module ActiveLdap
|
|
28
28
|
object
|
29
29
|
end
|
30
30
|
end
|
31
|
-
|
32
|
-
if "".respond_to?(:lines)
|
33
|
-
def string_to_lines(string)
|
34
|
-
string.lines.to_a
|
35
|
-
end
|
36
|
-
else
|
37
|
-
def string_to_lines(string)
|
38
|
-
ary = []
|
39
|
-
string.each_line{|l| ary << l}
|
40
|
-
ary
|
41
|
-
end
|
42
|
-
end
|
43
31
|
end
|
44
32
|
end
|
@@ -137,7 +137,7 @@ module ActiveLdap
|
|
137
137
|
if key == :ldap_scope
|
138
138
|
message = _(":ldap_scope configuration option is deprecated. " \
|
139
139
|
"Use :scope instead.")
|
140
|
-
|
140
|
+
ActiveLdap.deprecator.warn(message)
|
141
141
|
end
|
142
142
|
target.scope = value
|
143
143
|
configuration[:scope] = value
|
@@ -97,7 +97,7 @@ module ActiveLdap
|
|
97
97
|
if config.has_key?(:ldap_scope)
|
98
98
|
message = _(":ldap_scope connection option is deprecated. " \
|
99
99
|
"Use :scope instead.")
|
100
|
-
|
100
|
+
ActiveLdap.deprecator.warn(message)
|
101
101
|
config[:scope] ||= config.delete(:ldap_scope)
|
102
102
|
end
|
103
103
|
config = remove_connection_related_configuration(config)
|
@@ -156,7 +156,7 @@ module ActiveLdap
|
|
156
156
|
_("ActiveLdap::Connection.establish_connection has been deprecated " \
|
157
157
|
"since 1.1.0. " \
|
158
158
|
"Please use ActiveLdap::Connection.setup_connection instead.")
|
159
|
-
|
159
|
+
ActiveLdap.deprecator.warn(message)
|
160
160
|
setup_connection(config)
|
161
161
|
end
|
162
162
|
|
@@ -216,7 +216,7 @@ module ActiveLdap
|
|
216
216
|
_("ActiveLdap::Connection#establish_connection has been deprecated " \
|
217
217
|
"since 1.1.0. " \
|
218
218
|
"Please use ActiveLdap::Connection#setup_connection instead.")
|
219
|
-
|
219
|
+
ActiveLdap.deprecator.warn(message)
|
220
220
|
setup_connection(config)
|
221
221
|
end
|
222
222
|
|
data/lib/active_ldap/ldif.rb
CHANGED
@@ -559,7 +559,7 @@ module ActiveLdap
|
|
559
559
|
_consumed_source = consumed_source
|
560
560
|
return 1 if _consumed_source.empty?
|
561
561
|
|
562
|
-
n =
|
562
|
+
n = _consumed_source.lines.size
|
563
563
|
n += 1 if _consumed_source[-1, 1] == "\n"
|
564
564
|
n
|
565
565
|
end
|
@@ -65,7 +65,7 @@ module ActiveLdap
|
|
65
65
|
if options.has_key?(:ldap_scope)
|
66
66
|
message = _(":ldap_scope search option is deprecated. " \
|
67
67
|
"Use :scope instead.")
|
68
|
-
|
68
|
+
ActiveLdap.deprecator.warn(message)
|
69
69
|
options[:scope] ||= options[:ldap_scope]
|
70
70
|
end
|
71
71
|
search_options = {
|
data/lib/active_ldap/railtie.rb
CHANGED
@@ -6,11 +6,14 @@ Locale.init(:driver => :cgi)
|
|
6
6
|
|
7
7
|
module ActiveLdap
|
8
8
|
class Railtie < Rails::Railtie
|
9
|
+
initializer "active_ldap.deprecator", before: :load_environment_config do |app|
|
10
|
+
app.deprecators[:active_ldap] = ActiveLdap.deprecator
|
11
|
+
end
|
12
|
+
|
9
13
|
initializer "active_ldap.setup_connection" do
|
10
14
|
ldap_configuration_file = Rails.root.join('config', 'ldap.yml')
|
11
15
|
if File.exist?(ldap_configuration_file)
|
12
|
-
configurations =
|
13
|
-
ActiveLdap::Base.configurations = configurations
|
16
|
+
ActiveLdap::Base.configurations = ActiveSupport::ConfigurationFile.parse(ldap_configuration_file)
|
14
17
|
ActiveLdap::Base.setup_connection
|
15
18
|
else
|
16
19
|
ActiveLdap::Base.class_eval do
|
data/lib/active_ldap/version.rb
CHANGED
data/lib/active_ldap.rb
CHANGED
data/test/test_associations.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeldap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Will Drewry
|
8
8
|
- Kouhei Sutou
|
9
|
-
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2024-
|
11
|
+
date: 2024-09-24 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: activemodel
|
@@ -17,14 +16,14 @@ dependencies:
|
|
17
16
|
requirements:
|
18
17
|
- - ">="
|
19
18
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
19
|
+
version: '7.0'
|
21
20
|
type: :runtime
|
22
21
|
prerelease: false
|
23
22
|
version_requirements: !ruby/object:Gem::Requirement
|
24
23
|
requirements:
|
25
24
|
- - ">="
|
26
25
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
26
|
+
version: '7.0'
|
28
27
|
- !ruby/object:Gem::Dependency
|
29
28
|
name: locale
|
30
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -243,6 +242,7 @@ files:
|
|
243
242
|
- lib/active_ldap/compatible.rb
|
244
243
|
- lib/active_ldap/configuration.rb
|
245
244
|
- lib/active_ldap/connection.rb
|
245
|
+
- lib/active_ldap/deprecator.rb
|
246
246
|
- lib/active_ldap/distinguished_name.rb
|
247
247
|
- lib/active_ldap/entry.rb
|
248
248
|
- lib/active_ldap/entry_attribute.rb
|
@@ -330,7 +330,6 @@ licenses:
|
|
330
330
|
- Ruby's
|
331
331
|
- GPLv2 or later
|
332
332
|
metadata: {}
|
333
|
-
post_install_message:
|
334
333
|
rdoc_options: []
|
335
334
|
require_paths:
|
336
335
|
- lib
|
@@ -345,8 +344,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
345
344
|
- !ruby/object:Gem::Version
|
346
345
|
version: '0'
|
347
346
|
requirements: []
|
348
|
-
rubygems_version: 3.
|
349
|
-
signing_key:
|
347
|
+
rubygems_version: 3.6.0.dev
|
350
348
|
specification_version: 4
|
351
349
|
summary: ActiveLdap is a object-oriented API to LDAP
|
352
350
|
test_files:
|