Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Drop :sort search option

In addition to being LDAP::Conn specific, :sort is actually handled
client side.  Ditch it.
  • Loading branch information...
commit 60a7347b8ef6f2cbade64607645dab672110cf56 1 parent eb71c0b
@tpope authored
View
3  README.rdoc
@@ -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
)
View
6 lib/ldaptic/adapters/ldap_conn_adapter.rb
@@ -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
View
2  test/ldaptic_adapters_test.rb
@@ -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,
Please sign in to comment.
Something went wrong with that request. Please try again.