activerecord-sqlserver-adapter 5.0.7 → 5.0.8

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: ed720945e4bf65c1f27ab82252ce3b7cabc68bd3
4
- data.tar.gz: 97c43ed79d857194b024a6cf67a4109c2a044520
3
+ metadata.gz: 604d2ce1e9d4b4cef171d452d9b3efa245c81a1d
4
+ data.tar.gz: e2140ae987d61715d208c777e80c0cd906806aed
5
5
  SHA512:
6
- metadata.gz: 349797f5adaf430a6982c70b7f2aa6b094304eadc8f51b9cfc9ef6718e17ddb8ca363d5b2d44832396d708eab0c7b9af52806092c1356707544d588a7467e286
7
- data.tar.gz: 21d23a980953ecddc4bb0124ab97216d34f7e70afb853d0a36571ff2a299235f9587ba953209209b8225d4c6ae220653fc84d5c9fe45e67a211559681218adb7
6
+ metadata.gz: b35a88380f1e42ef73aecd645b0967216e1537536c3df627a85597ecf851e0171106cfa056d6cfdc7c3b41d8be72104f55ce2b998e09053d6f464c7566bc7a9c
7
+ data.tar.gz: 3a82c5f018c28e58294766ad56777b023dda712fe0da2702b060351afa9935d8109c415605ae6a1efc08fc754554094c141894bbc61f783afa9d99586e15ab12
@@ -1,3 +1,7 @@
1
+ ## v5.0.8
2
+
3
+ * Memorized SQL Server Version to prevent a flood of SELECT @@version queries. Fixes #632
4
+
1
5
  ## v5.0.7
2
6
 
3
7
  * Add `WITH NO_INFOMSGS` to `user_options` method. Fixes #580
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.0.7
1
+ 5.0.8
@@ -418,11 +418,14 @@ module ActiveRecord
418
418
  end
419
419
 
420
420
  def version_year
421
- vstring = _raw_select('SELECT @@version', fetch: :rows).first.first.to_s
422
- return 2016 if vstring =~ /vNext/
423
- /SQL Server (\d+)/.match(vstring).to_a.last.to_s.to_i
424
- rescue Exception => e
425
- 2016
421
+ return @version_year if defined?(@version_year)
422
+ @version_year = begin
423
+ vstring = _raw_select('SELECT @@version', fetch: :rows).first.first.to_s
424
+ return 2016 if vstring =~ /vNext/
425
+ /SQL Server (\d+)/.match(vstring).to_a.last.to_s.to_i
426
+ rescue Exception => e
427
+ 2016
428
+ end
426
429
  end
427
430
 
428
431
  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: 5.0.7
4
+ version: 5.0.8
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: 2017-03-26 00:00:00.000000000 Z
17
+ date: 2017-12-30 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: activerecord