arel_extensions 2.3.2 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/publish.yml +2 -1
  3. data/.github/workflows/ruby.yml +94 -45
  4. data/.rubocop.yml +4 -4
  5. data/Makefile +18 -0
  6. data/NEWS.md +12 -0
  7. data/README.md +21 -3
  8. data/dev/arelx.dockerfile +13 -16
  9. data/dev/compose.yaml +26 -28
  10. data/gemfiles/rails6.gemfile +1 -0
  11. data/gemfiles/rails6_1.gemfile +1 -0
  12. data/gemfiles/rails7.gemfile +1 -0
  13. data/gemfiles/rails7_1.gemfile +0 -1
  14. data/gemfiles/rails8.gemfile +40 -0
  15. data/gemfiles/rails8_1.gemfile +41 -0
  16. data/init/postgresql.sql +3 -4
  17. data/lib/arel_extensions/comparators.rb +2 -0
  18. data/lib/arel_extensions/constants.rb +13 -0
  19. data/lib/arel_extensions/helpers.rb +3 -4
  20. data/lib/arel_extensions/math_functions.rb +1 -1
  21. data/lib/arel_extensions/nodes/byte_size.rb +11 -0
  22. data/lib/arel_extensions/nodes/case.rb +1 -1
  23. data/lib/arel_extensions/nodes/char_length.rb +11 -0
  24. data/lib/arel_extensions/nodes/function.rb +1 -3
  25. data/lib/arel_extensions/nodes/matches.rb +2 -2
  26. data/lib/arel_extensions/predications.rb +1 -1
  27. data/lib/arel_extensions/string_functions.rb +15 -2
  28. data/lib/arel_extensions/version.rb +1 -1
  29. data/lib/arel_extensions/visitors/mssql.rb +23 -8
  30. data/lib/arel_extensions/visitors/mysql.rb +14 -0
  31. data/lib/arel_extensions/visitors/oracle.rb +15 -1
  32. data/lib/arel_extensions/visitors/postgresql.rb +14 -0
  33. data/lib/arel_extensions/visitors/sqlite.rb +17 -1
  34. data/lib/arel_extensions/visitors/to_sql.rb +1 -1
  35. data/lib/arel_extensions/visitors.rb +1 -1
  36. data/lib/arel_extensions.rb +15 -6
  37. data/test/arelx_test_helper.rb +8 -6
  38. data/test/config_loader.rb +9 -0
  39. data/test/database.yml +8 -6
  40. data/test/real_db_test.rb +2 -2
  41. data/test/support/fake_record.rb +3 -1
  42. data/test/visitors/test_bulk_insert_oracle.rb +2 -2
  43. data/test/visitors/test_bulk_insert_sqlite.rb +2 -2
  44. data/test/visitors/test_to_sql.rb +1 -1
  45. data/test/with_ar/all_agnostic_test.rb +76 -18
  46. data/test/with_ar/insert_agnostic_test.rb +2 -2
  47. data/test/with_ar/test_bulk_sqlite.rb +2 -2
  48. data/test/with_ar/test_math_sqlite.rb +2 -2
  49. data/test/with_ar/test_string_mysql.rb +2 -2
  50. data/test/with_ar/test_string_sqlite.rb +2 -2
  51. data/version_v1.rb +1 -1
  52. data/version_v2.rb +1 -1
  53. metadata +9 -5
  54. data/bin/compose +0 -6
  55. data/gemfiles/rails3.gemfile +0 -20
  56. data/gemfiles/rails4_2.gemfile +0 -38
@@ -1,11 +1,27 @@
1
1
  require 'arelx_test_helper'
2
2
  require 'date'
3
3
 
4
+ # class ActiveRecord::ConnectionAdapters::SQLServerAdapter
5
+ # # We use *args to avoid breaking signature changes between versions.
6
+ # # internal_exec_sql_query(sql, name = "SQL", binds = [], prepare: false)
7
+ # def internal_exec_sql_query(*args)
8
+ # sql = args.first
9
+ # puts "[DEBUG] MSSQL Query: #{sql}\n"
10
+
11
+ # # Call original implementation (defined in the DatabaseStatements module included in this class)
12
+ # super
13
+ # rescue => e
14
+ # # Catch the crash to print the specific query that caused it one last time
15
+ # puts "[CRASH]: #{args.first}\n"
16
+ # raise e
17
+ # end
18
+ # end
19
+
4
20
  module ArelExtensions
5
21
  module WithAr
6
22
  class ListTest < Minitest::Test
7
23
  def connect_db
8
- ActiveRecord::Base.configurations = YAML.load_file('test/database.yml')
24
+ ActiveRecord::Base.configurations = ConfigLoader.load('test/database.yml')
9
25
  if ENV['DB'] == 'oracle' && ((defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx') || (RUBY_PLATFORM == 'java')) # not supported
10
26
  @env_db = (RUBY_PLATFORM == 'java' ? 'jdbc-sqlite' : 'sqlite')
11
27
  skip "Platform not supported (DB: #{ENV['DB']}, RUBY_ENGINE: #{RUBY_ENGINE}, RUBY_PLATFORM: #{RUBY_PLATFORM})"
@@ -13,7 +29,7 @@ module ArelExtensions
13
29
  @env_db = ENV['DB']
14
30
  end
15
31
  ActiveRecord::Base.establish_connection(@env_db.try(:to_sym) || (RUBY_PLATFORM == 'java' ? :"jdbc-sqlite" : :sqlite))
16
- if ActiveRecord::VERSION::MAJOR >= 7
32
+ if ACTIVE_RECORD_VERSION >= V7_0
17
33
  ActiveRecord.default_timezone = :utc
18
34
  else
19
35
  ActiveRecord::Base.default_timezone = :utc
@@ -68,13 +84,20 @@ module ArelExtensions
68
84
  @laure = User.where(id: u.id)
69
85
  u = User.create age: nil, name: 'Test', created_at: d, score: 1.62, other: 'toto'
70
86
  @test = User.where(id: u.id)
71
- u = User.create age: -42, name: 'Negatif', comments: '1,22,3,42,2', created_at: d, updated_at: d.to_time, score: 0.17
87
+ u = User.create age: -42, name: 'Negatif', comments: '1,22,3,42,2', created_at: d, updated_at: d.to_time, score: 0.17, other: '2'
72
88
  @neg = User.where(id: u.id)
73
89
  u = User.create age: 15, name: 'Justin', created_at: d, score: 11.0
74
90
  @justin = User.where(id: u.id)
75
91
  u = User.create age: nil, name: 'nilly', created_at: nil, score: nil
76
92
  @nilly = User.where(id: u.id)
77
-
93
+ u = User.create age: nil, name: 'esmé', created_at: nil, score: nil
94
+ @esme = User.where(id: u.id)
95
+ u = User.create age: nil, name: 'esmé ', created_at: nil, score: nil
96
+ @esme2 = User.where(id: u.id)
97
+ u = User.create age: nil, name: nil, created_at: nil, score: nil
98
+ @all_nil = User.where(id: u.id)
99
+
100
+ @id = User.arel_table[:id]
78
101
  @age = User.arel_table[:age]
79
102
  @name = User.arel_table[:name]
80
103
  @score = User.arel_table[:score]
@@ -96,7 +119,9 @@ module ArelExtensions
96
119
  end
97
120
 
98
121
  def t(scope, node)
99
- scope.select(node.as('res')).to_a.first.res
122
+ res = scope.select(node.as('res'))
123
+ # puts "[scope] #{res.to_sql}"
124
+ res.to_a.first.res
100
125
  end
101
126
 
102
127
  # manage the difference between adapters that handle or not json type
@@ -150,7 +175,7 @@ module ArelExtensions
150
175
  def test_rand
151
176
  assert 42 != User.select(Arel.rand.as('res')).first.res
152
177
  assert 0 <= User.select(Arel.rand.abs.as('res')).first.res
153
- assert_equal 10, User.order(Arel.rand).limit(50).count
178
+ assert_equal 13, User.order(Arel.rand).limit(50).count
154
179
  end
155
180
 
156
181
  def test_round
@@ -253,6 +278,20 @@ module ArelExtensions
253
278
  assert_equal 7, t(@camille, @name.length)
254
279
  assert_equal 7, t(@camille, @name.length.round.abs)
255
280
  assert_equal 42, t(@laure, @name.length + 37)
281
+
282
+ if @env_db == 'mssql'
283
+ # By default it's UTF-16, and configuring the CI to be UTF-8 is a bit of a hassle.
284
+ assert_equal 4, t(@esme, @name.byte_size)
285
+ assert_equal 5, t(@esme2, @name.byte_size)
286
+ else
287
+ assert_equal 5, t(@esme, @name.byte_size)
288
+ assert_equal 6, t(@esme2, @name.byte_size)
289
+ end
290
+ assert_equal 0, t(@all_nil, @name.byte_size)
291
+
292
+ assert_equal 4, t(@esme, @name.char_length)
293
+ assert_equal 5, t(@esme2, @name.char_length)
294
+ assert_equal 0, t(@all_nil, @name.char_length)
256
295
  end
257
296
 
258
297
  def test_md5
@@ -297,6 +336,9 @@ module ArelExtensions
297
336
  skip 'SQL Server does not know about FIND_IN_SET' if @env_db == 'mssql'
298
337
  assert_equal 5, t(@neg, @comments & 2)
299
338
  assert_equal 0, t(@neg, @comments & 6) # not found
339
+ assert_equal 5, t(@neg, @comments & '2')
340
+ assert_equal 0, t(@neg, @comments & '6') # not found
341
+ assert_equal 5, t(@neg, @comments & @other)
300
342
  end
301
343
 
302
344
  def test_string_comparators
@@ -338,16 +380,27 @@ module ArelExtensions
338
380
  skip "Sqlite version can't load extension for regexp" if $sqlite && $load_extension_disabled
339
381
  skip 'SQL Server does not know about REGEXP without extensions' if @env_db == 'mssql'
340
382
  assert_equal 1, User.where(@name =~ '^M').count
341
- assert_equal 8, User.where(@name !~ '^L').count
383
+ assert_equal 10, User.where(@name !~ '^L').count
342
384
  assert_equal 1, User.where(@name =~ /^M/).count
343
- assert_equal 8, User.where(@name !~ /^L/).count
385
+ assert_equal 10, User.where(@name !~ /^L/).count
386
+ end
387
+
388
+ def test_regex_matches
389
+ skip "Sqlite version can't load extension for regexp" if $sqlite && $load_extension_disabled
390
+ skip 'SQL Server does not know about REGEXP without extensions' if @env_db == 'mssql'
391
+ assert_equal 1, User.where(@name.regex_matches '^M').count
392
+ assert_equal 1, User.where(@name.regex_matches /^M/).count
344
393
  end
345
394
 
346
395
  def test_imatches
347
396
  # puts User.where(@name.imatches('m%')).to_sql
348
397
  assert_equal 1, User.where(@name.imatches('m%')).count
349
- assert_equal 4, User.where(@name.imatches_any(['L%', '%e'])).count
350
- assert_equal 8, User.where(@name.idoes_not_match('L%')).count
398
+ if @env_db == 'mysql'
399
+ assert_equal 5, User.where(@name.imatches_any(['L%', '%e'])).count
400
+ else
401
+ assert_equal 4, User.where(@name.imatches_any(['L%', '%e'])).count
402
+ end
403
+ assert_equal 10, User.where(@name.idoes_not_match('L%')).count
351
404
  end
352
405
 
353
406
  def test_replace
@@ -372,8 +425,8 @@ module ArelExtensions
372
425
  skip "Sqlite version can't load extension for soundex" if $sqlite && $load_extension_disabled
373
426
  skip "PostgreSql version can't load extension for soundex" if @env_db == 'postgresql'
374
427
  assert_equal 'C540', t(@camille, @name.soundex)
375
- assert_equal 10, User.where(@name.soundex.eq(@name.soundex)).count
376
- assert_equal 10, User.where(@name.soundex == @name.soundex).count
428
+ assert_equal 12, User.where(@name.soundex.eq(@name.soundex)).count
429
+ assert_equal 12, User.where(@name.soundex == @name.soundex).count
377
430
  end
378
431
 
379
432
  def test_change_case
@@ -670,7 +723,7 @@ module ArelExtensions
670
723
  def test_date_comparator
671
724
  d = Date.new(2016, 5, 23)
672
725
  assert_equal 0, User.where(@created_at < d).count
673
- assert_equal 10, User.where(@created_at >= d).count
726
+ assert_equal 13, User.where(@created_at >= d).count
674
727
  end
675
728
 
676
729
  def test_date_duration
@@ -853,7 +906,7 @@ module ArelExtensions
853
906
  def test_math_minus
854
907
  d = Date.new(2016, 5, 20)
855
908
  # Datediff
856
- assert_equal 10, User.where((@created_at - @created_at).eq(0)).count
909
+ assert_equal 13, User.where((@created_at - @created_at).eq(0)).count
857
910
  assert_equal 3, @laure.select((@created_at - d).as('res')).first.res.abs.to_i
858
911
  # Substraction
859
912
  assert_equal 0, User.where((@age - 10).eq(50)).count
@@ -972,10 +1025,15 @@ module ArelExtensions
972
1025
  end
973
1026
 
974
1027
  def test_subquery_with_order
975
- skip if ['mssql'].include?(@env_db) && Arel::VERSION.to_i < 10
976
- assert_equal 10, User.where(name: User.select(:name).order(:name)).count
977
- assert_equal 10, User.where(@ut[:name].in(@ut.project(@ut[:name]).order(@ut[:name]))).count
978
- if !['mysql'].include?(@env_db) # MySql can't have limit in IN subquery
1028
+ skip if @env_db == 'mssql' && Arel::VERSION.to_i < 10
1029
+ assert_equal 12, User.where(name: User.select(:name).order(:name)).count
1030
+ assert_equal 12, User.where(@ut[:name].in(@ut.project(@ut[:name]).order(@ut[:name]))).count
1031
+
1032
+ if %w[mssql sqlite].include? @env_db
1033
+ # Sqlite and mssql are sensistive to the nil value in name, defined by @all_nil
1034
+ assert_equal 1, User.where(name: User.select(:name).order(:name).limit(2)).count
1035
+ elsif @env_db != 'mysql'
1036
+ # MySql can't have limit in IN subquery
979
1037
  assert_equal 2, User.where(name: User.select(:name).order(:name).limit(2)).count
980
1038
  # assert_equal 6, User.where(name: User.select(:name).order(:name).offset(2)).count
981
1039
  end
@@ -5,7 +5,7 @@ module ArelExtensions
5
5
  module WithAr
6
6
  class InsertManagerTest < Minitest::Test
7
7
  def connect_db
8
- ActiveRecord::Base.configurations = YAML.load_file('test/database.yml')
8
+ ActiveRecord::Base.configurations = ConfigLoader.load('test/database.yml')
9
9
  if ENV['DB'] == 'oracle' && ((defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx') || (RUBY_PLATFORM == 'java')) # not supported
10
10
  @env_db = (RUBY_PLATFORM == 'java' ? 'jdbc-sqlite' : 'sqlite')
11
11
  skip "Platform not supported (DB: #{ENV['DB']}, RUBY_ENGINE: #{RUBY_ENGINE}, RUBY_PLATFORM: #{RUBY_PLATFORM})"
@@ -13,7 +13,7 @@ module ArelExtensions
13
13
  @env_db = ENV['DB']
14
14
  end
15
15
  ActiveRecord::Base.establish_connection(@env_db.try(:to_sym) || (RUBY_PLATFORM == 'java' ? :"jdbc-sqlite" : :sqlite))
16
- if ActiveRecord::VERSION::MAJOR >= 7
16
+ if ACTIVE_RECORD_VERSION >= V7_0
17
17
  ActiveRecord.default_timezone = :utc
18
18
  else
19
19
  ActiveRecord::Base.default_timezone = :utc
@@ -4,9 +4,9 @@ module ArelExtensions
4
4
  module WithAr
5
5
  describe 'the sqlite visitor' do
6
6
  before do
7
- ActiveRecord::Base.configurations = YAML.load_file('test/database.yml')
7
+ ActiveRecord::Base.configurations = ConfigLoader.load('test/database.yml')
8
8
  ActiveRecord::Base.establish_connection(ENV['DB'] || (RUBY_PLATFORM == 'java' ? :"jdbc-sqlite" : :sqlite))
9
- if ActiveRecord::VERSION::MAJOR >= 7
9
+ if ACTIVE_RECORD_VERSION >= V7_0
10
10
  ActiveRecord.default_timezone = :utc
11
11
  else
12
12
  ActiveRecord::Base.default_timezone = :utc
@@ -4,9 +4,9 @@ module ArelExtensions
4
4
  module WithAr
5
5
  describe 'the sqlite visitor can do maths' do
6
6
  before do
7
- ActiveRecord::Base.configurations = YAML.load_file('test/database.yml')
7
+ ActiveRecord::Base.configurations = ConfigLoader.load('test/database.yml')
8
8
  ActiveRecord::Base.establish_connection(ENV['DB'] || (RUBY_PLATFORM == 'java' ? :"jdbc-sqlite" : :sqlite))
9
- if ActiveRecord::VERSION::MAJOR >= 7
9
+ if ACTIVE_RECORD_VERSION >= V7_0
10
10
  ActiveRecord.default_timezone = :utc
11
11
  else
12
12
  ActiveRecord::Base.default_timezone = :utc
@@ -5,9 +5,9 @@ module ArelExtensions
5
5
  module WithAr
6
6
  describe 'the mysql visitor can do string operations' do
7
7
  before do
8
- ActiveRecord::Base.configurations = YAML.load_file('test/database.yml')
8
+ ActiveRecord::Base.configurations = ConfigLoader.load('test/database.yml')
9
9
  ActiveRecord::Base.establish_connection(ENV['DB'] || (RUBY_PLATFORM == 'java' ? :"jdbc-mysql" : :mysql))
10
- if ActiveRecord::VERSION::MAJOR >= 7
10
+ if ACTIVE_RECORD_VERSION >= V7_0
11
11
  ActiveRecord.default_timezone = :utc
12
12
  else
13
13
  ActiveRecord::Base.default_timezone = :utc
@@ -5,9 +5,9 @@ module ArelExtensions
5
5
  module WithAr
6
6
  describe 'the sqlite visitor can do string operations' do
7
7
  before do
8
- ActiveRecord::Base.configurations = YAML.load_file('test/database.yml')
8
+ ActiveRecord::Base.configurations = ConfigLoader.load('test/database.yml')
9
9
  ActiveRecord::Base.establish_connection(ENV['DB'] || (RUBY_PLATFORM == 'java' ? :"jdbc-sqlite" : :sqlite))
10
- if ActiveRecord::VERSION::MAJOR >= 7
10
+ if ACTIVE_RECORD_VERSION >= V7_0
11
11
  ActiveRecord.default_timezone = :utc
12
12
  else
13
13
  ActiveRecord::Base.default_timezone = :utc
data/version_v1.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ArelExtensions
2
- VERSION = '1.5.2'.freeze
2
+ VERSION = '1.6.0'.freeze
3
3
  end
data/version_v2.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ArelExtensions
2
- VERSION = '2.3.2'.freeze
2
+ VERSION = '2.4.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arel_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yann Azoury
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2025-01-04 00:00:00.000000000 Z
13
+ date: 2025-12-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -75,6 +75,7 @@ files:
75
75
  - CONTRIBUTING.md
76
76
  - Gemfile
77
77
  - MIT-LICENSE.txt
78
+ - Makefile
78
79
  - NEWS.md
79
80
  - README.md
80
81
  - Rakefile
@@ -83,15 +84,12 @@ files:
83
84
  - appveyor.yml
84
85
  - arel_extensions.gemspec
85
86
  - bin/build
86
- - bin/compose
87
87
  - bin/publish
88
88
  - dev/arelx.dockerfile
89
89
  - dev/compose.yaml
90
90
  - dev/postgres.dockerfile
91
91
  - dev/rbenv
92
92
  - functions.html
93
- - gemfiles/rails3.gemfile
94
- - gemfiles/rails4_2.gemfile
95
93
  - gemfiles/rails5.gemfile
96
94
  - gemfiles/rails5_1_4.gemfile
97
95
  - gemfiles/rails5_2.gemfile
@@ -100,6 +98,8 @@ files:
100
98
  - gemfiles/rails7.gemfile
101
99
  - gemfiles/rails7_1.gemfile
102
100
  - gemfiles/rails7_2.gemfile
101
+ - gemfiles/rails8.gemfile
102
+ - gemfiles/rails8_1.gemfile
103
103
  - gemspecs/arel_extensions-v1.gemspec
104
104
  - gemspecs/arel_extensions-v2.gemspec
105
105
  - generate_gems.sh
@@ -114,6 +114,7 @@ files:
114
114
  - lib/arel_extensions/boolean_functions.rb
115
115
  - lib/arel_extensions/common_sql_functions.rb
116
116
  - lib/arel_extensions/comparators.rb
117
+ - lib/arel_extensions/constants.rb
117
118
  - lib/arel_extensions/date_duration.rb
118
119
  - lib/arel_extensions/helpers.rb
119
120
  - lib/arel_extensions/insert_manager.rb
@@ -123,10 +124,12 @@ files:
123
124
  - lib/arel_extensions/nodes/abs.rb
124
125
  - lib/arel_extensions/nodes/aggregate_function.rb
125
126
  - lib/arel_extensions/nodes/blank.rb
127
+ - lib/arel_extensions/nodes/byte_size.rb
126
128
  - lib/arel_extensions/nodes/case.rb
127
129
  - lib/arel_extensions/nodes/cast.rb
128
130
  - lib/arel_extensions/nodes/ceil.rb
129
131
  - lib/arel_extensions/nodes/change_case.rb
132
+ - lib/arel_extensions/nodes/char_length.rb
130
133
  - lib/arel_extensions/nodes/coalesce.rb
131
134
  - lib/arel_extensions/nodes/collate.rb
132
135
  - lib/arel_extensions/nodes/concat.rb
@@ -181,6 +184,7 @@ files:
181
184
  - lib/arel_extensions/visitors/to_sql.rb
182
185
  - lib/arel_extensions/warning.rb
183
186
  - test/arelx_test_helper.rb
187
+ - test/config_loader.rb
184
188
  - test/database.yml
185
189
  - test/real_db_test.rb
186
190
  - test/support/alter_system_user_password.sql
data/bin/compose DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- IFS=$'\n\t'
4
- set -euo pipefail
5
-
6
- docker compose -f dev/compose.yaml up --exit-code-from arelx
@@ -1,20 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'arel', '~> 3.0' # too old...
4
-
5
- group :development, :test do
6
- gem 'sqlite3', '<= 1.3.13', platform: %i[ruby mswin mingw]
7
- gem 'mysql2', '0.4.10', platform: %i[ruby mswin mingw]
8
- gem 'activerecord-mysql2-adapter', platform: %i[ruby mswin mingw]
9
- gem 'pg', platform: %i[ruby mswin mingw]
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
15
- gem 'activesupport', '~> 3.2'
16
- gem 'activemodel', '~> 3.2'
17
- gem 'activerecord', '~> 3.2'
18
- end
19
-
20
- gemspec path: Dir.pwd
@@ -1,38 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'arel', '~> 6.0'
4
-
5
- group :development, :test do
6
- # We need to explicitly include bigdecimal for ruby 2.7 .
7
- # See https://github.com/ruby/bigdecimal for details.
8
- rb_version = Gem::Version.new(RUBY_VERSION)
9
- if Gem::Version.new('2.7') <= rb_version && rb_version < Gem::Version.new('2.8')
10
- gem 'bigdecimal', '~> 1.3.5', platforms: %i[mri mingw x64_mingw mswin]
11
- end
12
-
13
- gem 'activesupport', '~> 4.0'
14
- gem 'activemodel', '~> 4.0'
15
- gem 'activerecord', '~> 4.0'
16
-
17
- gem 'sqlite3', '<= 1.3.13', platforms: %i[mri mswin mingw]
18
- gem 'mysql2', '0.4.10', platforms: %i[mri mswin mingw]
19
- gem 'pg', '< 1.0.0', platforms: %i[mri mingw]
20
-
21
- gem 'tiny_tds', platforms: %i[mri mingw x64_mingw mswin]
22
- gem 'activerecord-sqlserver-adapter', '~> 4.2.0', platforms: %i[mri mingw x64_mingw mswin]
23
-
24
- gem 'ruby-oci8', platforms: %i[mri mswin mingw] if ENV.has_key? 'ORACLE_HOME'
25
- gem 'activerecord-oracle_enhanced-adapter', '~> 1.6.0' if ENV.has_key? 'ORACLE_HOME'
26
-
27
- # for JRuby
28
- gem 'activerecord-jdbc-adapter', '~> 1.3', platforms: :jruby
29
- gem 'jdbc-sqlite3', '~> 3.28', platforms: :jruby
30
- gem 'jdbc-postgres', '~> 42.2', platforms: :jruby
31
- gem 'jdbc-mysql', '~> 5.1', platforms: :jruby
32
- gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
33
- gem 'activerecord-jdbcmysql-adapter', platforms: :jruby
34
- gem 'activerecord-jdbcpostgresql-adapter', platforms: :jruby
35
- gem 'activerecord-jdbcmssql-adapter', platforms: :jruby
36
- end
37
-
38
- gemspec path: Dir.pwd