arel_extensions 1.2.14 → 1.2.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +102 -0
  3. data/.travis.yml +2 -0
  4. data/Gemfile +10 -10
  5. data/Rakefile +4 -4
  6. data/arel_extensions.gemspec +1 -1
  7. data/gemfiles/rails3.gemfile +9 -9
  8. data/gemfiles/rails4.gemfile +13 -13
  9. data/gemfiles/rails5_0.gemfile +13 -13
  10. data/gemfiles/rails5_1_4.gemfile +13 -13
  11. data/gemfiles/rails5_2.gemfile +13 -13
  12. data/gemfiles/rails6.gemfile +13 -13
  13. data/gemfiles/rails6_1.gemfile +30 -0
  14. data/gemspecs/arel_extensions-v1.gemspec +28 -0
  15. data/{gemspec_v2 → gemspecs}/arel_extensions-v2.gemspec +0 -0
  16. data/generate_gems.sh +4 -3
  17. data/lib/arel_extensions.rb +6 -4
  18. data/lib/arel_extensions/attributes.rb +0 -0
  19. data/lib/arel_extensions/boolean_functions.rb +21 -5
  20. data/lib/arel_extensions/common_sql_functions.rb +2 -4
  21. data/lib/arel_extensions/comparators.rb +11 -14
  22. data/lib/arel_extensions/date_duration.rb +4 -5
  23. data/lib/arel_extensions/insert_manager.rb +16 -17
  24. data/lib/arel_extensions/math.rb +8 -9
  25. data/lib/arel_extensions/math_functions.rb +18 -20
  26. data/lib/arel_extensions/nodes/abs.rb +0 -1
  27. data/lib/arel_extensions/nodes/aggregate_function.rb +0 -1
  28. data/lib/arel_extensions/nodes/blank.rb +0 -1
  29. data/lib/arel_extensions/nodes/case.rb +3 -4
  30. data/lib/arel_extensions/nodes/cast.rb +4 -2
  31. data/lib/arel_extensions/nodes/ceil.rb +1 -1
  32. data/lib/arel_extensions/nodes/change_case.rb +0 -0
  33. data/lib/arel_extensions/nodes/coalesce.rb +0 -1
  34. data/lib/arel_extensions/nodes/collate.rb +0 -1
  35. data/lib/arel_extensions/nodes/concat.rb +2 -4
  36. data/lib/arel_extensions/nodes/date_diff.rb +7 -8
  37. data/lib/arel_extensions/nodes/duration.rb +0 -1
  38. data/lib/arel_extensions/nodes/find_in_set.rb +0 -1
  39. data/lib/arel_extensions/nodes/floor.rb +1 -1
  40. data/lib/arel_extensions/nodes/format.rb +27 -1
  41. data/lib/arel_extensions/nodes/formatted_number.rb +0 -1
  42. data/lib/arel_extensions/nodes/function.rb +18 -15
  43. data/lib/arel_extensions/nodes/is_null.rb +0 -0
  44. data/lib/arel_extensions/nodes/json.rb +39 -30
  45. data/lib/arel_extensions/nodes/length.rb +0 -1
  46. data/lib/arel_extensions/nodes/levenshtein_distance.rb +0 -0
  47. data/lib/arel_extensions/nodes/locate.rb +0 -1
  48. data/lib/arel_extensions/nodes/log10.rb +1 -2
  49. data/lib/arel_extensions/nodes/matches.rb +0 -2
  50. data/lib/arel_extensions/nodes/md5.rb +0 -1
  51. data/lib/arel_extensions/nodes/power.rb +0 -1
  52. data/lib/arel_extensions/nodes/rand.rb +0 -1
  53. data/lib/arel_extensions/nodes/repeat.rb +0 -2
  54. data/lib/arel_extensions/nodes/replace.rb +0 -2
  55. data/lib/arel_extensions/nodes/round.rb +0 -1
  56. data/lib/arel_extensions/nodes/soundex.rb +0 -1
  57. data/lib/arel_extensions/nodes/std.rb +4 -5
  58. data/lib/arel_extensions/nodes/substring.rb +0 -1
  59. data/lib/arel_extensions/nodes/sum.rb +0 -0
  60. data/lib/arel_extensions/nodes/then.rb +0 -0
  61. data/lib/arel_extensions/nodes/trim.rb +0 -2
  62. data/lib/arel_extensions/nodes/union.rb +0 -2
  63. data/lib/arel_extensions/nodes/union_all.rb +0 -2
  64. data/lib/arel_extensions/nodes/wday.rb +0 -4
  65. data/lib/arel_extensions/null_functions.rb +3 -5
  66. data/lib/arel_extensions/predications.rb +5 -6
  67. data/lib/arel_extensions/railtie.rb +5 -5
  68. data/lib/arel_extensions/set_functions.rb +0 -2
  69. data/lib/arel_extensions/string_functions.rb +21 -22
  70. data/lib/arel_extensions/tasks.rb +1 -1
  71. data/lib/arel_extensions/version.rb +1 -1
  72. data/lib/arel_extensions/visitors.rb +68 -60
  73. data/lib/arel_extensions/visitors/convert_format.rb +37 -0
  74. data/lib/arel_extensions/visitors/ibm_db.rb +4 -11
  75. data/lib/arel_extensions/visitors/mssql.rb +49 -44
  76. data/lib/arel_extensions/visitors/mysql.rb +65 -67
  77. data/lib/arel_extensions/visitors/oracle.rb +58 -55
  78. data/lib/arel_extensions/visitors/oracle12.rb +2 -3
  79. data/lib/arel_extensions/visitors/postgresql.rb +41 -34
  80. data/lib/arel_extensions/visitors/sqlite.rb +23 -18
  81. data/lib/arel_extensions/visitors/to_sql.rb +78 -61
  82. data/test/arelx_test_helper.rb +0 -2
  83. data/test/database.yml +2 -0
  84. data/test/real_db_test.rb +27 -42
  85. data/test/support/fake_record.rb +1 -1
  86. data/test/test_comparators.rb +0 -4
  87. data/test/visitors/test_bulk_insert_oracle.rb +0 -1
  88. data/test/visitors/test_bulk_insert_sqlite.rb +0 -2
  89. data/test/visitors/test_oracle.rb +1 -2
  90. data/test/visitors/test_to_sql.rb +16 -25
  91. data/test/with_ar/all_agnostic_test.rb +135 -139
  92. data/test/with_ar/insert_agnostic_test.rb +0 -2
  93. data/test/with_ar/test_bulk_sqlite.rb +0 -4
  94. data/test/with_ar/test_math_sqlite.rb +4 -8
  95. data/test/with_ar/test_string_mysql.rb +1 -5
  96. data/test/with_ar/test_string_sqlite.rb +1 -5
  97. data/version_v1.rb +1 -1
  98. data/version_v2.rb +1 -1
  99. metadata +8 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58a5c46733aab590dc5524fb0733f899e3562a224334ba5ae460bffcda3c5151
4
- data.tar.gz: e94d14f13e7778a7ec877019088db4af525e33ac6147abc7f1a8213492912285
3
+ metadata.gz: 8b1349341148022d22f5f1db49226c8279bfc9474e48dfbeed4741f68dedc1bc
4
+ data.tar.gz: 8ef43ffbefa6e47f95bde8e9212b195e877cd97700ec113cb0a394fd0eff8014
5
5
  SHA512:
6
- metadata.gz: 72c65ef83e189170664127dab416385d028e017d198b8c2eb1d457a79693068f2baa5eeb948356dea78fb625a89d30c9884c8be84c2cdb8f5e5913e608565052
7
- data.tar.gz: 5acc3c898c74bd0b05fdf1205d3e4262c11b81a37990f29dc9eefbfd4954c251f8d52beef8e0d441d87957ad4abb9edc4d9f4c81f4e931fa69f17e500cbf8ddd
6
+ metadata.gz: 962602c8cf871c1456401b48edd21e8348af1a54b851873c634ce64248bd0dbd293a798adb3bb3f3e9f62fe4778f74f3627c54bffbd8fb5aa62a920cdc0c3846
7
+ data.tar.gz: df1669b0b8b3a87dce3d68d402d1e89d3abca492e66b9032bb70a2817471b6a1a64f879674c6b84a201e3f8865d62920d694229bcd65ec0dde2da4818a72a3de
@@ -0,0 +1,102 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ master ]
13
+ pull_request:
14
+ branches: [ master ]
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+
21
+ services:
22
+ postgres:
23
+ image: postgres:11.6-alpine
24
+ env:
25
+ POSTGRES_DB: arext_test
26
+ ports:
27
+ - 5432:5432
28
+ # needed because the postgres container does not provide a healthcheck
29
+ options: >-
30
+ --health-cmd "pg_isready -d arext_test -U postgres -p 5432"
31
+ --health-interval 10s
32
+ --health-timeout 5s
33
+ --health-retries 5
34
+ mysql:
35
+ image: mysql:5.7
36
+ env:
37
+ MYSQL_ALLOW_EMPTY_PASSWORD: true
38
+ MYSQL_USERNAME: travis
39
+ MYSQL_DATABASE: arext_test
40
+ ports:
41
+ - 3306:3306
42
+ options: >-
43
+ --health-cmd="mysqladmin ping"
44
+ --health-interval=10s
45
+ --health-timeout=5s
46
+ --health-retries=3
47
+
48
+ strategy:
49
+ matrix:
50
+ ruby-version:
51
+ - 3.0.0-preview1
52
+ - 2.7
53
+ - 2.5
54
+ - 2.3
55
+ rails-version:
56
+ - 6_1
57
+ - 6
58
+ - 5_2
59
+ exclude:
60
+ - ruby-version: 2.3
61
+ rails-version: 6_1
62
+ - ruby-version: 2.3
63
+ rails-version: 6
64
+ - ruby-version: 3.0.0-preview1
65
+ rails-version: 5.2
66
+ continue-on-error: ${{ true }}
67
+
68
+ steps:
69
+ - uses: actions/checkout@v2
70
+ - name: Set up Ruby
71
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
72
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
73
+ # uses: ruby/setup-ruby@v1
74
+ uses: ruby/setup-ruby@21351ecc0a7c196081abca5dc55b08f085efe09a
75
+ with:
76
+ ruby-version: ${{ matrix.ruby-version }}
77
+ - name: Setup gemspec
78
+ if: ${{ matrix.rails-version == '6_1' || matrix.rails-version == '6' }}
79
+ run: cp ./gemspecs/arel_extensions-v2.gemspec ./arel_extensions.gemspec
80
+ - name: Install dependencies
81
+ run: |
82
+ export BUNDLE_GEMFILE=gemfiles/rails${{ matrix.rails-version }}.gemfile
83
+ bundle install
84
+ - name: Run test to_sql
85
+ run: rake test:to_sql
86
+ - name: Run test Postgres
87
+ env:
88
+ PGHOST: localhost
89
+ PGUSER: postgres
90
+ run: rake test:postgresql
91
+ - name: Run test MySql
92
+ env:
93
+ DB_CONNECTION: mysql
94
+ DB_HOST: 127.0.0.1
95
+ DB_PORT: 3306
96
+ DB_DATABASE: arext_test
97
+ DB_USERNAME: travis
98
+ run: |
99
+ sudo apt-get install -y mysql-client
100
+ mysql --host 127.0.0.1 --port 3306 -uroot -e 'create user travis;'
101
+ mysql --host 127.0.0.1 --port 3306 -uroot -e 'GRANT ALL PRIVILEGES ON arext_test.* TO travis;'
102
+ rake test:mysql
@@ -129,6 +129,8 @@ matrix:
129
129
  jdk: openjdk11
130
130
  - rvm: 2.7.1
131
131
  gemfile: gemfiles/rails4.gemfile
132
+ - rvm : jruby-9.0.5.0
133
+ gemfile: gemfiles/rails4.gemfile
132
134
  - rvm : jruby-9.2.11.1
133
135
  gemfile: gemfiles/rails4.gemfile
134
136
  - rvm: 2.0.0
data/Gemfile CHANGED
@@ -3,19 +3,19 @@ source "https://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
- gem "sqlite3", '<= 1.3.13', :platforms => [:mri, :mswin, :x64_mingw, :mingw]
7
- gem "mysql2", '0.4.10', :platforms => [:mri, :mswin, :x64_mingw, :mingw]
8
- gem "pg", '< 1', :platforms => [:mri, :mingw, :x64_mingw, :mswin]
6
+ gem "sqlite3", '<= 1.3.13', platforms: [:mri, :mswin, :x64_mingw, :mingw]
7
+ gem "mysql2", '0.4.10', platforms: [:mri, :mswin, :x64_mingw, :mingw]
8
+ gem "pg", '< 1', platforms: [:mri, :mingw, :x64_mingw, :mswin]
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", '~> 1.3.0' ,:require => false, :platforms => [:mri,:mingw, :x64_mingw, :mswin]
16
- gem "activerecord-sqlserver-adapter", '~> 4.2.0', :platforms => [:mri, :mingw, :x64_mingw, :mswin]
15
+ gem "tiny_tds", '~> 1.3.0',require: false, platforms: [:mri,:mingw, :x64_mingw, :mswin]
16
+ gem "activerecord-sqlserver-adapter", '~> 4.2.0', platforms: [:mri, :mingw, :x64_mingw, :mswin]
17
17
 
18
- gem 'ruby-oci8', :platforms => [:mri, :mswin, :x64_mingw, :mingw]
18
+ gem 'ruby-oci8', platforms: [:mri, :mswin, :x64_mingw, :mingw]
19
19
  gem 'activerecord-oracle_enhanced-adapter', '~> 1.6.0'
20
20
 
21
21
  gem 'activesupport', '~> 4.0'
data/Rakefile CHANGED
@@ -1,10 +1,10 @@
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
6
  desc "Default Task"
7
- task default: [ :test ]
7
+ task default: [:test]
8
8
 
9
9
  Rake::TestTask.new(:test) do |t|
10
10
  t.libs << 'lib'
@@ -38,8 +38,8 @@ end
38
38
  end
39
39
 
40
40
  namespace adapter do
41
- task :test => "test_#{adapter}"
42
- task :isolated_test => "isolated_test_#{adapter}"
41
+ task test: "test_#{adapter}"
42
+ task isolated_test: "isolated_test_#{adapter}"
43
43
 
44
44
  # Set the connection environment for the adapter
45
45
  task(:env) { ENV['DB'] = adapter }
@@ -25,4 +25,4 @@ Gem::Specification.new do |s|
25
25
  s.add_development_dependency('minitest', '~> 5.9')
26
26
  s.add_development_dependency('rdoc', '~> 4.0')
27
27
  s.add_development_dependency('rake', '~> 12.3.3')
28
- end
28
+ end
@@ -3,18 +3,18 @@ source "https://rubygems.org"
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: "../"
@@ -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
- gem 'ruby-oci8', :platforms => [:mri, :mswin, :mingw] if ENV.has_key? 'ORACLE_HOME'
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: "../"
@@ -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
- gem 'ruby-oci8', :platforms => [:mri, :mswin, :mingw] if ENV.has_key? 'ORACLE_HOME'
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
- 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
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
27
27
  end
28
28
 
29
- gemspec :path => "../"
29
+ gemspec path: "../"
@@ -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
- gem 'ruby-oci8', :platforms => [:mri, :mswin, :mingw] if ENV.has_key? 'ORACLE_HOME'
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
- 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
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
28
28
  end
29
29
 
30
- gemspec :path => "../"
30
+ gemspec path: "../"
@@ -8,23 +8,23 @@ group :development, :test do
8
8
  gem 'activemodel', '~> 5.2.0'
9
9
  gem 'activerecord', '~> 5.2.0'
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
- gem 'ruby-oci8', :platforms => [:mri, :mswin, :mingw] if ENV.has_key? 'ORACLE_HOME'
18
+ gem 'ruby-oci8', platforms: [:mri, :mswin, :mingw] if ENV.has_key? 'ORACLE_HOME'
19
19
  gem 'activerecord-oracle_enhanced-adapter', '~> 5.2.0' if ENV.has_key? 'ORACLE_HOME'
20
20
 
21
21
  # for JRuby
22
- gem 'activerecord-jdbc-adapter', :github => 'jruby/activerecord-jdbc-adapter', :tag => 'v52.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
22
+ gem 'activerecord-jdbc-adapter', github: 'jruby/activerecord-jdbc-adapter', tag: 'v52.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
28
28
  end
29
29
 
30
- gemspec :path => "../"
30
+ gemspec path: "../"
@@ -8,23 +8,23 @@ 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, :mswin, :mingw]
12
- gem "mysql2", '0.5.2', :platforms => [:mri, :mswin, :mingw]
13
- gem "pg",'< 1.0.0', :platforms => [:mri, :mingw]
11
+ gem "sqlite3", '~> 1.4', platforms: [:mri, :mswin, :mingw]
12
+ gem "mysql2", '0.5.2', 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
- gem 'ruby-oci8', :platforms => [:mri, :mswin, :mingw] if ENV.has_key? 'ORACLE_HOME'
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
- gem 'activerecord-jdbc-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
22
+ gem 'activerecord-jdbc-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 => "../gemspec_v2/"
30
+ gemspec path: "../"
@@ -0,0 +1,30 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem 'rails', '~> 6.1.0'
4
+
5
+
6
+ group :development, :test do
7
+ gem 'activesupport', '~> 6.1.0'
8
+ gem 'activemodel', '~> 6.1.0'
9
+ gem 'activerecord', '~> 6.1.0'
10
+
11
+ gem "sqlite3", '~> 1.4', platforms: [:mri, :mswin, :mingw]
12
+ gem "mysql2", '0.5.2', platforms: [:mri, :mswin, :mingw]
13
+ gem "pg",'~> 1.1', platforms: [:mri, :mingw]
14
+
15
+ #gem "tiny_tds", platforms: [:mri, :mingw] if RUBY_PLATFORM =~ /windows/
16
+ #gem "activerecord-sqlserver-adapter", platforms: [:mri, :mingw]
17
+
18
+ gem 'ruby-oci8', platforms: [:mri, :mswin, :mingw] if ENV.has_key? 'ORACLE_HOME'
19
+ gem 'activerecord-oracle_enhanced-adapter', '~> 6.0.0' if ENV.has_key? 'ORACLE_HOME'
20
+
21
+ # for JRuby
22
+ gem 'activerecord-jdbc-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
+ end
29
+
30
+ gemspec path: "../"
@@ -0,0 +1,28 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+ require "arel_extensions/version"
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "arel_extensions"
6
+ s.version = ArelExtensions::VERSION
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"
13
+ s.license = 'MIT'
14
+
15
+ s.rdoc_options = ["--main", "README.md"]
16
+ s.extra_rdoc_files = ["MIT-LICENSE.txt", "README.md", 'functions.html']
17
+
18
+ # Manifest
19
+ s.files = `git ls-files`.split("\n")
20
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
+ s.require_paths = ["lib"]
22
+
23
+ s.add_dependency('arel', '>= 6.0')
24
+
25
+ s.add_development_dependency('minitest', '~> 5.9')
26
+ s.add_development_dependency('rdoc', '~> 4.0')
27
+ s.add_development_dependency('rake', '~> 12.3.3')
28
+ end