activeldap 3.2.1 → 3.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/.yardopts ADDED
@@ -0,0 +1,6 @@
1
+ --title ActiveLdap
2
+ --charset UTF-8
3
+ --readme README.textile
4
+ --files doc/text/**/*
5
+ --output-dir doc/reference/en
6
+ --exclude /templates/
data/Gemfile CHANGED
@@ -3,3 +3,10 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gemspec
6
+
7
+ group :test do
8
+ gem "net-ldap"
9
+ platforms :mri_18, :mri_19 do
10
+ gem "ruby-ldap"
11
+ end
12
+ end
data/README.textile CHANGED
@@ -137,3 +137,4 @@ list, please point out.
137
137
  * Hidetoshi Yoshimoto: Rails 3 support.
138
138
  * warden: A bug report.
139
139
  * bklier: A bug fix.
140
+ * Craig White: Bug reports.
@@ -1,5 +1,15 @@
1
1
  h1. News
2
2
 
3
+ h2(#3-2-2). 3.2.2: 2012-09-01
4
+
5
+ * Supported entry creation by direct ActiveLdap::Base use.
6
+ [Reported by Craig White]
7
+ * Started to use Travis CI.
8
+
9
+ h3. Thanks
10
+
11
+ * Craig White
12
+
3
13
  h2(#3-2-1). 3.2.1: 2012-08-31
4
14
 
5
15
  * Fixed a bug that ActiveLdap::Base#delete doesn't work.
@@ -66,7 +66,10 @@ module ActiveLdap
66
66
  message = _("parent must be an entry or parent DN: %s") % entry.inspect
67
67
  raise ArgumentError, message
68
68
  end
69
- destroy unless new_entry?
69
+ unless new_entry?
70
+ self.class.delete_entry(dn, :connection => connection)
71
+ @new_entry = true
72
+ end
70
73
  self.dn = "#{dn_attribute}=#{id},#{base}"
71
74
  save
72
75
  end
@@ -33,7 +33,7 @@ module ActiveLdap
33
33
 
34
34
  protected
35
35
  def set_attribute(name, value)
36
- if name != "objectClass"
36
+ if name and name != "objectClass"
37
37
  attribute_will_change!(name) unless value == get_attribute(name)
38
38
  end
39
39
  super
@@ -1,3 +1,3 @@
1
1
  module ActiveLdap
2
- VERSION = "3.2.1"
2
+ VERSION = "3.2.2"
3
3
  end
data/test/run-test.rb CHANGED
@@ -17,6 +17,7 @@ require "test/unit"
17
17
  require "test/unit/notify"
18
18
  Test::Unit::Priority.enable
19
19
 
20
+ succeeded = true
20
21
  target_adapters = [ENV["ACTIVE_LDAP_TEST_ADAPTER"]]
21
22
  # target_adapters << "ldap"
22
23
  # target_adapters << "net-ldap"
@@ -24,6 +25,10 @@ target_adapters = [ENV["ACTIVE_LDAP_TEST_ADAPTER"]]
24
25
  target_adapters.each do |adapter|
25
26
  ENV["ACTIVE_LDAP_TEST_ADAPTER"] = adapter
26
27
  puts "using adapter: #{adapter ? adapter : 'default'}"
27
- Test::Unit::AutoRunner.run(true, File.dirname($0), ARGV.dup)
28
+ unless Test::Unit::AutoRunner.run(true, File.dirname($0), ARGV.dup)
29
+ succeeded = false
30
+ end
28
31
  puts
29
32
  end
33
+
34
+ exit(succeeded)
data/test/test_dirty.rb CHANGED
@@ -81,4 +81,18 @@ class TestDirty < Test::Unit::TestCase
81
81
  end
82
82
  end
83
83
  end
84
+
85
+ class TestDNChange
86
+ def test_direct_base_use
87
+ leaf = ActiveLdap::Base.create
88
+ leaf.add_class("organizationalUnit")
89
+ leaf_dn = "ou=addressbook,#{user.dn}"
90
+ leaf.dn = leaf_dn
91
+ begin
92
+ leaf.save
93
+ ensure
94
+ ActiveLdap::Base.delete_entry(leaf_dn) if leaf.exists?
95
+ end
96
+ end
97
+ end
84
98
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeldap
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-08-31 00:00:00.000000000 Z
13
+ date: 2012-09-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
@@ -76,38 +76,6 @@ dependencies:
76
76
  - - ! '>='
77
77
  - !ruby/object:Gem::Version
78
78
  version: '0'
79
- - !ruby/object:Gem::Dependency
80
- name: ruby-ldap
81
- requirement: !ruby/object:Gem::Requirement
82
- none: false
83
- requirements:
84
- - - ! '>='
85
- - !ruby/object:Gem::Version
86
- version: '0'
87
- type: :development
88
- prerelease: false
89
- version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
- requirements:
92
- - - ! '>='
93
- - !ruby/object:Gem::Version
94
- version: '0'
95
- - !ruby/object:Gem::Dependency
96
- name: net-ldap
97
- requirement: !ruby/object:Gem::Requirement
98
- none: false
99
- requirements:
100
- - - ! '>='
101
- - !ruby/object:Gem::Version
102
- version: '0'
103
- type: :development
104
- prerelease: false
105
- version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
- requirements:
108
- - - ! '>='
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
79
  - !ruby/object:Gem::Dependency
112
80
  name: bundler
113
81
  requirement: !ruby/object:Gem::Requirement
@@ -215,6 +183,7 @@ executables: []
215
183
  extensions: []
216
184
  extra_rdoc_files: []
217
185
  files:
186
+ - .yardopts
218
187
  - COPYING
219
188
  - Gemfile
220
189
  - LICENSE
@@ -372,7 +341,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
372
341
  version: '0'
373
342
  segments:
374
343
  - 0
375
- hash: -4207865414253323478
344
+ hash: -1683428411697876490
376
345
  required_rubygems_version: !ruby/object:Gem::Requirement
377
346
  none: false
378
347
  requirements:
@@ -381,7 +350,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
381
350
  version: '0'
382
351
  segments:
383
352
  - 0
384
- hash: -4207865414253323478
353
+ hash: -1683428411697876490
385
354
  requirements: []
386
355
  rubyforge_project: ruby-activeldap
387
356
  rubygems_version: 1.8.23