activeldap 6.1.0 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd73013b75dc4f7aa629d12ba1b144ea34458f64f69245f1e78a399f5a5a7072
4
- data.tar.gz: 8ee47f89c8e5e9316bdbe7f9fdc620657a336dceb968751cf15ad8aae0d39e6f
3
+ metadata.gz: 46d1a0c273dff5757de13f0a8379278794a5b4f2c89a1ff60e9a7e97dd0f8867
4
+ data.tar.gz: ec7c5e06e7e75d46a55b5ea163f56fb85d833e82eb2d66b2f3fb9bc07ce7c7ce
5
5
  SHA512:
6
- metadata.gz: caaa12bfb35a8cf5838de135583e0165c7ef7a08e825b553f75dee95a26074430365f112cfb78cc11b42460ce039857af144c3e2d87da15426f97ade72c17eec
7
- data.tar.gz: a148359f6c91dafb62b3883cd3bd38e95ab0650f68243cc5a0d69229a591111b8625d816cf8db75ee4d128ad69b6352e054a1d5170542e38031272ca3434d623
6
+ metadata.gz: 7b1b5e88e3d2bf65bec620b15909f882cb3d4a386b0a482f7de18e88934cce1750ddc72175033b73accbb9a83f41e4ab947c9ffe4903abbca35ec1422c612978
7
+ data.tar.gz: dbf5a8751b7cd7235c9211738b50bb60a1450290c630a8a6a9a5faea2d3cac1ff8897cfb11ef98d5b87cc2bdda2128642d417638580c09659185b703a7efd0a5
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ gemspec
7
7
  group :test do
8
8
  gem "net-ldap"
9
9
  platforms :mri do
10
- gem "ruby-ldap"
10
+ gem "ruby-ldap" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.2.0")
11
11
  end
12
12
  platforms :jruby do
13
13
  gem "jruby-openssl"
data/doc/text/news.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # News
2
2
 
3
+ ## 7.0.0: 2024-02-23 {#release-6-1-1}
4
+
5
+ ### Improvements
6
+
7
+ * Added support for Active Model 7.
8
+ * GH-193
9
+ * GH-194
10
+ * GH-195
11
+ * Patch by J-Verz.
12
+
13
+ ### Thanks
14
+
15
+ * J-Verz
16
+
3
17
  ## 6.1.0: 2020-12-24 {#release-6-1-0}
4
18
 
5
19
  ### Improvements
@@ -7,8 +7,17 @@ module ActiveLdap
7
7
  target_names = entry_attribute.all_names
8
8
  target_names -= ['objectClass', 'objectClass'.underscore]
9
9
  super + target_names.uniq.collect do |attr|
10
- self.class.attribute_method_matchers.collect do |matcher|
11
- :"#{matcher.prefix}#{attr}#{matcher.suffix}"
10
+ method_patterns =
11
+ if self.class.respond_to?(:attribute_method_patterns)
12
+ # Support for ActiveModel >= 7.1.0
13
+ self.class.attribute_method_patterns
14
+ else
15
+ # Support for ActiveModel < 7.1.0
16
+ self.class.attribute_method_matchers
17
+ end
18
+
19
+ method_patterns.collect do |pattern|
20
+ pattern.method_name(attr).to_sym
12
21
  end
13
22
  end.flatten
14
23
  end
@@ -1036,7 +1036,13 @@ module ActiveLdap
1036
1036
  if value.is_a?(String) and value.length > 50
1037
1037
  "#{value[0, 50]}...".inspect
1038
1038
  elsif value.is_a?(Date) || value.is_a?(Time)
1039
- "#{value.to_s(:db)}"
1039
+ if value.respond_to?(:to_fs)
1040
+ # Support for Rails >= 7.0
1041
+ value.to_fs(:db)
1042
+ else
1043
+ # Support for Rails < 7.0
1044
+ value.to_s(:db)
1045
+ end
1040
1046
  else
1041
1047
  value.inspect
1042
1048
  end
@@ -29,11 +29,19 @@ module ActiveLdap
29
29
  name = 'LDAP: %s (%.1fms)' % [label, event.duration]
30
30
  inspected_info = info.inspect
31
31
 
32
+ formatting_options =
33
+ if ActiveSupport.version >= Gem::Version.new('7.1.0')
34
+ { bold: true }
35
+ else
36
+ # Fallback for ActiveSupport < 7.1.0
37
+ true
38
+ end
39
+
32
40
  if odd?
33
- name = color(name, CYAN, true)
34
- inspected_info = color(inspected_info, nil, true)
41
+ name = color(name, CYAN, formatting_options)
42
+ inspected_info = color(inspected_info, nil, formatting_options)
35
43
  else
36
- name = color(name, MAGENTA, true)
44
+ name = color(name, MAGENTA, formatting_options)
37
45
  end
38
46
 
39
47
  debug " #{name} #{inspected_info}"
@@ -1,3 +1,3 @@
1
1
  module ActiveLdap
2
- VERSION = "6.1.0"
2
+ VERSION = "7.0.0"
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeldap
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.0
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Drewry
8
8
  - Kouhei Sutou
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-12-24 00:00:00.000000000 Z
12
+ date: 2024-02-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -330,7 +330,7 @@ licenses:
330
330
  - Ruby's
331
331
  - GPLv2 or later
332
332
  metadata: {}
333
- post_install_message:
333
+ post_install_message:
334
334
  rdoc_options: []
335
335
  require_paths:
336
336
  - lib
@@ -345,8 +345,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
345
345
  - !ruby/object:Gem::Version
346
346
  version: '0'
347
347
  requirements: []
348
- rubygems_version: 3.2.0.rc.2
349
- signing_key:
348
+ rubygems_version: 3.5.1
349
+ signing_key:
350
350
  specification_version: 4
351
351
  summary: ActiveLdap is a object-oriented API to LDAP
352
352
  test_files: