tiny_tds 0.9.5.beta.11-x64-mingw32 → 0.9.5.beta.12-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/appveyor.yml +3 -3
- data/lib/tiny_tds/client.rb +4 -1
- data/test/client_test.rb +38 -14
- data/test/thread_test.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b86cd3a6dabce5be3b2119522a04f5c56d22aa41
|
4
|
+
data.tar.gz: 1f03fb522526cefe9150a4d83949b0653f022b8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dff97f80fdf43f165fb32c2fb7cf72b00d58b5b9fbbde43a338bad5e28004ab6f1210725dabee3e96e30bc0cf0cc6fd7de6b819eac23204e02d6d1324286be8b
|
7
|
+
data.tar.gz: 148c9502a58c40fb881f694119b8edd1eac9e49cde8ed84f23caa644dddc8c2fd24ca8bcd3be6eaaaa2d5613d8460d6cf2b17b6f969d6d1507ba109ed45cc78a
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.5.beta.
|
1
|
+
0.9.5.beta.12
|
data/appveyor.yml
CHANGED
@@ -40,11 +40,11 @@ test_script:
|
|
40
40
|
- bundle exec rake TINYTDS_UNIT_HOST_TEST=%CI_AZURE_HOST% TINYTDS_UNIT_HOST=%CI_AZURE_HOST% TINYTDS_SCHEMA=sqlserver_azure TDSVER=7.3
|
41
41
|
environment:
|
42
42
|
CI_AZURE_HOST:
|
43
|
-
secure:
|
43
|
+
secure: Qkf6IJGISn6/WK9Feu71wLLQx7g0RMNfjj/YwNE+zJE=
|
44
44
|
TINYTDS_UNIT_AZURE_USER:
|
45
|
-
secure:
|
45
|
+
secure: a/9Rph59mNJMObcpJ7mrimqZ+pOth8NLY9iiroFUob4=
|
46
46
|
TINYTDS_UNIT_AZURE_PASS:
|
47
|
-
secure:
|
47
|
+
secure: fYKSKV4v+36OFQp2nZdX4DfUpgmy5cm0wuR73cgdmEk=
|
48
48
|
matrix:
|
49
49
|
- ruby_version: "200"
|
50
50
|
- ruby_version: "22"
|
data/lib/tiny_tds/client.rb
CHANGED
@@ -64,9 +64,12 @@ module TinyTds
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def parse_username(opts)
|
67
|
+
host = opts[:host]
|
67
68
|
username = opts[:username]
|
68
|
-
return username if username.nil? || !opts[:azure]
|
69
|
+
return username if username.nil? || !opts[:azure]
|
70
|
+
return username if username.include?("@") && !username.include?("database.windows.net")
|
69
71
|
user, domain = username.split("@")
|
72
|
+
domain ||= host
|
70
73
|
"#{user}@#{domain.split('.').first}"
|
71
74
|
end
|
72
75
|
|
data/test/client_test.rb
CHANGED
@@ -151,15 +151,9 @@ class ClientTest < TinyTds::TestCase
|
|
151
151
|
options = connection_options :username => 'willnotwork'
|
152
152
|
action = lambda { new_connection(options) }
|
153
153
|
assert_raise_tinytds_error(action) do |e|
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
assert_match %r{login failed}i, e.message, 'ignore if non-english test run'
|
158
|
-
else
|
159
|
-
assert_equal sybase_ase? ? 4002 : 18456, e.db_error_number
|
160
|
-
assert_equal 14, e.severity
|
161
|
-
assert_match %r{login failed}i, e.message, 'ignore if non-english test run'
|
162
|
-
end
|
154
|
+
assert_equal sybase_ase? ? 4002 : 18456, e.db_error_number
|
155
|
+
assert_equal 14, e.severity
|
156
|
+
assert_match %r{login failed}i, e.message, 'ignore if non-english test run'
|
163
157
|
end
|
164
158
|
assert_new_connections_work
|
165
159
|
end
|
@@ -171,18 +165,48 @@ class ClientTest < TinyTds::TestCase
|
|
171
165
|
let(:client) { @client = new_connection }
|
172
166
|
|
173
167
|
it '#parse_username returns username if azure is not true' do
|
174
|
-
username = 'user@
|
168
|
+
username = 'user@abc123.database.windows.net'
|
175
169
|
client.send(:parse_username, username: username).must_equal username
|
176
170
|
end
|
177
171
|
|
178
172
|
it '#parse_username returns short username if azure is true' do
|
179
|
-
|
180
|
-
|
173
|
+
client.send(:parse_username,
|
174
|
+
username: 'user@abc123.database.windows.net',
|
175
|
+
host: 'abc123.database.windows.net',
|
176
|
+
azure: true
|
177
|
+
).must_equal 'user@abc123'
|
178
|
+
end
|
179
|
+
|
180
|
+
it '#parse_username returns full username if azure is false' do
|
181
|
+
client.send(:parse_username,
|
182
|
+
username: 'user@abc123.database.windows.net',
|
183
|
+
host: 'abc123.database.windows.net',
|
184
|
+
azure: false
|
185
|
+
).must_equal 'user@abc123.database.windows.net'
|
181
186
|
end
|
182
187
|
|
183
188
|
it '#parse_username returns short username if passed and azure is true' do
|
184
|
-
|
185
|
-
|
189
|
+
client.send(:parse_username,
|
190
|
+
username: 'user@abc123',
|
191
|
+
host: 'abc123.database.windows.net',
|
192
|
+
azure: true
|
193
|
+
).must_equal 'user@abc123'
|
194
|
+
end
|
195
|
+
|
196
|
+
it '#parse_username returns username with servername if passed and azure is true' do
|
197
|
+
client.send(:parse_username,
|
198
|
+
username: 'user',
|
199
|
+
host: 'abc123.database.windows.net',
|
200
|
+
azure: true
|
201
|
+
).must_equal 'user@abc123'
|
202
|
+
end
|
203
|
+
|
204
|
+
it '#parse_username returns username with servername if passed and azure is false' do
|
205
|
+
client.send(:parse_username,
|
206
|
+
username: 'user',
|
207
|
+
host: 'abc123.database.windows.net',
|
208
|
+
azure: false
|
209
|
+
).must_equal 'user'
|
186
210
|
end
|
187
211
|
|
188
212
|
end
|
data/test/thread_test.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiny_tds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.5.beta.
|
4
|
+
version: 0.9.5.beta.12
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Ken Collins
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-01-
|
13
|
+
date: 2016-01-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mini_portile2
|