Permalink
Browse files

Drop :sort search option

In addition to being LDAP::Conn specific, :sort is actually handled
client side.  Ditch it.
  • Loading branch information...
1 parent eb71c0b commit 60a7347b8ef6f2cbade64607645dab672110cf56 @tpope committed Jan 30, 2011
Showing with 2 additions and 9 deletions.
  1. +1 −2 README.rdoc
  2. +0 −6 lib/ldaptic/adapters/ldap_conn_adapter.rb
  3. +1 −1 test/ldaptic_adapters_test.rb
View
@@ -34,11 +34,10 @@ based on which of the above two gems can be found. If the base is omitted, it
will use the first naming context on the server (usually what you want).
Entries are retrieved using the search method. Named parameters include
-:base, :filter, :sort, :limit, :scope, and :attributes. All are optional.
+:base, :scope, :filter, :attributes, :scope, and :limit. All are optional.
entries = Example.search(
:filter => {:objectClass => 'inetOrgPerson'},
- :sort => :cn,
:limit => 10
)
@@ -153,10 +153,6 @@ def paged_results_control(cookie = "", size = 126)
end
def search_parameters(options = {})
- case options[:sort]
- when Proc, Method then s_attr, s_proc = nil, options[:sort]
- else s_attr, s_proc = options[:sort], nil
- end
[
options[:base],
options[:scope],
@@ -165,8 +161,6 @@ def search_parameters(options = {})
options[:attributes_only],
options[:timeout].to_i,
((options[:timeout].to_f % 1) * 1e6).round,
- s_attr.to_s,
- s_proc
]
end
@@ -11,7 +11,7 @@ def setup
def test_should_parameterize_search_options
assert_equal(
- ["DC=org", 0, "(objectClass=*)", nil, false, 1, 10_000, "", nil],
+ ["DC=org", 0, "(objectClass=*)", nil, false, 1, 10_000],
@ldap_conn.instance_eval { search_parameters(
:base => "DC=org",
:scope => 0,

0 comments on commit 60a7347

Please sign in to comment.