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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96ed497ebb6619b61911e39777bf3d193909bc45
4
- data.tar.gz: 4396365cd33577c1b52db0ae516d8c1353293877
3
+ metadata.gz: f4f6956cb7312016f0dd160d795fc7835e9d9dd9
4
+ data.tar.gz: e81b31dd74c218f3765619086f03846dab005f0f
5
5
  SHA512:
6
- metadata.gz: 5959b911914ac4b71dc44296ee98345f874db4786da7630db08d016856bfa5555103e94310dd1bb0252211646c45ff87a3f94a9399be939e35ab0c8d32e067be
7
- data.tar.gz: 1ab87702641e2e9946527ee504020fad142445ce6ac78206102b3fa378550a9c44ebb51795089f081e72b56329234dd772c8da7281f44badfe976d28dbc47c73
6
+ metadata.gz: ae8d487fdeef742a2bc53a821fc491e26a5c34a5d7a1ae8b24d03c42dd0c842c7ec1591cf7a46028747d7411b3cf4b20ad5d396d812a7da0c601b1559d8aa625
7
+ data.tar.gz: b33ee3d2081189aae2b2567aef95f89e2e2bacbc03966b51da178d014b78bbc29b0c37a3488f1b86b2aeb23488b08dac71e1ea0142d324c5a09d8bca2f3a9067
@@ -1,10 +1,12 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 1.9.2
5
- - 2.0.0
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
@@ -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
@@ -4,7 +4,7 @@ module Net
4
4
  module VERSION
5
5
  MAJOR = 0
6
6
  MINOR = 6
7
- TINY = 0
7
+ TINY = 1
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  end
10
10
  end
@@ -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.0
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-02-16 00:00:00.000000000 Z
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.4.8
158
+ rubygems_version: 2.6.6
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: Ruby/NTLM library.