arel_extensions 2.1.10 → 2.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f73d2ef758683ad708737ff72c92f6015d87e8e12f712b26b5b265ca14bd0d4
4
- data.tar.gz: 06c759fd7e6609ea7d8c7cc4ff2060185d5d9e45aa9ae81f2a77b3c837a45364
3
+ metadata.gz: 51ed1c7c69dbce9930be558b479f990bc8fd02ef832636d6e85fb8f61e49e061
4
+ data.tar.gz: a21b33e04a82e151ea316b51c77fb2194651e50e17cdb59aa1aac4877ce1cc91
5
5
  SHA512:
6
- metadata.gz: 9a4eda851fc1a84082d55fbd8165c3faf9d5ad6cf5123581496c27eb4c2ff99a09230fcd8261a0f6c7b38b8f64c452f4394840a07d9cb67ab5d6893e59cd3f93
7
- data.tar.gz: 83c4046e5f3cea9098328d32f5ade612f77e7b68e89c5f21f46352046b3014844cedaf86aaaf26886570f8d4f1d2319a21647dfbd61c1d08ecba12eb3aa2b3da
6
+ metadata.gz: 892869bfbd9decc4455adb28192ba6215b2e1233507511dcf7c11dc22c3e381bf78b71143de3696d2182b00db6db1d5f96576ce0e75185d46a8924146f78631a
7
+ data.tar.gz: 7977681161be54fc824bd359aa3bc684c3945b1129b323cc21bb2b82cb3955173f1c40e9096fa52ad28016235d45644bac2666fae3519c90b6635642820ab68e
@@ -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 = '2.1.10'.freeze
2
+ VERSION = '2.1.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: 2.1.10
4
+ version: 2.1.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: activerecord