benchmark/bench-al.rb in ruby-activeldap-0.8.0 vs benchmark/bench-al.rb in ruby-activeldap-0.8.1

- old
+ new

@@ -53,11 +53,11 @@ prefix = suffixes.join(",") suffixes.unshift(suffix) name, value = suffix.split(/=/, 2) next unless name == "dc" dc_class = Class.new(ActiveLdap::Base) - dc_class.ldap_mapping :dnattr => "dc", + dc_class.ldap_mapping :dn_attribute => "dc", :prefix => "", :scope => :base, :classes => ["top", "dcObject", "organization"] dc_class.instance_variable_set("@base", prefix) next if dc_class.exists?(value, :prefix => "dc=#{value}") @@ -71,11 +71,11 @@ end end def populate_users ou_class = Class.new(ActiveLdap::Base) - ou_class.ldap_mapping :dnattr => "ou", + ou_class.ldap_mapping :dn_attribute => "ou", :prefix => "", :classes => ["top", "organizationalUnit"] ou_class.new(LDAP_PREFIX.split(/=/)[1]).save! 100.times do |i| @@ -107,10 +107,10 @@ } do_populate = LDAP_USER && LDAP_PASSWORD if do_populate - config[:bind_format] = LDAP_USER + config[:bind_dn] = LDAP_USER config[:password] = LDAP_PASSWORD end ActiveLdap::Base.establish_connection(config) if do_populate