activerecord-sqlserver-adapter 4.2.13 → 4.2.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/VERSION +1 -1
- data/appveyor.yml +1 -1
- data/lib/active_record/connection_adapters/sqlserver/type/char.rb +1 -1
- data/lib/active_record/connection_adapters/sqlserver_adapter.rb +8 -1
- data/lib/active_record/tasks/sqlserver_database_tasks.rb +0 -1
- data/test/cases/specific_schema_test_sqlserver.rb +10 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d48925cc69817fb38f75ba9ce678d5df931b7d7
|
4
|
+
data.tar.gz: f0cd00edff4e8b9fb009b239368c8cb799e48e66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43b840b4991b0584ab46219d2d427adbd28b3c67586726b8367ac124927b3fb05d99ba4034706c4486df66a00dffdd731fc3b1d9cad36be35b0da747e912a1c6
|
7
|
+
data.tar.gz: 09c590c4c7e253e493c130addfee719741b308f453274ecfce1f3da4a4ecc770cf91e18e7600325bf6d89c273e6c6e47070be433502e71ea25d5b92d015da4c6
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## v4.2.15
|
2
|
+
|
3
|
+
#### Fixed
|
4
|
+
|
5
|
+
* Removed errand puts statment from database tasks.
|
6
|
+
* Fix quoting of non-national columns.
|
7
|
+
|
8
|
+
|
9
|
+
## v4.2.14
|
10
|
+
|
11
|
+
#### Fixed
|
12
|
+
|
13
|
+
* Fix rescue constants for optional connection gems. Fixes #475.
|
14
|
+
|
15
|
+
|
1
16
|
## v4.2.13
|
2
17
|
|
3
18
|
#### Fixed
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.2.
|
1
|
+
4.2.15
|
data/appveyor.yml
CHANGED
@@ -133,7 +133,7 @@ module ActiveRecord
|
|
133
133
|
return false unless @connection
|
134
134
|
raw_connection_do 'SELECT 1'
|
135
135
|
true
|
136
|
-
rescue
|
136
|
+
rescue *connection_errors
|
137
137
|
false
|
138
138
|
end
|
139
139
|
|
@@ -307,6 +307,13 @@ module ActiveRecord
|
|
307
307
|
configure_connection
|
308
308
|
end
|
309
309
|
|
310
|
+
def connection_errors
|
311
|
+
@connection_errors ||= [].tap do |errors|
|
312
|
+
errors << TinyTds::Error if defined?(TinyTds::Error)
|
313
|
+
errors << ODBC::Error if defined?(ODBC::Error)
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
310
317
|
def dblib_connect(config)
|
311
318
|
TinyTds::Client.new(
|
312
319
|
dataserver: config[:dataserver],
|
@@ -61,7 +61,6 @@ module ActiveRecord
|
|
61
61
|
command.concat(table_args)
|
62
62
|
view_args = connection.views.map { |v| Shellwords.escape(v) }
|
63
63
|
command.concat(view_args)
|
64
|
-
puts command.inspect
|
65
64
|
raise 'Error dumping database' unless Kernel.system(command.join(' '))
|
66
65
|
dump = File.read(filename)
|
67
66
|
dump.gsub!(/^USE .*$\nGO\n/, '') # Strip db USE statements
|
@@ -125,6 +125,16 @@ class SpecificSchemaTestSQLServer < ActiveRecord::TestCase
|
|
125
125
|
assert_sql(/@0 = 'T'/) { SSTestDatatypeMigration.where(varchar_col: 'T').first }
|
126
126
|
end
|
127
127
|
|
128
|
+
it 'can update and hence properly quoted non-national char/varchar columns' do
|
129
|
+
o = SSTestDatatypeMigration.create!
|
130
|
+
o.varchar_col = "O'Reilly"
|
131
|
+
o.save!
|
132
|
+
o.reload.varchar_col.must_equal "O'Reilly"
|
133
|
+
o.varchar_col = nil
|
134
|
+
o.save!
|
135
|
+
o.reload.varchar_col.must_be_nil
|
136
|
+
end
|
137
|
+
|
128
138
|
# With column names that have spaces
|
129
139
|
|
130
140
|
it 'create record using a custom attribute reader and be able to load it back in' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-sqlserver-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Collins
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2016-05-
|
17
|
+
date: 2016-05-30 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: activerecord
|
@@ -251,3 +251,4 @@ test_files:
|
|
251
251
|
- test/support/paths_sqlserver.rb
|
252
252
|
- test/support/rake_helpers.rb
|
253
253
|
- test/support/sql_counter_sqlserver.rb
|
254
|
+
has_rdoc:
|