arel_extensions 1.3.1 → 1.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +1 -2
  3. data/.github/workflows/ruby.yml +4 -4
  4. data/.rubocop.yml +25 -1
  5. data/Gemfile +10 -10
  6. data/README.md +24 -4
  7. data/Rakefile +4 -4
  8. data/TODO +0 -1
  9. data/arel_extensions.gemspec +12 -12
  10. data/gemfiles/rails3.gemfile +10 -10
  11. data/gemfiles/rails4.gemfile +13 -13
  12. data/gemfiles/rails5_0.gemfile +12 -12
  13. data/gemfiles/rails5_1_4.gemfile +12 -12
  14. data/gemfiles/rails5_2.gemfile +13 -13
  15. data/gemfiles/rails6.gemfile +11 -11
  16. data/gemfiles/rails6_1.gemfile +11 -11
  17. data/gemfiles/rails7.gemfile +7 -7
  18. data/gemspecs/arel_extensions-v1.gemspec +12 -12
  19. data/gemspecs/arel_extensions-v2.gemspec +11 -11
  20. data/init/mssql.sql +0 -0
  21. data/init/mysql.sql +0 -0
  22. data/init/oracle.sql +0 -0
  23. data/init/postgresql.sql +0 -0
  24. data/init/sqlite.sql +0 -0
  25. data/lib/arel_extensions/attributes.rb +2 -2
  26. data/lib/arel_extensions/boolean_functions.rb +2 -4
  27. data/lib/arel_extensions/common_sql_functions.rb +10 -10
  28. data/lib/arel_extensions/comparators.rb +14 -14
  29. data/lib/arel_extensions/date_duration.rb +7 -7
  30. data/lib/arel_extensions/helpers.rb +16 -13
  31. data/lib/arel_extensions/insert_manager.rb +1 -1
  32. data/lib/arel_extensions/math.rb +16 -18
  33. data/lib/arel_extensions/math_functions.rb +18 -18
  34. data/lib/arel_extensions/nodes/abs.rb +0 -0
  35. data/lib/arel_extensions/nodes/aggregate_function.rb +0 -0
  36. data/lib/arel_extensions/nodes/blank.rb +1 -1
  37. data/lib/arel_extensions/nodes/case.rb +4 -6
  38. data/lib/arel_extensions/nodes/cast.rb +3 -3
  39. data/lib/arel_extensions/nodes/ceil.rb +0 -0
  40. data/lib/arel_extensions/nodes/change_case.rb +0 -0
  41. data/lib/arel_extensions/nodes/coalesce.rb +0 -0
  42. data/lib/arel_extensions/nodes/collate.rb +9 -9
  43. data/lib/arel_extensions/nodes/concat.rb +2 -2
  44. data/lib/arel_extensions/nodes/date_diff.rb +6 -6
  45. data/lib/arel_extensions/nodes/duration.rb +0 -0
  46. data/lib/arel_extensions/nodes/find_in_set.rb +0 -0
  47. data/lib/arel_extensions/nodes/floor.rb +0 -0
  48. data/lib/arel_extensions/nodes/format.rb +1 -1
  49. data/lib/arel_extensions/nodes/formatted_number.rb +2 -2
  50. data/lib/arel_extensions/nodes/function.rb +21 -21
  51. data/lib/arel_extensions/nodes/is_null.rb +0 -0
  52. data/lib/arel_extensions/nodes/json.rb +7 -7
  53. data/lib/arel_extensions/nodes/length.rb +0 -0
  54. data/lib/arel_extensions/nodes/levenshtein_distance.rb +1 -1
  55. data/lib/arel_extensions/nodes/locate.rb +0 -0
  56. data/lib/arel_extensions/nodes/log10.rb +0 -0
  57. data/lib/arel_extensions/nodes/matches.rb +1 -1
  58. data/lib/arel_extensions/nodes/md5.rb +0 -0
  59. data/lib/arel_extensions/nodes/power.rb +0 -0
  60. data/lib/arel_extensions/nodes/rand.rb +0 -0
  61. data/lib/arel_extensions/nodes/repeat.rb +0 -0
  62. data/lib/arel_extensions/nodes/replace.rb +2 -2
  63. data/lib/arel_extensions/nodes/round.rb +0 -0
  64. data/lib/arel_extensions/nodes/soundex.rb +2 -2
  65. data/lib/arel_extensions/nodes/std.rb +0 -0
  66. data/lib/arel_extensions/nodes/substring.rb +0 -0
  67. data/lib/arel_extensions/nodes/sum.rb +0 -0
  68. data/lib/arel_extensions/nodes/then.rb +0 -0
  69. data/lib/arel_extensions/nodes/trim.rb +0 -0
  70. data/lib/arel_extensions/nodes/union.rb +4 -4
  71. data/lib/arel_extensions/nodes/union_all.rb +3 -3
  72. data/lib/arel_extensions/nodes/wday.rb +0 -0
  73. data/lib/arel_extensions/nodes.rb +0 -0
  74. data/lib/arel_extensions/null_functions.rb +0 -0
  75. data/lib/arel_extensions/predications.rb +10 -10
  76. data/lib/arel_extensions/railtie.rb +1 -1
  77. data/lib/arel_extensions/set_functions.rb +3 -3
  78. data/lib/arel_extensions/string_functions.rb +8 -8
  79. data/lib/arel_extensions/tasks.rb +2 -2
  80. data/lib/arel_extensions/version.rb +1 -1
  81. data/lib/arel_extensions/visitors/convert_format.rb +0 -0
  82. data/lib/arel_extensions/visitors/ibm_db.rb +19 -19
  83. data/lib/arel_extensions/visitors/mssql.rb +139 -118
  84. data/lib/arel_extensions/visitors/mysql.rb +145 -144
  85. data/lib/arel_extensions/visitors/oracle.rb +136 -128
  86. data/lib/arel_extensions/visitors/oracle12.rb +16 -16
  87. data/lib/arel_extensions/visitors/postgresql.rb +147 -136
  88. data/lib/arel_extensions/visitors/sqlite.rb +83 -85
  89. data/lib/arel_extensions/visitors/to_sql.rb +143 -148
  90. data/lib/arel_extensions/visitors.rb +7 -7
  91. data/lib/arel_extensions.rb +46 -32
  92. data/test/arelx_test_helper.rb +14 -14
  93. data/test/database.yml +5 -5
  94. data/test/real_db_test.rb +78 -78
  95. data/test/support/fake_record.rb +1 -1
  96. data/test/test_comparators.rb +5 -5
  97. data/test/visitors/test_bulk_insert_oracle.rb +4 -4
  98. data/test/visitors/test_bulk_insert_sqlite.rb +4 -4
  99. data/test/visitors/test_bulk_insert_to_sql.rb +4 -4
  100. data/test/visitors/test_oracle.rb +14 -14
  101. data/test/visitors/test_to_sql.rb +82 -82
  102. data/test/with_ar/all_agnostic_test.rb +415 -313
  103. data/test/with_ar/insert_agnostic_test.rb +17 -14
  104. data/test/with_ar/test_bulk_sqlite.rb +4 -4
  105. data/test/with_ar/test_math_sqlite.rb +12 -12
  106. data/test/with_ar/test_string_mysql.rb +20 -20
  107. data/test/with_ar/test_string_sqlite.rb +20 -20
  108. data/version_v1.rb +1 -1
  109. data/version_v2.rb +1 -1
  110. metadata +2 -9
  111. data/.travis/oracle/download.js +0 -152
  112. data/.travis/oracle/download.sh +0 -30
  113. data/.travis/oracle/download_ojdbc.js +0 -116
  114. data/.travis/oracle/install.sh +0 -34
  115. data/.travis/setup_accounts.sh +0 -9
  116. data/.travis/sqlite3/extension-functions.sh +0 -6
  117. data/.travis.yml +0 -193
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 632b32bb630753413ebde8d2ad0d9b567aab88697c64b5abbbf1f50e53789690
4
- data.tar.gz: 7d8c0d52c2c07ff36362dbe00b68c1e3216b3924dbd98fea99e5b643953b217e
3
+ metadata.gz: 8cccb0b1ca82955d6b7505600c43eb2fd64a79a7a002aa5d7c3ae73a20f0c81d
4
+ data.tar.gz: 7d43ef3dd1245d583d99873a15245d1e734450612c0bae55f230e48a8a3ad569
5
5
  SHA512:
6
- metadata.gz: 54438691157a004658d1ce8f3e4c47e76bdaab4d0f569199f13add0bef389dd91c2cc99807625ef18b9e96cdf570069fa529d55720e9393e8ce3783470e24156
7
- data.tar.gz: cfc50270090b43b343444dbecba639b32966b1a45fb5f475338b140e5641c14353007f01cb7228a1870445e808244fa441bdf4fcab7a31fdd2e6e8618bb901bf
6
+ metadata.gz: c48cdf4cdc3ed8b607f0e3d16f577adc3847469509f18a81caa57315bd34afd159b04630ccc2e565452422f581193210cb02131a81d33656b5e1104397e2cc52
7
+ data.tar.gz: 7e776e1b749e7fd1756df5f4095e88c6c95fd320a1ad902983452d0146ce38dd0e6b30ec252955db397a3b27e6c745a11af13bba306ad7fe11c507ca24eb2691
data/.codeclimate.yml CHANGED
@@ -21,5 +21,4 @@ ratings:
21
21
  - "**.rb"
22
22
  - "**.md"
23
23
  exclude_paths:
24
- - .travis/**/*
25
- - test/**/*
24
+ - test/**/*
@@ -162,13 +162,13 @@ jobs:
162
162
  postgres:
163
163
  image: postgres:11.6-alpine
164
164
  env:
165
- POSTGRES_DB: arext_test
165
+ POSTGRES_DB: arelx_test
166
166
  POSTGRES_PASSWORD: secret
167
167
  ports:
168
168
  - 5432:5432
169
169
  # needed because the postgres container does not provide a healthcheck
170
170
  options: >-
171
- --health-cmd "pg_isready -d arext_test -U postgres -p 5432"
171
+ --health-cmd "pg_isready -d arelx_test -U postgres -p 5432"
172
172
  --health-interval 10s
173
173
  --health-timeout 5s
174
174
  --health-retries 5
@@ -229,7 +229,7 @@ jobs:
229
229
  env:
230
230
  MYSQL_ALLOW_EMPTY_PASSWORD: true
231
231
  MYSQL_USERNAME: root
232
- MYSQL_DATABASE: arext_test
232
+ MYSQL_DATABASE: arelx_test
233
233
  ports:
234
234
  - 3306:3306
235
235
  options: >-
@@ -268,7 +268,7 @@ jobs:
268
268
  DB_CONNECTION: mysql
269
269
  DB_HOST: 127.0.0.1
270
270
  DB_PORT: 3306
271
- DB_DATABASE: arext_test
271
+ DB_DATABASE: arelx_test
272
272
  DB_USERNAME: root
273
273
  run: bundle exec rake test:mysql
274
274
 
data/.rubocop.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  AllCops:
2
2
  DisabledByDefault: true
3
3
  Exclude:
4
- - "test/**/*"
4
+ - "vendor/**/*"
5
5
 
6
6
  Layout/EndOfLine:
7
7
  Enabled: true
@@ -9,12 +9,27 @@ Layout/EndOfLine:
9
9
  Layout/ExtraSpacing:
10
10
  Enabled: true
11
11
 
12
+ Layout/IndentationWidth:
13
+ Enabled: true
14
+
15
+ Layout/LineLength:
16
+ Enabled: false
17
+
18
+ Layout/SpaceAfterComma:
19
+ Enabled: true
20
+
12
21
  Layout/SpaceAroundEqualsInParameterDefault:
13
22
  Enabled: true
14
23
 
24
+ Layout/SpaceAroundOperators:
25
+ Enabled: true
26
+
15
27
  Layout/TrailingEmptyLines:
16
28
  Enabled: true
17
29
 
30
+ Metrics/BlockLength:
31
+ Enabled: false
32
+
18
33
  Naming/FileName:
19
34
  Enabled: true
20
35
 
@@ -39,6 +54,15 @@ Style/Encoding:
39
54
  Style/MethodCallWithArgsParentheses:
40
55
  Enabled: false
41
56
 
57
+ Style/MethodCallWithoutArgsParentheses:
58
+ Enabled: true
59
+
60
+ Style/NegatedIf:
61
+ Enabled: false
62
+
63
+ Style/StringLiterals:
64
+ Enabled: true
65
+
42
66
  # Performance cops have been transferred to rubocop-performance gem.
43
67
  require: rubocop-performance
44
68
 
data/Gemfile CHANGED
@@ -1,19 +1,19 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
- gem "sqlite3", '<= 1.3.13', platforms: [:mri]
7
- gem "mysql2", '0.4.10', platforms: [:mri]
8
- gem "pg", '< 1', platforms: [:mri]
6
+ gem 'sqlite3', '<= 1.3.13', platforms: [:mri]
7
+ gem 'mysql2', '0.4.10', platforms: [:mri]
8
+ gem 'pg', '< 1', platforms: [:mri]
9
9
 
10
- gem "jdbc-sqlite3", platforms: :jruby
11
- gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
12
- gem "activerecord-jdbcmysql-adapter", platforms: :jruby
13
- gem "activerecord-jdbcpostgresql-adapter", platforms: :jruby
10
+ gem 'jdbc-sqlite3', platforms: :jruby
11
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
12
+ gem 'activerecord-jdbcmysql-adapter', platforms: :jruby
13
+ gem 'activerecord-jdbcpostgresql-adapter', platforms: :jruby
14
14
 
15
- gem "tiny_tds", '~> 2.1', require: false, platforms: [:mri, :mingw, :x64_mingw, :mswin]
16
- gem "activerecord-sqlserver-adapter", '~> 6.0', platforms: [:mri, :mingw, :x64_mingw, :mswin]
15
+ gem 'tiny_tds', '~> 2.1', require: false, platforms: [:mri, :mingw, :x64_mingw, :mswin]
16
+ gem 'activerecord-sqlserver-adapter', '~> 6.0', platforms: [:mri, :mingw, :x64_mingw, :mswin]
17
17
 
18
18
  gem 'ruby-oci8', platforms: [:mri, :mswin, :x64_mingw, :mingw]
19
19
  gem 'activerecord-oracle_enhanced-adapter', '~> 1.6.0'
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # Arel Extensions
2
2
 
3
- [![Travis Build Status](https://img.shields.io/travis/Faveod/arel-extensions.svg?label=Travis%20build)](http://travis-ci.org/Faveod/arel-extensions)
4
- [![AppVeyor Build Status](https://img.shields.io/appveyor/ci/yazfav/arel-extensions.svg?label=AppVeyor%20build)](https://ci.appveyor.com/project/yazfav/arel-extensions)
3
+ ![GitHub workflow](https://github.com/Faveod/arel-extensions/actions/workflows/ruby.yml/badge.svg)
5
4
  [![Security](https://hakiri.io/github/Faveod/arel-extensions/master.svg)](https://hakiri.io/github/Faveod/arel-extensions/master)
6
5
  ![](http://img.shields.io/badge/license-MIT-brightgreen.svg)
7
6
 
@@ -152,7 +151,9 @@ t[:birthdate].format('%Y-%m-%d').to_sql
152
151
  ```
153
152
 
154
153
  Which formats the datetime without any time zone conversion.
155
- The second form is:
154
+ The second form accepts 2 kinds of values:
155
+
156
+ 1. String:
156
157
 
157
158
  ```ruby
158
159
  t[:birthdate].format('%Y/%m/%d %H:%M:%S', 'posix/Pacific/Tahiti')
@@ -162,7 +163,18 @@ t[:birthdate].format('%Y/%m/%d %H:%M:%S', 'posix/Pacific/Tahiti')
162
163
  # ^^^^^^^^^^^^^^^^^^^^ 🚨 Invalid timezone for SQL Server. Explanation below.
163
164
  ```
164
165
 
165
- This will convert the datetime field to the supplied time zone.
166
+ which will convert the datetime field to the supplied time zone. This generally
167
+ means that you're letting the RDBMS decide or infer what is the timezone of the
168
+ column before conversion to the supplied timezone.
169
+
170
+ 1. Hash of the form `{ src_time_zone => dst_time_zone }`:
171
+
172
+ ```ruby
173
+ t[:birthdate].format('%Y/%m/%d %H:%M:%S', { 'posix/Europe/Paris' => 'posix/Pacific/Tahiti' })
174
+ ```
175
+
176
+ which will explicitly indicate the original timestamp that should be considered
177
+ by the RDBMS.
166
178
 
167
179
  Warning:
168
180
 
@@ -176,6 +188,14 @@ Warning:
176
188
  - ☣️ Choosing abbreviate forms like `CET`, which stands for `Central European
177
189
  Time` will behave differently on `PostgreSQL` and `MySQL`. Don't assume
178
190
  uniform behavior, or even a _rational_ one.
191
+ - ⚠️ Pay attention to the type of the `datetime` column you're working with. For
192
+ example, in Postgres, a `datetime` can be one of the following types:
193
+ 1. `timestamp with time zone`
194
+ 2. `timestamp without time zone`
195
+ In the first case, you don't need to supply a conversion hash because postgres
196
+ knows how to convert it to the desired time zone. However, if you do the same
197
+ for the second case, you might get surprises, especially if your Postgres
198
+ installation's default timezone is not `UTC`.
179
199
  - ⚠️ SQLite is not supported.
180
200
  - 🚨 Always test against your setup 🚨
181
201
 
data/Rakefile CHANGED
@@ -1,9 +1,9 @@
1
1
  require 'bundler'
2
- Bundler::GemHelper.install_tasks name: "arel_extensions"
2
+ Bundler::GemHelper.install_tasks name: 'arel_extensions'
3
3
 
4
4
  require 'rake/testtask'
5
5
 
6
- desc "Default Task"
6
+ desc 'Default Task'
7
7
  task default: [:test]
8
8
 
9
9
  Rake::TestTask.new(:test) do |t|
@@ -21,7 +21,7 @@ namespace :test do
21
21
  t.pattern = 'test/visitors/test_to_sql.rb'
22
22
  t.warning = true
23
23
  t.verbose = true
24
- t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION)
24
+ t.ruby_opts = ['--dev'] if defined?(JRUBY_VERSION)
25
25
  }
26
26
  end
27
27
 
@@ -33,7 +33,7 @@ end
33
33
  t.pattern = 'test/with_ar/*_agnostic_test.rb'
34
34
  t.warning = false
35
35
  t.verbose = true
36
- t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION)
36
+ t.ruby_opts = ['--dev'] if defined?(JRUBY_VERSION)
37
37
  }
38
38
  end
39
39
 
data/TODO CHANGED
@@ -1,7 +1,6 @@
1
1
  Code quality:
2
2
  + codeclimate.com
3
3
  + gemnasium
4
- + appveyor.com (windows)
5
4
  + hakiri.io
6
5
  - coveralls.io
7
6
  - inch-ci.org
@@ -1,28 +1,28 @@
1
- $:.push File.expand_path("../lib", __FILE__)
2
- require "arel_extensions/version"
1
+ $:.push File.expand_path('../lib', __FILE__)
2
+ require 'arel_extensions/version'
3
3
 
4
4
  Gem::Specification.new do |s|
5
- s.name = "arel_extensions"
5
+ s.name = 'arel_extensions'
6
6
  s.version = ArelExtensions::VERSION
7
7
  s.platform = Gem::Platform::RUBY
8
- s.authors = ["Yann Azoury", "Félix Bellanger", "Julien Delporte"]
9
- s.email = ["yann.azoury@faveod.com", "felix.bellanger@faveod.com", "julien.delporte@faveod.com"]
10
- s.homepage = "https://github.com/Faveod/arel-extensions"
11
- s.description = "Adds new features to Arel"
12
- s.summary = "Extending Arel"
8
+ s.authors = ['Yann Azoury', 'Félix Bellanger', 'Julien Delporte']
9
+ s.email = ['yann.azoury@faveod.com', 'felix.bellanger@faveod.com', 'julien.delporte@faveod.com']
10
+ s.homepage = 'https://github.com/Faveod/arel-extensions'
11
+ s.description = 'Adds new features to Arel'
12
+ s.summary = 'Extending Arel'
13
13
  s.license = 'MIT'
14
14
 
15
- s.rdoc_options = ["--main", "README.md"]
16
- s.extra_rdoc_files = ["MIT-LICENSE.txt", "README.md", 'functions.html']
15
+ s.rdoc_options = ['--main', 'README.md']
16
+ s.extra_rdoc_files = ['MIT-LICENSE.txt', 'README.md', 'functions.html']
17
17
 
18
18
  # Manifest
19
19
  s.files = `git ls-files`.split("\n")
20
20
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
- s.require_paths = ["lib"]
21
+ s.require_paths = ['lib']
22
22
 
23
23
  s.add_dependency('arel', '>= 6.0')
24
24
 
25
25
  s.add_development_dependency('minitest', '~> 5.9')
26
26
  s.add_development_dependency('rdoc', '>= 6.3.1')
27
27
  s.add_development_dependency('rake', '~> 12.3.3')
28
- end
28
+ end
@@ -1,20 +1,20 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gem 'arel', '~> 3.0' # too old...
4
4
 
5
5
  group :development, :test do
6
- gem "sqlite3", '<= 1.3.13', platform: [:ruby, :mswin, :mingw]
7
- gem "mysql2", '0.4.10', platform: [:ruby, :mswin, :mingw]
8
- gem "activerecord-mysql2-adapter", platform: [:ruby, :mswin, :mingw]
9
- gem "pg", platform: [:ruby, :mswin, :mingw]
6
+ gem 'sqlite3', '<= 1.3.13', platform: [:ruby, :mswin, :mingw]
7
+ gem 'mysql2', '0.4.10', platform: [:ruby, :mswin, :mingw]
8
+ gem 'activerecord-mysql2-adapter', platform: [:ruby, :mswin, :mingw]
9
+ gem 'pg', platform: [:ruby, :mswin, :mingw]
10
10
  # for JRuby
11
- gem "jdbc-sqlite3", platform: :jruby
12
- gem "activerecord-jdbcsqlite3-adapter", platform: :jruby
13
- gem "activerecord-jdbcmysql-adapter", platform: :jruby
14
- gem "activerecord-jdbcpostgresql-adapter", platform: :jruby
11
+ gem 'jdbc-sqlite3', platform: :jruby
12
+ gem 'activerecord-jdbcsqlite3-adapter', platform: :jruby
13
+ gem 'activerecord-jdbcmysql-adapter', platform: :jruby
14
+ gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
15
15
  gem 'activesupport', '~> 3.2'
16
16
  gem 'activemodel', '~> 3.2'
17
17
  gem 'activerecord', '~> 3.2'
18
18
  end
19
19
 
20
- gemspec path: "../"
20
+ gemspec path: '../'
@@ -1,4 +1,4 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gem 'arel', '~> 6.0'
4
4
 
@@ -7,23 +7,23 @@ group :development, :test do
7
7
  gem 'activemodel', '~> 4.0'
8
8
  gem 'activerecord', '~> 4.0'
9
9
 
10
- gem "sqlite3", '<= 1.3.13', platforms: [:mri, :mswin, :mingw]
11
- gem "mysql2", '0.4.10', platforms: [:mri, :mswin, :mingw]
12
- gem "pg",'< 1.0.0', platforms: [:mri, :mingw]
10
+ gem 'sqlite3', '<= 1.3.13', platforms: [:mri, :mswin, :mingw]
11
+ gem 'mysql2', '0.4.10', platforms: [:mri, :mswin, :mingw]
12
+ gem 'pg', '< 1.0.0', platforms: [:mri, :mingw]
13
13
 
14
- gem "tiny_tds", platforms: [:mri, :mingw, :mswin] if RUBY_PLATFORM =~ /windows/
15
- gem "activerecord-sqlserver-adapter", '~> 4.2.0', platforms: [:mri, :mingw, :mswin] if RUBY_PLATFORM =~ /windows/
14
+ gem 'tiny_tds', platforms: [:mri, :mingw, :mswin] if RUBY_PLATFORM =~ /windows/
15
+ gem 'activerecord-sqlserver-adapter', '~> 4.2.0', platforms: [:mri, :mingw, :mswin] if RUBY_PLATFORM =~ /windows/
16
16
 
17
17
  gem 'ruby-oci8', platforms: [:mri, :mswin, :mingw] if ENV.has_key? 'ORACLE_HOME'
18
18
  gem 'activerecord-oracle_enhanced-adapter', '~> 1.6.0' if ENV.has_key? 'ORACLE_HOME'
19
19
 
20
20
  # for JRuby
21
- gem 'activerecord-jdbc-adapter', '~> 1.3',platforms: :jruby
22
- gem "jdbc-sqlite3", platforms: :jruby
23
- gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
24
- gem "activerecord-jdbcmysql-adapter", platforms: :jruby
25
- gem "activerecord-jdbcpostgresql-adapter", platforms: :jruby
26
- gem "activerecord-jdbcmssql-adapter", platforms: :jruby
21
+ gem 'activerecord-jdbc-adapter', '~> 1.3', platforms: :jruby
22
+ gem 'jdbc-sqlite3', platforms: :jruby
23
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
24
+ gem 'activerecord-jdbcmysql-adapter', platforms: :jruby
25
+ gem 'activerecord-jdbcpostgresql-adapter', platforms: :jruby
26
+ gem 'activerecord-jdbcmssql-adapter', platforms: :jruby
27
27
  end
28
28
 
29
- gemspec path: "../"
29
+ gemspec path: '../'
@@ -1,4 +1,4 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gem 'arel', '~> 7.0'
4
4
 
@@ -7,23 +7,23 @@ group :development, :test do
7
7
  gem 'activemodel', '~> 5.0'
8
8
  gem 'activerecord', '5.0.6'
9
9
 
10
- gem "sqlite3", '<= 1.3.13', platforms: [:mri, :mswin, :mingw]
11
- gem "mysql2", '0.4.10', platforms: [:mri, :mswin, :mingw]
12
- gem "pg",'< 1.0.0', platforms: [:mri, :mingw]
10
+ gem 'sqlite3', '<= 1.3.13', platforms: [:mri, :mswin, :mingw]
11
+ gem 'mysql2', '0.4.10', platforms: [:mri, :mswin, :mingw]
12
+ gem 'pg', '< 1.0.0', platforms: [:mri, :mingw]
13
13
 
14
- gem "tiny_tds", platforms: [:mri, :mingw] if RUBY_PLATFORM =~ /windows/
15
- # gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw]
14
+ gem 'tiny_tds', platforms: [:mri, :mingw] if RUBY_PLATFORM =~ /windows/
15
+ # gem "activerecord-sqlserver-adapter", platforms: [:mri, :mingw]
16
16
 
17
17
  gem 'ruby-oci8', platforms: [:mri, :mswin, :mingw] if ENV.has_key? 'ORACLE_HOME'
18
18
  gem 'activerecord-oracle_enhanced-adapter', '~> 1.7' if ENV.has_key? 'ORACLE_HOME'
19
19
 
20
20
  # for JRuby
21
21
  gem 'activerecord-jdbc-adapter', github: 'jruby/activerecord-jdbc-adapter', tag: 'v50.0', platforms: :jruby
22
- gem "jdbc-sqlite3", platforms: :jruby
23
- gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
24
- gem "activerecord-jdbcmysql-adapter", platforms: :jruby
25
- gem "activerecord-jdbcpostgresql-adapter", platforms: :jruby
26
- gem "activerecord-jdbcmssql-adapter", platforms: :jruby
22
+ gem 'jdbc-sqlite3', platforms: :jruby
23
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
24
+ gem 'activerecord-jdbcmysql-adapter', platforms: :jruby
25
+ gem 'activerecord-jdbcpostgresql-adapter', platforms: :jruby
26
+ gem 'activerecord-jdbcmssql-adapter', platforms: :jruby
27
27
  end
28
28
 
29
- gemspec path: "../"
29
+ gemspec path: '../'
@@ -1,4 +1,4 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails', '5.1.4'
4
4
  gem 'arel', '~> 8'
@@ -8,23 +8,23 @@ group :development, :test do
8
8
  gem 'activemodel', '5.1.4'
9
9
  gem 'activerecord', '5.1.4'
10
10
 
11
- gem "sqlite3", '<= 1.3.13', platforms: [:mri, :mswin, :mingw]
12
- gem "mysql2", '0.4.10', platforms: [:mri, :mswin, :mingw]
13
- gem "pg",'< 1.0.0', platforms: [:mri, :mingw]
11
+ gem 'sqlite3', '<= 1.3.13', platforms: [:mri, :mswin, :mingw]
12
+ gem 'mysql2', '0.4.10', platforms: [:mri, :mswin, :mingw]
13
+ gem 'pg', '< 1.0.0', platforms: [:mri, :mingw]
14
14
 
15
- gem "tiny_tds", platforms: [:mri, :mingw] if RUBY_PLATFORM =~ /windows/
16
- # gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw]
15
+ gem 'tiny_tds', platforms: [:mri, :mingw] if RUBY_PLATFORM =~ /windows/
16
+ # gem "activerecord-sqlserver-adapter", platforms: [:mri, :mingw]
17
17
 
18
18
  gem 'ruby-oci8', platforms: [:mri, :mswin, :mingw] if ENV.has_key? 'ORACLE_HOME'
19
19
  gem 'activerecord-oracle_enhanced-adapter', '~> 1.8' if ENV.has_key? 'ORACLE_HOME'
20
20
 
21
21
  # for JRuby
22
22
  gem 'activerecord-jdbc-adapter', github: 'jruby/activerecord-jdbc-adapter', tag: 'v51.0', platforms: :jruby
23
- gem "jdbc-sqlite3", platforms: :jruby
24
- gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
25
- gem "activerecord-jdbcmysql-adapter", platforms: :jruby
26
- gem "activerecord-jdbcpostgresql-adapter", platforms: :jruby
27
- gem "activerecord-jdbcmssql-adapter", platforms: :jruby
23
+ gem 'jdbc-sqlite3', platforms: :jruby
24
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
25
+ gem 'activerecord-jdbcmysql-adapter', platforms: :jruby
26
+ gem 'activerecord-jdbcpostgresql-adapter', platforms: :jruby
27
+ gem 'activerecord-jdbcmssql-adapter', platforms: :jruby
28
28
  end
29
29
 
30
- gemspec path: "../"
30
+ gemspec path: '../'
@@ -1,31 +1,31 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails', '~> 5.2.0'
4
4
  gem 'arel', '~> 9'
5
5
 
6
6
  group :development, :test do
7
- gem 'bigdecimal', '1.3.5', :platforms => [:mri, :mingw, :x64_mingw, :mswin]
7
+ gem 'bigdecimal', '1.3.5', platforms: [:mri, :mingw, :x64_mingw, :mswin]
8
8
  gem 'activesupport', '~> 5.2.0'
9
9
  gem 'activemodel', '~> 5.2.0'
10
10
  gem 'activerecord', '~> 5.2.0'
11
11
 
12
- gem "sqlite3", '<= 1.3.13', platforms: [:mri]
13
- gem "mysql2", '0.4.10', platforms: [:mri]
14
- gem "pg",'< 1.0.0', platforms: [:mri]
12
+ gem 'sqlite3', '<= 1.3.13', platforms: [:mri]
13
+ gem 'mysql2', '0.4.10', platforms: [:mri]
14
+ gem 'pg', '< 1.0.0', platforms: [:mri]
15
15
 
16
- gem "tiny_tds", platforms: [:mri, :mingw, :x64_mingw, :mswin]
17
- gem "activerecord-sqlserver-adapter", '~> 5.2', :platforms => [:mri, :mingw, :x64_mingw, :mswin]
16
+ gem 'tiny_tds', platforms: [:mri, :mingw, :x64_mingw, :mswin]
17
+ gem 'activerecord-sqlserver-adapter', '~> 5.2', platforms: [:mri, :mingw, :x64_mingw, :mswin]
18
18
 
19
19
  gem 'ruby-oci8', platforms: [:mri, :mswin, :mingw] if ENV.has_key? 'ORACLE_HOME'
20
20
  gem 'activerecord-oracle_enhanced-adapter', '~> 5.2.0' if ENV.has_key? 'ORACLE_HOME'
21
21
 
22
22
  # for JRuby
23
23
  gem 'activerecord-jdbc-adapter', github: 'jruby/activerecord-jdbc-adapter', tag: 'v52.7', platforms: :jruby
24
- gem "jdbc-sqlite3", platforms: :jruby
25
- gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
26
- gem "activerecord-jdbcmysql-adapter", platforms: :jruby
27
- gem "activerecord-jdbcpostgresql-adapter", platforms: :jruby
28
- gem "activerecord-jdbcsqlserver-adapter", '~> 52.0', platforms: :jruby
24
+ gem 'jdbc-sqlite3', platforms: :jruby
25
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
26
+ gem 'activerecord-jdbcmysql-adapter', platforms: :jruby
27
+ gem 'activerecord-jdbcpostgresql-adapter', platforms: :jruby
28
+ gem 'activerecord-jdbcsqlserver-adapter', '~> 52.0', platforms: :jruby
29
29
  end
30
30
 
31
- gemspec path: "../"
31
+ gemspec path: '../'
@@ -1,4 +1,4 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails', '~> 6.0.0'
4
4
 
@@ -8,22 +8,22 @@ group :development, :test do
8
8
  gem 'activemodel', '~> 6.0.0'
9
9
  gem 'activerecord', '~> 6.0.0'
10
10
 
11
- gem "sqlite3", '~> 1.4', platforms: [:mri]
12
- gem "mysql2", '0.5.2', platforms: [:mri]
13
- gem "pg",'< 1.0.0', platforms: [:mri]
11
+ gem 'sqlite3', '~> 1.4', platforms: [:mri]
12
+ gem 'mysql2', '0.5.2', platforms: [:mri]
13
+ gem 'pg', '< 1.0.0', platforms: [:mri]
14
14
 
15
- gem "tiny_tds", platforms: [:mri, :mingw, :x64_mingw, :mswin]
16
- gem "activerecord-sqlserver-adapter", '~> 6.0', platforms: [:mri, :mingw, :x64_mingw, :mswin]
15
+ gem 'tiny_tds', platforms: [:mri, :mingw, :x64_mingw, :mswin]
16
+ gem 'activerecord-sqlserver-adapter', '~> 6.0', platforms: [:mri, :mingw, :x64_mingw, :mswin]
17
17
 
18
18
  gem 'ruby-oci8', platforms: [:mri, :mswin, :mingw] if ENV.has_key? 'ORACLE_HOME'
19
19
  gem 'activerecord-oracle_enhanced-adapter', '~> 6.0.0' if ENV.has_key? 'ORACLE_HOME'
20
20
 
21
21
  # for JRuby
22
22
  gem 'activerecord-jdbc-adapter', github: 'jruby/activerecord-jdbc-adapter', tag: 'v60.4', platforms: :jruby
23
- gem "jdbc-sqlite3", platforms: :jruby
24
- gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
25
- gem "activerecord-jdbcmysql-adapter", platforms: :jruby
26
- gem "activerecord-jdbcpostgresql-adapter", platforms: :jruby
23
+ gem 'jdbc-sqlite3', platforms: :jruby
24
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
25
+ gem 'activerecord-jdbcmysql-adapter', platforms: :jruby
26
+ gem 'activerecord-jdbcpostgresql-adapter', platforms: :jruby
27
27
  end
28
28
 
29
- gemspec path: "../"
29
+ gemspec path: '../'
@@ -1,4 +1,4 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails', '~> 6.1.0'
4
4
 
@@ -8,22 +8,22 @@ group :development, :test do
8
8
  gem 'activemodel', '~> 6.1.0'
9
9
  gem 'activerecord', '~> 6.1.0'
10
10
 
11
- gem "sqlite3", '~> 1.4', platforms: [:mri]
12
- gem "mysql2", '0.5.2', platforms: [:mri]
13
- gem "pg",'~> 1.1', platforms: [:mri]
11
+ gem 'sqlite3', '~> 1.4', platforms: [:mri]
12
+ gem 'mysql2', '0.5.2', platforms: [:mri]
13
+ gem 'pg', '~> 1.1', platforms: [:mri]
14
14
 
15
- gem "tiny_tds", platforms: [:mri, :mingw, :x64_mingw, :mswin]
16
- gem "activerecord-sqlserver-adapter", '~> 6.1.0', platforms: [:mri, :mingw, :x64_mingw, :mswin]
15
+ gem 'tiny_tds', platforms: [:mri, :mingw, :x64_mingw, :mswin]
16
+ gem 'activerecord-sqlserver-adapter', '~> 6.1.0', platforms: [:mri, :mingw, :x64_mingw, :mswin]
17
17
 
18
18
  gem 'ruby-oci8', platforms: [:mri, :mswin, :mingw] if ENV.has_key? 'ORACLE_HOME'
19
19
  gem 'activerecord-oracle_enhanced-adapter', '~> 6.0.0' if ENV.has_key? 'ORACLE_HOME'
20
20
 
21
21
  # for JRuby
22
22
  gem 'activerecord-jdbc-adapter', github: 'jruby/activerecord-jdbc-adapter', tag: 'v61.1', platforms: :jruby
23
- gem "jdbc-sqlite3", platforms: :jruby
24
- gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
25
- gem "activerecord-jdbcmysql-adapter", platforms: :jruby
26
- gem "activerecord-jdbcpostgresql-adapter", platforms: :jruby
23
+ gem 'jdbc-sqlite3', platforms: :jruby
24
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
25
+ gem 'activerecord-jdbcmysql-adapter', platforms: :jruby
26
+ gem 'activerecord-jdbcpostgresql-adapter', platforms: :jruby
27
27
  end
28
28
 
29
- gemspec path: "../"
29
+ gemspec path: '../'
@@ -1,4 +1,4 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails', '~> 7.0.1'
4
4
 
@@ -8,15 +8,15 @@ group :development, :test do
8
8
  gem 'activemodel', '~> 7.0.1'
9
9
  gem 'activerecord', '~> 7.0.1'
10
10
 
11
- gem "sqlite3", '~> 1.4', platforms: [:mri]
12
- gem "mysql2", '0.5.2', platforms: [:mri]
13
- gem "pg",'~> 1.1', platforms: [:mri]
11
+ gem 'sqlite3', '~> 1.4', platforms: [:mri]
12
+ gem 'mysql2', '0.5.2', platforms: [:mri]
13
+ gem 'pg', '~> 1.1', platforms: [:mri]
14
14
 
15
- gem "tiny_tds", platforms: [:mri, :mingw, :x64_mingw, :mswin]
16
- gem "activerecord-sqlserver-adapter", '~> 7.0.0.0', platforms: [:mri, :mingw, :x64_mingw, :mswin]
15
+ gem 'tiny_tds', platforms: [:mri, :mingw, :x64_mingw, :mswin]
16
+ gem 'activerecord-sqlserver-adapter', '~> 7.0.0.0', platforms: [:mri, :mingw, :x64_mingw, :mswin]
17
17
 
18
18
  gem 'ruby-oci8', platforms: [:mri, :mswin, :mingw] if ENV.has_key? 'ORACLE_HOME'
19
19
  gem 'activerecord-oracle_enhanced-adapter', '~> 6.0.0' if ENV.has_key? 'ORACLE_HOME'
20
20
  end
21
21
 
22
- gemspec path: "../"
22
+ gemspec path: '../'
@@ -1,28 +1,28 @@
1
- $:.push File.expand_path("../lib", __FILE__)
2
- require "arel_extensions/version"
1
+ $:.push File.expand_path('../lib', __FILE__)
2
+ require 'arel_extensions/version'
3
3
 
4
4
  Gem::Specification.new do |s|
5
- s.name = "arel_extensions"
5
+ s.name = 'arel_extensions'
6
6
  s.version = ArelExtensions::VERSION
7
7
  s.platform = Gem::Platform::RUBY
8
- s.authors = ["Yann Azoury", "Félix Bellanger", "Julien Delporte"]
9
- s.email = ["yann.azoury@faveod.com", "felix.bellanger@faveod.com", "julien.delporte@faveod.com"]
10
- s.homepage = "https://github.com/Faveod/arel-extensions"
11
- s.description = "Adds new features to Arel"
12
- s.summary = "Extending Arel"
8
+ s.authors = ['Yann Azoury', 'Félix Bellanger', 'Julien Delporte']
9
+ s.email = ['yann.azoury@faveod.com', 'felix.bellanger@faveod.com', 'julien.delporte@faveod.com']
10
+ s.homepage = 'https://github.com/Faveod/arel-extensions'
11
+ s.description = 'Adds new features to Arel'
12
+ s.summary = 'Extending Arel'
13
13
  s.license = 'MIT'
14
14
 
15
- s.rdoc_options = ["--main", "README.md"]
16
- s.extra_rdoc_files = ["MIT-LICENSE.txt", "README.md", 'functions.html']
15
+ s.rdoc_options = ['--main', 'README.md']
16
+ s.extra_rdoc_files = ['MIT-LICENSE.txt', 'README.md', 'functions.html']
17
17
 
18
18
  # Manifest
19
19
  s.files = `git ls-files`.split("\n")
20
20
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
- s.require_paths = ["lib"]
21
+ s.require_paths = ['lib']
22
22
 
23
23
  s.add_dependency('arel', '>= 6.0')
24
24
 
25
25
  s.add_development_dependency('minitest', '~> 5.9')
26
26
  s.add_development_dependency('rdoc', '>= 6.3.1')
27
27
  s.add_development_dependency('rake', '~> 12.3.3')
28
- end
28
+ end