Skip to content

Commit

Permalink
Rubocop autocorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
HarlemSquirrel committed Jan 3, 2024
1 parent a40d203 commit 7f060e1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/net/ldap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1257,10 +1257,10 @@ def search_subschema_entry
rs = search(:ignore_server_caps => true, :base => "",
:scope => SearchScope_BaseObject,
:attributes => [:subschemaSubentry])
return Net::LDAP::Entry.new unless (rs and rs.first)
return Net::LDAP::Entry.new unless rs and rs.first

subschema_name = rs.first.subschemasubentry
return Net::LDAP::Entry.new unless (subschema_name and subschema_name.first)
return Net::LDAP::Entry.new unless subschema_name and subschema_name.first

rs = search(:ignore_server_caps => true, :base => subschema_name.first,
:scope => SearchScope_BaseObject,
Expand Down
2 changes: 1 addition & 1 deletion lib/net/ldap/auth_adapter/gss_spnego.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def bind(auth)
require 'ntlm'

user, psw = [auth[:username] || auth[:dn], auth[:password]]
raise Net::LDAP::BindingInformationInvalidError, "Invalid binding information" unless (user && psw)
raise Net::LDAP::BindingInformationInvalidError, "Invalid binding information" unless user && psw

nego = proc do |challenge|
t2_msg = NTLM::Message.parse(challenge)
Expand Down
2 changes: 1 addition & 1 deletion lib/net/ldap/auth_adapter/sasl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Sasl < Net::LDAP::AuthAdapter
def bind(auth)
mech, cred, chall = auth[:mechanism], auth[:initial_credential],
auth[:challenge_response]
raise Net::LDAP::BindingInformationInvalidError, "Invalid binding information" unless (mech && cred && chall)
raise Net::LDAP::BindingInformationInvalidError, "Invalid binding information" unless mech && cred && chall

message_id = @connection.next_msgid

Expand Down
2 changes: 1 addition & 1 deletion lib/net/ldap/auth_adapter/simple.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def bind(auth)
["", ""]
end

raise Net::LDAP::BindingInformationInvalidError, "Invalid binding information" unless (user && psw)
raise Net::LDAP::BindingInformationInvalidError, "Invalid binding information" unless user && psw

message_id = @connection.next_msgid
request = [
Expand Down

0 comments on commit 7f060e1

Please sign in to comment.