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.
@@ -932,7 +932,7 @@ require 'activeldap/configuration'
932
932
 
933
933
 
934
934
  module ActiveLDAP
935
- VERSION = "0.7.2"
935
+ VERSION = "0.7.3"
936
936
  end
937
937
 
938
938
  ActiveLDAP::Base.class_eval do
@@ -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 = true)
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 = true)
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()
@@ -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::generate_err2exceptions()
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.2
7
- date: 2006-05-22 00:00:00 +01:00
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