net-ldap 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of net-ldap might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/History.rdoc +5 -0
- data/lib/net/ldap.rb +6 -0
- data/lib/net/ldap/auth_adapter/gss_spnego.rb +5 -4
- data/lib/net/ldap/error.rb +1 -0
- data/lib/net/ldap/version.rb +1 -1
- data/net-ldap.gemspec +1 -0
- data/test/test_ldap_connection.rb +13 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 421bbec8d29a64da8b006d4403383c4fb9d71de0
|
4
|
+
data.tar.gz: 78ede43bcf3b9c3818ea80dac400f708698ae3c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2324d55ee702dc88b23a643e15c2accfeb26ec499dd86c5fd482b2db234608d74b854579640b72ae034da947c62f730bcfa9edd1d81f0e274bcc5ed990814223
|
7
|
+
data.tar.gz: e9507e6cc5eefc8e307965e067345e81f3bfad5c1af998689075f80fbb8facd4eca5c6af5c2225da3e3611f51ab45c80413c7bcf779ae8726d8a68a85b50d8b8
|
data/History.rdoc
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
=== Net::LDAP 0.12.1
|
2
|
+
|
3
|
+
* Whitespace formatting cleanup {#236}[https://github.com/ruby-ldap/ruby-net-ldap/pull/236]
|
4
|
+
* Set operation result if LDAP server is not accessible {#232}[https://github.com/ruby-ldap/ruby-net-ldap/pull/232]
|
5
|
+
|
1
6
|
=== Net::LDAP 0.12.0
|
2
7
|
|
3
8
|
* DRY up connection handling logic {#224}[https://github.com/ruby-ldap/ruby-net-ldap/pull/224]
|
data/lib/net/ldap.rb
CHANGED
@@ -1243,5 +1243,11 @@ class Net::LDAP
|
|
1243
1243
|
:hosts => @hosts,
|
1244
1244
|
:encryption => @encryption,
|
1245
1245
|
:instrumentation_service => @instrumentation_service
|
1246
|
+
rescue Errno::ECONNREFUSED, Net::LDAP::ConnectionRefusedError => e
|
1247
|
+
@result = {
|
1248
|
+
:resultCode => 52,
|
1249
|
+
:errorMessage => ResultStrings[ResultCodeUnavailable]
|
1250
|
+
}
|
1251
|
+
raise e
|
1246
1252
|
end
|
1247
1253
|
end # class LDAP
|
@@ -29,10 +29,11 @@ module Net
|
|
29
29
|
t3_msg.serialize
|
30
30
|
}
|
31
31
|
|
32
|
-
Net::LDAP::AuthAdapter::Sasl.new(@connection).
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
Net::LDAP::AuthAdapter::Sasl.new(@connection).bind \
|
33
|
+
:method => :sasl,
|
34
|
+
:mechanism => "GSS-SPNEGO",
|
35
|
+
:initial_credential => NTLM::Message::Type1.new.serialize,
|
36
|
+
:challenge_response => nego
|
36
37
|
end
|
37
38
|
end
|
38
39
|
end
|
data/lib/net/ldap/error.rb
CHANGED
data/lib/net/ldap/version.rb
CHANGED
data/net-ldap.gemspec
CHANGED
@@ -47,6 +47,19 @@ class TestLDAPConnection < Test::Unit::TestCase
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
+
def test_result_for_connection_failed_is_set
|
51
|
+
flexmock(TCPSocket).should_receive(:new).and_raise(Errno::ECONNREFUSED)
|
52
|
+
|
53
|
+
ldap_client = Net::LDAP.new(host: '127.0.0.1', port: 12345)
|
54
|
+
|
55
|
+
assert_raise Net::LDAP::ConnectionRefusedError do
|
56
|
+
ldap_client.bind(method: :simple, username: 'asdf', password: 'asdf')
|
57
|
+
end
|
58
|
+
|
59
|
+
assert_equal(ldap_client.get_operation_result.code, 52)
|
60
|
+
assert_equal(ldap_client.get_operation_result.message, 'Unavailable')
|
61
|
+
end
|
62
|
+
|
50
63
|
def test_unresponsive_host
|
51
64
|
assert_raise Net::LDAP::Error do
|
52
65
|
Net::LDAP::Connection.new(:host => 'test.mocked.com', :port => 636)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-ldap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francis Cianfrocca
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2015-
|
16
|
+
date: 2015-11-11 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: flexmock
|
@@ -71,6 +71,20 @@ dependencies:
|
|
71
71
|
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
|
+
- !ruby/object:Gem::Dependency
|
75
|
+
name: byebug
|
76
|
+
requirement: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
type: :development
|
82
|
+
prerelease: false
|
83
|
+
version_requirements: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
74
88
|
description: |-
|
75
89
|
Net::LDAP for Ruby (also called net-ldap) implements client access for the
|
76
90
|
Lightweight Directory Access Protocol (LDAP), an IETF standard protocol for
|