arel_extensions 2.1.1 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +1 -2
- data/.github/workflows/ruby.yml +4 -4
- data/.rubocop.yml +25 -1
- data/Gemfile +10 -10
- data/README.md +24 -4
- data/Rakefile +4 -4
- data/TODO +0 -1
- data/arel_extensions.gemspec +11 -11
- data/gemfiles/rails3.gemfile +10 -10
- data/gemfiles/rails4.gemfile +13 -13
- data/gemfiles/rails5_0.gemfile +12 -12
- data/gemfiles/rails5_1_4.gemfile +12 -12
- data/gemfiles/rails5_2.gemfile +13 -13
- data/gemfiles/rails6.gemfile +11 -11
- data/gemfiles/rails6_1.gemfile +11 -11
- data/gemfiles/rails7.gemfile +7 -7
- data/gemspecs/arel_extensions-v1.gemspec +12 -12
- data/gemspecs/arel_extensions-v2.gemspec +11 -11
- data/init/mssql.sql +0 -0
- data/init/mysql.sql +0 -0
- data/init/oracle.sql +0 -0
- data/init/postgresql.sql +0 -0
- data/init/sqlite.sql +0 -0
- data/lib/arel_extensions/attributes.rb +2 -2
- data/lib/arel_extensions/boolean_functions.rb +2 -4
- data/lib/arel_extensions/common_sql_functions.rb +10 -10
- data/lib/arel_extensions/comparators.rb +14 -14
- data/lib/arel_extensions/date_duration.rb +7 -7
- data/lib/arel_extensions/helpers.rb +16 -13
- data/lib/arel_extensions/insert_manager.rb +1 -1
- data/lib/arel_extensions/math.rb +16 -18
- data/lib/arel_extensions/math_functions.rb +18 -18
- data/lib/arel_extensions/nodes/abs.rb +0 -0
- data/lib/arel_extensions/nodes/aggregate_function.rb +0 -0
- data/lib/arel_extensions/nodes/blank.rb +1 -1
- data/lib/arel_extensions/nodes/case.rb +4 -6
- data/lib/arel_extensions/nodes/cast.rb +3 -3
- data/lib/arel_extensions/nodes/ceil.rb +0 -0
- data/lib/arel_extensions/nodes/change_case.rb +0 -0
- data/lib/arel_extensions/nodes/coalesce.rb +0 -0
- data/lib/arel_extensions/nodes/collate.rb +9 -9
- data/lib/arel_extensions/nodes/concat.rb +2 -2
- data/lib/arel_extensions/nodes/date_diff.rb +6 -6
- data/lib/arel_extensions/nodes/duration.rb +0 -0
- data/lib/arel_extensions/nodes/find_in_set.rb +0 -0
- data/lib/arel_extensions/nodes/floor.rb +0 -0
- data/lib/arel_extensions/nodes/format.rb +1 -1
- data/lib/arel_extensions/nodes/formatted_number.rb +2 -2
- data/lib/arel_extensions/nodes/function.rb +21 -21
- data/lib/arel_extensions/nodes/is_null.rb +0 -0
- data/lib/arel_extensions/nodes/json.rb +7 -7
- data/lib/arel_extensions/nodes/length.rb +0 -0
- data/lib/arel_extensions/nodes/levenshtein_distance.rb +1 -1
- data/lib/arel_extensions/nodes/locate.rb +0 -0
- data/lib/arel_extensions/nodes/log10.rb +0 -0
- data/lib/arel_extensions/nodes/matches.rb +1 -1
- data/lib/arel_extensions/nodes/md5.rb +0 -0
- data/lib/arel_extensions/nodes/power.rb +0 -0
- data/lib/arel_extensions/nodes/rand.rb +0 -0
- data/lib/arel_extensions/nodes/repeat.rb +0 -0
- data/lib/arel_extensions/nodes/replace.rb +2 -2
- data/lib/arel_extensions/nodes/round.rb +0 -0
- data/lib/arel_extensions/nodes/soundex.rb +2 -2
- data/lib/arel_extensions/nodes/std.rb +0 -0
- data/lib/arel_extensions/nodes/substring.rb +0 -0
- data/lib/arel_extensions/nodes/sum.rb +0 -0
- data/lib/arel_extensions/nodes/then.rb +0 -0
- data/lib/arel_extensions/nodes/trim.rb +0 -0
- data/lib/arel_extensions/nodes/union.rb +4 -4
- data/lib/arel_extensions/nodes/union_all.rb +3 -3
- data/lib/arel_extensions/nodes/wday.rb +0 -0
- data/lib/arel_extensions/nodes.rb +0 -0
- data/lib/arel_extensions/null_functions.rb +0 -0
- data/lib/arel_extensions/predications.rb +10 -10
- data/lib/arel_extensions/railtie.rb +1 -1
- data/lib/arel_extensions/set_functions.rb +3 -3
- data/lib/arel_extensions/string_functions.rb +8 -8
- data/lib/arel_extensions/tasks.rb +2 -2
- data/lib/arel_extensions/version.rb +1 -1
- data/lib/arel_extensions/visitors/convert_format.rb +0 -0
- data/lib/arel_extensions/visitors/ibm_db.rb +19 -19
- data/lib/arel_extensions/visitors/mssql.rb +139 -118
- data/lib/arel_extensions/visitors/mysql.rb +145 -144
- data/lib/arel_extensions/visitors/oracle.rb +136 -128
- data/lib/arel_extensions/visitors/oracle12.rb +16 -16
- data/lib/arel_extensions/visitors/postgresql.rb +147 -136
- data/lib/arel_extensions/visitors/sqlite.rb +83 -85
- data/lib/arel_extensions/visitors/to_sql.rb +143 -148
- data/lib/arel_extensions/visitors.rb +7 -7
- data/lib/arel_extensions.rb +46 -32
- data/test/arelx_test_helper.rb +14 -14
- data/test/database.yml +5 -5
- data/test/real_db_test.rb +78 -78
- data/test/support/fake_record.rb +1 -1
- data/test/test_comparators.rb +5 -5
- data/test/visitors/test_bulk_insert_oracle.rb +4 -4
- data/test/visitors/test_bulk_insert_sqlite.rb +4 -4
- data/test/visitors/test_bulk_insert_to_sql.rb +4 -4
- data/test/visitors/test_oracle.rb +14 -14
- data/test/visitors/test_to_sql.rb +82 -82
- data/test/with_ar/all_agnostic_test.rb +415 -313
- data/test/with_ar/insert_agnostic_test.rb +17 -14
- data/test/with_ar/test_bulk_sqlite.rb +4 -4
- data/test/with_ar/test_math_sqlite.rb +12 -12
- data/test/with_ar/test_string_mysql.rb +20 -20
- data/test/with_ar/test_string_sqlite.rb +20 -20
- data/version_v1.rb +1 -1
- data/version_v2.rb +1 -1
- metadata +2 -9
- data/.travis/oracle/download.js +0 -152
- data/.travis/oracle/download.sh +0 -30
- data/.travis/oracle/download_ojdbc.js +0 -116
- data/.travis/oracle/install.sh +0 -34
- data/.travis/setup_accounts.sh +0 -9
- data/.travis/sqlite3/extension-functions.sh +0 -6
- data/.travis.yml +0 -193
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 292fe79fad9ac5f56c0ab194cdd8335eb632b6a97144138423dfe7f99b528dd3
|
4
|
+
data.tar.gz: 7924daff5fb2c08ed2f6c63ef99629aa43ce90ca310d175618f279f61b5ae85c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb981aed1c1d97a9584d000f75e9b446afbf65947ce95cd21af5e0ba85182994e55c3f6fc6b49e09897940d09714e89502585cfa844487d5ac64787c7ed6810b
|
7
|
+
data.tar.gz: 7816248c6ce60af5a5a24a5015b9d73f568d447806e7778b5adcc2570d5ebd344834fdd71db4d5c83c93fef727a3e1f8a6d02de81e75539547263a751c768a04
|
data/.codeclimate.yml
CHANGED
data/.github/workflows/ruby.yml
CHANGED
@@ -162,13 +162,13 @@ jobs:
|
|
162
162
|
postgres:
|
163
163
|
image: postgres:11.6-alpine
|
164
164
|
env:
|
165
|
-
POSTGRES_DB:
|
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
|
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:
|
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:
|
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
|
-
- "
|
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
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
5
|
group :development, :test do
|
6
|
-
gem
|
7
|
-
gem
|
8
|
-
gem
|
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
|
11
|
-
gem
|
12
|
-
gem
|
13
|
-
gem
|
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
|
16
|
-
gem
|
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
|
-
|
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
|
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
|
-
|
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:
|
2
|
+
Bundler::GemHelper.install_tasks name: 'arel_extensions'
|
3
3
|
|
4
4
|
require 'rake/testtask'
|
5
5
|
|
6
|
-
desc
|
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 = [
|
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 = [
|
36
|
+
t.ruby_opts = ['--dev'] if defined?(JRUBY_VERSION)
|
37
37
|
}
|
38
38
|
end
|
39
39
|
|
data/TODO
CHANGED
data/arel_extensions.gemspec
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
$:.push File.expand_path(
|
2
|
-
require
|
1
|
+
$:.push File.expand_path('../lib', __FILE__)
|
2
|
+
require 'arel_extensions/version'
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
|
-
s.name =
|
5
|
+
s.name = 'arel_extensions'
|
6
6
|
s.version = ArelExtensions::VERSION
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
|
-
s.authors = [
|
9
|
-
s.email = [
|
10
|
-
s.homepage =
|
11
|
-
s.description =
|
12
|
-
s.summary =
|
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 = [
|
16
|
-
s.extra_rdoc_files = [
|
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 = [
|
21
|
+
s.require_paths = ['lib']
|
22
22
|
|
23
23
|
s.add_dependency('activerecord', '>= 6.0')
|
24
24
|
|
data/gemfiles/rails3.gemfile
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
source
|
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
|
7
|
-
gem
|
8
|
-
gem
|
9
|
-
gem
|
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
|
12
|
-
gem
|
13
|
-
gem
|
14
|
-
gem
|
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: '../'
|
data/gemfiles/rails4.gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source
|
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
|
11
|
-
gem
|
12
|
-
gem
|
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
|
15
|
-
gem
|
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
|
23
|
-
gem
|
24
|
-
gem
|
25
|
-
gem
|
26
|
-
gem
|
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: '../'
|
data/gemfiles/rails5_0.gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source
|
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
|
11
|
-
gem
|
12
|
-
gem
|
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
|
15
|
-
# gem "activerecord-sqlserver-adapter", :
|
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
|
23
|
-
gem
|
24
|
-
gem
|
25
|
-
gem
|
26
|
-
gem
|
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: '../'
|
data/gemfiles/rails5_1_4.gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source
|
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
|
12
|
-
gem
|
13
|
-
gem
|
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
|
16
|
-
# gem "activerecord-sqlserver-adapter", :
|
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
|
24
|
-
gem
|
25
|
-
gem
|
26
|
-
gem
|
27
|
-
gem
|
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: '../'
|
data/gemfiles/rails5_2.gemfile
CHANGED
@@ -1,31 +1,31 @@
|
|
1
|
-
source
|
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', :
|
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
|
13
|
-
gem
|
14
|
-
gem
|
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
|
17
|
-
gem
|
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
|
25
|
-
gem
|
26
|
-
gem
|
27
|
-
gem
|
28
|
-
gem
|
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: '../'
|
data/gemfiles/rails6.gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source
|
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
|
12
|
-
gem
|
13
|
-
gem
|
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
|
16
|
-
gem
|
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
|
24
|
-
gem
|
25
|
-
gem
|
26
|
-
gem
|
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: '../'
|
data/gemfiles/rails6_1.gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source
|
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
|
12
|
-
gem
|
13
|
-
gem
|
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
|
16
|
-
gem
|
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
|
24
|
-
gem
|
25
|
-
gem
|
26
|
-
gem
|
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: '../'
|
data/gemfiles/rails7.gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source
|
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
|
12
|
-
gem
|
13
|
-
gem
|
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
|
16
|
-
gem
|
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(
|
2
|
-
require
|
1
|
+
$:.push File.expand_path('../lib', __FILE__)
|
2
|
+
require 'arel_extensions/version'
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
|
-
s.name =
|
5
|
+
s.name = 'arel_extensions'
|
6
6
|
s.version = ArelExtensions::VERSION
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
|
-
s.authors = [
|
9
|
-
s.email = [
|
10
|
-
s.homepage =
|
11
|
-
s.description =
|
12
|
-
s.summary =
|
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 = [
|
16
|
-
s.extra_rdoc_files = [
|
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 = [
|
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
|