activerecord-sqlserver-adapter 3.2.15 → 3.2.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e03b8c4674cbb043de3f5188816a3fc6badd2aec
4
- data.tar.gz: 39771cc9337f0d33907dd2fa3b9af3634aae4611
3
+ metadata.gz: 726e72febb5f0fd2fecfb88581b92e6af50daac9
4
+ data.tar.gz: d2feeaa8cf3353c3551f4785fcb1f1e4006ef851
5
5
  SHA512:
6
- metadata.gz: 5ddaf90e91c344f1d69d5a90233979a7a956c57b3728af903d54daa1fe534623a140e755672bbfad12ab8f63d03d6a2b75737822d0cb08c39f227f20d219fb95
7
- data.tar.gz: 47de6c9473cc304be30f2baa8bfc1c75e015f41ba29a291dbaa6ac2ac60534a3c3d194f491f1a667af81a671689241aa90fd79fd1eeb855f2ee82cb85f5d9fe3
6
+ metadata.gz: 1091df35f40b10a76aeda89647cea24196822a14a2f730f6741c73a499bb77aac4dd1eea94b1cdeca20e25f0948d54efe94ca4e7ac044ba649081309b321d4cc
7
+ data.tar.gz: 1e7e1738c77ad41a15f0bbd298c99c3dbc1d69c037973e04a9b5e63ab48f3c9becc1336c701553cf9ad8a511c0b21c3e3ccd4d79d2cde91d30bdac07f20bca93
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ * 3.2.16 *
2
+
3
+ * All user optons to be array/hash. Fixes #540
4
+
1
5
  * 3.2.15 *
2
6
 
3
7
  * Added vNext support.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.15
1
+ 3.2.16
@@ -135,9 +135,17 @@ module ActiveRecord
135
135
 
136
136
  def user_options
137
137
  return {} if sqlserver_azure?
138
- select_rows("dbcc useroptions",'SCHEMA').inject(HashWithIndifferentAccess.new) do |values,row|
139
- set_option = row[0].gsub(/\s+/,'_')
140
- user_value = row[1]
138
+ # fixes #535
139
+ rows = select_rows('dbcc useroptions', 'SCHEMA')
140
+ rows = rows.first if rows.size == 2 && rows.last.empty?
141
+ rows.reduce(HashWithIndifferentAccess.new) do |values, row|
142
+ if row.instance_of? Hash
143
+ set_option = row.values[0].gsub(/\s+/, '_')
144
+ user_value = row.values[1]
145
+ elsif row.instance_of? Array
146
+ set_option = row[0].gsub(/\s+/, '_')
147
+ user_value = row[1]
148
+ end
141
149
  values[set_option] = user_value
142
150
  values
143
151
  end
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: 3.2.15
4
+ version: 3.2.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Collins
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2017-01-24 00:00:00.000000000 Z
15
+ date: 2017-01-31 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activerecord