rubyntlm 0.6.0 → 0.6.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.
- checksums.yaml +4 -4
- data/.travis.yml +8 -6
- data/lib/net/ntlm/encode_util.rb +1 -2
- data/lib/net/ntlm/version.rb +1 -1
- data/spec/lib/net/ntlm/encode_util_spec.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4f6956cb7312016f0dd160d795fc7835e9d9dd9
|
4
|
+
data.tar.gz: e81b31dd74c218f3765619086f03846dab005f0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae8d487fdeef742a2bc53a821fc491e26a5c34a5d7a1ae8b24d03c42dd0c842c7ec1591cf7a46028747d7411b3cf4b20ad5d396d812a7da0c601b1559d8aa625
|
7
|
+
data.tar.gz: b33ee3d2081189aae2b2567aef95f89e2e2bacbc03966b51da178d014b78bbc29b0c37a3488f1b86b2aeb23488b08dac71e1ea0142d324c5a09d8bca2f3a9067
|
data/.travis.yml
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 1.9
|
4
|
-
-
|
5
|
-
- 2.
|
6
|
-
- rbx-19mode
|
7
|
-
- rbx-18mode
|
8
|
-
- jruby-19mode
|
3
|
+
- 2.1.9
|
4
|
+
- 2.2.0
|
5
|
+
- 2.3.1
|
9
6
|
before_install:
|
10
7
|
- gem update bundler
|
8
|
+
|
9
|
+
# This prevents testing branches that are created just for PRs
|
10
|
+
branches:
|
11
|
+
only:
|
12
|
+
- master
|
data/lib/net/ntlm/encode_util.rb
CHANGED
@@ -27,7 +27,7 @@ module NTLM
|
|
27
27
|
# Decode a UTF16 string to a ASCII string
|
28
28
|
# @param [String] str The string to convert
|
29
29
|
def self.decode_utf16le(str)
|
30
|
-
str.force_encoding(Encoding::UTF_16LE)
|
30
|
+
str = str.dup.force_encoding(Encoding::UTF_16LE)
|
31
31
|
str.encode(Encoding::UTF_8, Encoding::UTF_16LE).force_encoding('UTF-8')
|
32
32
|
end
|
33
33
|
|
@@ -39,7 +39,6 @@ module NTLM
|
|
39
39
|
# the function will convert the string bytes to UTF-16LE and note the encoding as UTF-8 so that byte
|
40
40
|
# concatination works seamlessly.
|
41
41
|
def self.encode_utf16le(str)
|
42
|
-
str = str.force_encoding('UTF-8') if [::Encoding::ASCII_8BIT,::Encoding::US_ASCII].include?(str.encoding)
|
43
42
|
str.dup.force_encoding('UTF-8').encode(Encoding::UTF_16LE, Encoding::UTF_8).force_encoding('UTF-8')
|
44
43
|
end
|
45
44
|
end
|
data/lib/net/ntlm/version.rb
CHANGED
@@ -4,13 +4,13 @@ describe Net::NTLM::EncodeUtil do
|
|
4
4
|
|
5
5
|
context '#encode_utf16le' do
|
6
6
|
it 'should convert an ASCII string to UTF' do
|
7
|
-
expect(Net::NTLM::EncodeUtil.encode_utf16le('Test')).to eq("T\x00e\x00s\x00t\x00")
|
7
|
+
expect(Net::NTLM::EncodeUtil.encode_utf16le('Test'.encode(::Encoding::ASCII_8BIT).freeze)).to eq("T\x00e\x00s\x00t\x00")
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
11
|
context '#decode_utf16le' do
|
12
12
|
it 'should convert a UTF string to ASCII' do
|
13
|
-
expect(Net::NTLM::EncodeUtil.decode_utf16le("T\x00e\x00s\x00t\x00")).to eq('Test')
|
13
|
+
expect(Net::NTLM::EncodeUtil.decode_utf16le("T\x00e\x00s\x00t\x00".freeze)).to eq('Test')
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyntlm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kohei Kajimoto
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-09-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pry
|
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
155
|
version: '0'
|
156
156
|
requirements: []
|
157
157
|
rubyforge_project:
|
158
|
-
rubygems_version: 2.
|
158
|
+
rubygems_version: 2.6.6
|
159
159
|
signing_key:
|
160
160
|
specification_version: 4
|
161
161
|
summary: Ruby/NTLM library.
|