arel_extensions 1.2.17 → 1.2.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +102 -0
  3. data/Gemfile +10 -10
  4. data/Rakefile +4 -4
  5. data/arel_extensions.gemspec +1 -1
  6. data/gemfiles/rails3.gemfile +9 -9
  7. data/gemfiles/rails4.gemfile +13 -13
  8. data/gemfiles/rails5_0.gemfile +13 -13
  9. data/gemfiles/rails5_1_4.gemfile +13 -13
  10. data/gemfiles/rails5_2.gemfile +13 -13
  11. data/gemfiles/rails6.gemfile +13 -13
  12. data/gemfiles/rails6_1.gemfile +30 -0
  13. data/gemspecs/arel_extensions-v1.gemspec +28 -0
  14. data/{gemspec_v2 → gemspecs}/arel_extensions-v2.gemspec +0 -0
  15. data/generate_gems.sh +4 -3
  16. data/lib/arel_extensions.rb +23 -5
  17. data/lib/arel_extensions/attributes.rb +0 -0
  18. data/lib/arel_extensions/boolean_functions.rb +3 -7
  19. data/lib/arel_extensions/common_sql_functions.rb +0 -2
  20. data/lib/arel_extensions/comparators.rb +11 -14
  21. data/lib/arel_extensions/date_duration.rb +4 -5
  22. data/lib/arel_extensions/insert_manager.rb +16 -17
  23. data/lib/arel_extensions/math.rb +8 -9
  24. data/lib/arel_extensions/math_functions.rb +22 -20
  25. data/lib/arel_extensions/nodes/abs.rb +0 -1
  26. data/lib/arel_extensions/nodes/aggregate_function.rb +0 -1
  27. data/lib/arel_extensions/nodes/blank.rb +0 -1
  28. data/lib/arel_extensions/nodes/case.rb +3 -4
  29. data/lib/arel_extensions/nodes/cast.rb +0 -1
  30. data/lib/arel_extensions/nodes/ceil.rb +1 -1
  31. data/lib/arel_extensions/nodes/change_case.rb +0 -0
  32. data/lib/arel_extensions/nodes/coalesce.rb +0 -1
  33. data/lib/arel_extensions/nodes/collate.rb +0 -1
  34. data/lib/arel_extensions/nodes/concat.rb +2 -4
  35. data/lib/arel_extensions/nodes/date_diff.rb +4 -5
  36. data/lib/arel_extensions/nodes/duration.rb +0 -1
  37. data/lib/arel_extensions/nodes/find_in_set.rb +0 -1
  38. data/lib/arel_extensions/nodes/floor.rb +1 -1
  39. data/lib/arel_extensions/nodes/format.rb +1 -0
  40. data/lib/arel_extensions/nodes/formatted_number.rb +0 -1
  41. data/lib/arel_extensions/nodes/function.rb +8 -5
  42. data/lib/arel_extensions/nodes/is_null.rb +0 -0
  43. data/lib/arel_extensions/nodes/json.rb +0 -6
  44. data/lib/arel_extensions/nodes/length.rb +5 -0
  45. data/lib/arel_extensions/nodes/levenshtein_distance.rb +0 -0
  46. data/lib/arel_extensions/nodes/locate.rb +0 -1
  47. data/lib/arel_extensions/nodes/log10.rb +1 -2
  48. data/lib/arel_extensions/nodes/matches.rb +0 -2
  49. data/lib/arel_extensions/nodes/md5.rb +0 -1
  50. data/lib/arel_extensions/nodes/power.rb +0 -1
  51. data/lib/arel_extensions/nodes/rand.rb +0 -1
  52. data/lib/arel_extensions/nodes/repeat.rb +0 -2
  53. data/lib/arel_extensions/nodes/replace.rb +0 -2
  54. data/lib/arel_extensions/nodes/round.rb +0 -1
  55. data/lib/arel_extensions/nodes/soundex.rb +0 -1
  56. data/lib/arel_extensions/nodes/std.rb +4 -5
  57. data/lib/arel_extensions/nodes/substring.rb +0 -1
  58. data/lib/arel_extensions/nodes/sum.rb +0 -0
  59. data/lib/arel_extensions/nodes/then.rb +0 -0
  60. data/lib/arel_extensions/nodes/trim.rb +0 -2
  61. data/lib/arel_extensions/nodes/union.rb +0 -2
  62. data/lib/arel_extensions/nodes/union_all.rb +0 -2
  63. data/lib/arel_extensions/nodes/wday.rb +0 -4
  64. data/lib/arel_extensions/null_functions.rb +3 -5
  65. data/lib/arel_extensions/predications.rb +2 -3
  66. data/lib/arel_extensions/railtie.rb +5 -5
  67. data/lib/arel_extensions/set_functions.rb +0 -2
  68. data/lib/arel_extensions/string_functions.rb +30 -23
  69. data/lib/arel_extensions/tasks.rb +1 -1
  70. data/lib/arel_extensions/version.rb +1 -1
  71. data/lib/arel_extensions/visitors.rb +68 -60
  72. data/lib/arel_extensions/visitors/convert_format.rb +37 -0
  73. data/lib/arel_extensions/visitors/ibm_db.rb +4 -11
  74. data/lib/arel_extensions/visitors/mssql.rb +50 -45
  75. data/lib/arel_extensions/visitors/mysql.rb +63 -65
  76. data/lib/arel_extensions/visitors/oracle.rb +50 -57
  77. data/lib/arel_extensions/visitors/oracle12.rb +1 -14
  78. data/lib/arel_extensions/visitors/postgresql.rb +39 -34
  79. data/lib/arel_extensions/visitors/sqlite.rb +23 -18
  80. data/lib/arel_extensions/visitors/to_sql.rb +58 -48
  81. data/test/arelx_test_helper.rb +0 -2
  82. data/test/database.yml +2 -0
  83. data/test/real_db_test.rb +26 -41
  84. data/test/support/fake_record.rb +1 -1
  85. data/test/test_comparators.rb +0 -4
  86. data/test/visitors/test_bulk_insert_oracle.rb +0 -1
  87. data/test/visitors/test_bulk_insert_sqlite.rb +0 -2
  88. data/test/visitors/test_oracle.rb +1 -2
  89. data/test/visitors/test_to_sql.rb +16 -25
  90. data/test/with_ar/all_agnostic_test.rb +140 -139
  91. data/test/with_ar/insert_agnostic_test.rb +0 -2
  92. data/test/with_ar/test_bulk_sqlite.rb +0 -4
  93. data/test/with_ar/test_math_sqlite.rb +4 -8
  94. data/test/with_ar/test_string_mysql.rb +1 -5
  95. data/test/with_ar/test_string_sqlite.rb +1 -5
  96. data/version_v1.rb +1 -1
  97. data/version_v2.rb +1 -1
  98. metadata +8 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63535bd97d5c08485672454464e4fd96413ba4f5e7660dd45f008b113f6c92ef
4
- data.tar.gz: 1478ed16cc0a12b70198334394a456c43a33a480ab9d52786a1be75f11016d4a
3
+ metadata.gz: 006465d41dbb691f2048bd0ffc2aaf3d2f1f48f508955f50774ee9c0413ccfa5
4
+ data.tar.gz: 47c61ff636e5fd8c4eb0f470facd661406c4bdca590037a1af5ba87e02ca415e
5
5
  SHA512:
6
- metadata.gz: 0c862b43fb3b4f5758fa2454888bd5abbea6dc802cfb401ba5866fc9c3ce05de6aafb5db151b3a85ac63617fba2f773bb5230c5f0a2f4781a8c07ee521e70783
7
- data.tar.gz: 1114bf913a0e79a0ebf1a9c28c995e3eb428147615bc51861c55de322e0dc3c5968949dce4cf432c525e470fbfa9d49a6d3a371ccdf69fe602a8f2db608c1834
6
+ metadata.gz: f6fb93194f8d9841380ba59e1fd72e0afa8bc0c84809d44e6af6b1282ce04bf1933900aafa6715cbdbf074cd6ba0585698aadc1678c80c1cbfdacc85a04472c3
7
+ data.tar.gz: a4ac1afdba08edb577f182e9e7d7236a5f87ce741ef63979b95c24ac2562fee76576964dc3b58c54a052952046e51c2ae5a9225d2b91c830eecba3c3b372da52
@@ -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
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