ruby-activeldap-debug 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/activeldap.rb +1 -1
- data/lib/activeldap/associations.rb +4 -2
- data/lib/activeldap/ldap.rb +5 -3
- metadata +2 -2
data/lib/activeldap.rb
CHANGED
@@ -107,7 +107,8 @@ module ActiveLDAP
|
|
107
107
|
key = options[:foreign_key] || association_id.to_s + "_id"
|
108
108
|
local_key = options[:local_key] || ''
|
109
109
|
class_eval <<-"end_eval"
|
110
|
-
def #{association_id}(objects =
|
110
|
+
def #{association_id}(objects = nil)
|
111
|
+
objects = @@config[:return_objects] if objects.nil?
|
111
112
|
local_key = "#{local_key}"
|
112
113
|
local_key = dnattr() if local_key.empty?
|
113
114
|
results = []
|
@@ -136,7 +137,8 @@ module ActiveLDAP
|
|
136
137
|
key = options[:local_key] || association_id.to_s + "_id"
|
137
138
|
foreign_key = options[:foreign_key] || ''
|
138
139
|
class_eval <<-"end_eval"
|
139
|
-
def #{association_id}(objects =
|
140
|
+
def #{association_id}(objects = nil)
|
141
|
+
objects = @@config[:return_objects] if objects.nil?
|
140
142
|
foreign_key = "#{foreign_key}"
|
141
143
|
if foreign_key.empty?
|
142
144
|
foreign_key = dnattr()
|
data/lib/activeldap/ldap.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# Copyright 2006 Will Drewry <will@alum.bu.edu>
|
4
4
|
# Some portions Copyright 2006 Google Inc
|
5
5
|
|
6
|
-
|
6
|
+
require 'ldap'
|
7
7
|
|
8
8
|
module LDAP
|
9
9
|
class PrettyError < RuntimeError
|
@@ -68,7 +68,7 @@ module LDAP
|
|
68
68
|
# Calls err2exception() with 1...100 to
|
69
69
|
# pregenerate all the constants for errors.
|
70
70
|
# TODO: look at other support LDAP SDKs for weirdness
|
71
|
-
def LDAP
|
71
|
+
def LDAP.generate_err2exceptions()
|
72
72
|
hash = {}
|
73
73
|
ERRORS.each do |err|
|
74
74
|
begin
|
@@ -105,7 +105,9 @@ module LDAP
|
|
105
105
|
end
|
106
106
|
return [exc, err2string(errno)]
|
107
107
|
end
|
108
|
+
|
109
|
+
|
108
110
|
end
|
109
111
|
|
110
|
-
# Generate
|
112
|
+
# Generate LDAP constants
|
111
113
|
LDAP::generate_err2exceptions()
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: ruby-activeldap-debug
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.7.
|
7
|
-
date: 2006-05-
|
6
|
+
version: 0.7.3
|
7
|
+
date: 2006-05-30 00:00:00 +01:00
|
8
8
|
summary: Ruby/ActiveLDAP is a object-oriented API to LDAP
|
9
9
|
require_paths:
|
10
10
|
- lib
|