socialcast-net-ldap 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,7 @@ module Net::BER::Extensions::String
14
14
  end
15
15
 
16
16
  def raw_utf8_encoded
17
- if self.respond_to?(:encode)
17
+ if self.respond_to?(:encode) && self.encoding.name != 'ASCII-8BIT'
18
18
  # Strings should be UTF-8 encoded according to LDAP.
19
19
  # However, the BER code is not necessarily valid UTF-8
20
20
  self.encode('UTF-8').force_encoding('ASCII-8BIT')
data/lib/net/ldap.rb CHANGED
@@ -246,7 +246,7 @@ require 'net/ldap/entry'
246
246
  # and then keeps it open while it executes a user-supplied block.
247
247
  # Net::LDAP#open closes the connection on completion of the block.
248
248
  class Net::LDAP
249
- VERSION = "0.1.5"
249
+ VERSION = "0.1.6"
250
250
 
251
251
  class LdapError < StandardError; end
252
252
 
data/test/test_filter.rb CHANGED
@@ -19,6 +19,12 @@ class TestFilter < Test::Unit::TestCase
19
19
  Filter.__send__(:new, :xx, nil, nil)
20
20
  }
21
21
  end
22
+
23
+ def test_raw_utf8_encoded_on_ascii
24
+ assert_nothing_raised do
25
+ "0\r\x02\x01~\x04\b\x00\x00\x00\x00\x00\x01\x87\"".send :raw_utf8_encoded
26
+ end
27
+ end
22
28
 
23
29
  def test_to_s
24
30
  assert_equal("(uid=george *)", Filter.eq("uid", "george *").to_s)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socialcast-net-ldap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,44 +13,44 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2012-06-19 00:00:00.000000000 Z
16
+ date: 2012-06-21 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
- name: archive-tar-minitar
20
- requirement: &2152140580 !ruby/object:Gem::Requirement
19
+ name: rdoc
20
+ requirement: &2166869000 !ruby/object:Gem::Requirement
21
21
  none: false
22
22
  requirements:
23
23
  - - ~>
24
24
  - !ruby/object:Gem::Version
25
- version: 0.5.1
25
+ version: '3.10'
26
26
  type: :development
27
27
  prerelease: false
28
- version_requirements: *2152140580
28
+ version_requirements: *2166869000
29
29
  - !ruby/object:Gem::Dependency
30
- name: hanna
31
- requirement: &2152139360 !ruby/object:Gem::Requirement
30
+ name: archive-tar-minitar
31
+ requirement: &2166868560 !ruby/object:Gem::Requirement
32
32
  none: false
33
33
  requirements:
34
34
  - - ~>
35
35
  - !ruby/object:Gem::Version
36
- version: 0.1.2
36
+ version: 0.5.1
37
37
  type: :development
38
38
  prerelease: false
39
- version_requirements: *2152139360
39
+ version_requirements: *2166868560
40
40
  - !ruby/object:Gem::Dependency
41
- name: hoe-git
42
- requirement: &2152137020 !ruby/object:Gem::Requirement
41
+ name: hanna
42
+ requirement: &2166868120 !ruby/object:Gem::Requirement
43
43
  none: false
44
44
  requirements:
45
45
  - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: '1'
47
+ version: 0.1.2
48
48
  type: :development
49
49
  prerelease: false
50
- version_requirements: *2152137020
50
+ version_requirements: *2166868120
51
51
  - !ruby/object:Gem::Dependency
52
- name: metaid
53
- requirement: &2152135120 !ruby/object:Gem::Requirement
52
+ name: hoe-git
53
+ requirement: &2166867680 !ruby/object:Gem::Requirement
54
54
  none: false
55
55
  requirements:
56
56
  - - ~>
@@ -58,29 +58,29 @@ dependencies:
58
58
  version: '1'
59
59
  type: :development
60
60
  prerelease: false
61
- version_requirements: *2152135120
61
+ version_requirements: *2166867680
62
62
  - !ruby/object:Gem::Dependency
63
- name: rdoc
64
- requirement: &2152134420 !ruby/object:Gem::Requirement
63
+ name: metaid
64
+ requirement: &2166867020 !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: '3.10'
69
+ version: '1'
70
70
  type: :development
71
71
  prerelease: false
72
- version_requirements: *2152134420
72
+ version_requirements: *2166867020
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: hoe
75
- requirement: &2152133500 !ruby/object:Gem::Requirement
75
+ requirement: &2166866520 !ruby/object:Gem::Requirement
76
76
  none: false
77
77
  requirements:
78
78
  - - ~>
79
79
  - !ruby/object:Gem::Version
80
- version: '2.13'
80
+ version: '3.0'
81
81
  type: :development
82
82
  prerelease: false
83
- version_requirements: *2152133500
83
+ version_requirements: *2166866520
84
84
  description: Pure Ruby LDAP library.
85
85
  email:
86
86
  - blackhedd@rubyforge.org
@@ -91,10 +91,10 @@ email:
91
91
  executables: []
92
92
  extensions: []
93
93
  extra_rdoc_files:
94
+ - Hacking.rdoc
94
95
  - History.txt
95
96
  - Manifest.txt
96
97
  - README.txt
97
- - Hacking.rdoc
98
98
  files:
99
99
  - COPYING
100
100
  - Gemfile
@@ -142,7 +142,7 @@ files:
142
142
  - testserver/ldapserver.rb
143
143
  - testserver/testdata.ldif
144
144
  - .gemtest
145
- homepage: http://net-ldap.rubyforge.org/
145
+ homepage:
146
146
  licenses: []
147
147
  post_install_message:
148
148
  rdoc_options: