arel_extensions 1.3.10 → 1.3.11

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
  SHA256:
3
- metadata.gz: 4894bc95053ae6a7c8e12751985e6ae8b0bf0e46fb989c54dfabb96539bfe13f
4
- data.tar.gz: dfc9e4bacc8ed1000ce83ef49b379794c7c6e9b47b0f87733d92a5e5cce76418
3
+ metadata.gz: 3400a56df8e4af91b1f3ad156e7e8d25de41fd5c197635c5c61fb028978ff82b
4
+ data.tar.gz: 6ea1115d046885b8c8a6a9da1eeeda63ed69525480cbccaadf3e577bc6026615
5
5
  SHA512:
6
- metadata.gz: 6f859b1f5d5273e552dbbbc1e11449ec01c56f668017a1886f69259cf7f24f04293fef8239494e02fcb5595edf4e3ee5139cdca935e39410c9c7d590609ffd2b
7
- data.tar.gz: 39b2a9818b8231695ea48bfb40b30efcb0c801418475623759bbbdf54cde2c55e5859bc59af37f1cc9a837c4a1422dd3e7b2d07c205d14e5dcf4c4a158056e96
6
+ metadata.gz: ef2ff44409e0f6d18e715d2cbdace94d8079b3c0ce5350463cb449e73182b2a30db645c5caf72bd7678678cba54a6d43ff31806627c9095a5878b66ad821b9e6
7
+ data.tar.gz: 9d9aaf84fb4289d7d23cd3bf039be28ed7ea231db4470d73ca96226f151bbfc1f43a43bd501d0e02adb3e9d6295c7d1c19476bae214292f05d0bf537c99d3f8b
@@ -3,7 +3,13 @@ name: Build and Test
3
3
  # Ruby + Rails Compatibility Matrix from here:
4
4
  # https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
5
5
 
6
- on: [push, pull_request]
6
+ on:
7
+ push:
8
+ branches:
9
+ - master
10
+ pull_request:
11
+ branches:
12
+ - master
7
13
 
8
14
  jobs:
9
15
  job_test_to_sql:
data/NEWS.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # News
2
2
 
3
+ ## Release v2.1.11/v1.3.11
4
+
5
+ - MS SQL: turn on warnings on requires only when necessary.
6
+
3
7
  ## Release v2.1.10/v1.3.10
4
8
 
5
9
  - MS SQL: add support for jruby 9.4 via [activerecord-jdbc-alt-adapter](https://rubygems.org/gems/activerecord-jdbc-alt-adapter/)
@@ -1,3 +1,3 @@
1
1
  module ArelExtensions
2
- VERSION = '1.3.10'.freeze
2
+ VERSION = '1.3.11'.freeze
3
3
  end
@@ -4,12 +4,21 @@
4
4
  # 1. putting it inside the visitor or anywhere else will not
5
5
  # guarantee its actual loading.
6
6
  # 2. it needs to load before arel_extensions/visitors.
7
- if RUBY_PLATFORM == 'java' && Gem::Specification.find { |g| g.name == 'jdbc-mssql' }
7
+ if RUBY_PLATFORM == 'java' \
8
+ && RUBY_ENGINE == 'jruby' \
9
+ && (version = JRUBY_VERSION.split('.').map(&:to_i)) && version[0] == 9 && version[1] >= 4 \
10
+ && Gem::Specification.find { |g| g.name == 'jdbc-mssql' }
8
11
  begin
9
12
  require 'arel/visitors/sqlserver'
10
13
  rescue LoadError
11
14
  warn 'arel/visitors/sqlserver not found: MSSQL might not work correctly.'
12
15
  end
16
+ elsif RUBY_PLATFORM != 'java' && Arel::VERSION.to_i < 10
17
+ begin
18
+ require 'arel_sqlserver'
19
+ rescue LoadError
20
+ warn 'arel_sqlserver not found: SQLServer Visitor might not work correctly.'
21
+ end
13
22
  end
14
23
 
15
24
  require 'arel_extensions/visitors/convert_format'
@@ -38,15 +47,6 @@ if defined?(Arel::Visitors::DepthFirst)
38
47
  end
39
48
  end
40
49
 
41
- # Especially required here, not inside the next if, for Arel < 6.
42
- if RUBY_PLATFORM != 'java'
43
- begin
44
- require 'arel_sqlserver'
45
- rescue LoadError
46
- warn 'gem arel_sqlserver not found: SQLServer Visitor might not work correctly.'
47
- end
48
- end
49
-
50
50
  if defined?(Arel::Visitors::MSSQL)
51
51
  class Arel::Visitors::MSSQL
52
52
  include ArelExtensions::Visitors::MSSQL
data/version_v1.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ArelExtensions
2
- VERSION = '1.3.10'.freeze
2
+ VERSION = '1.3.11'.freeze
3
3
  end
data/version_v2.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ArelExtensions
2
- VERSION = '2.1.10'.freeze
2
+ VERSION = '2.1.11'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arel_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.10
4
+ version: 1.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yann Azoury
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-07-31 00:00:00.000000000 Z
13
+ date: 2024-08-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: arel