arel_extensions 1.2.23 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +358 -71
  3. data/Gemfile +8 -8
  4. data/README.md +86 -0
  5. data/arel_extensions.gemspec +1 -1
  6. data/gemfiles/rails5_2.gemfile +8 -7
  7. data/gemfiles/rails6.gemfile +7 -8
  8. data/gemfiles/rails6_1.gemfile +6 -7
  9. data/gemfiles/rails7.gemfile +22 -0
  10. data/gemspecs/arel_extensions-v1.gemspec +1 -1
  11. data/gemspecs/arel_extensions-v2.gemspec +1 -1
  12. data/lib/arel_extensions/aliases.rb +14 -0
  13. data/lib/arel_extensions/attributes.rb +2 -0
  14. data/lib/arel_extensions/date_duration.rb +2 -2
  15. data/lib/arel_extensions/helpers.rb +48 -0
  16. data/lib/arel_extensions/insert_manager.rb +19 -17
  17. data/lib/arel_extensions/math.rb +22 -32
  18. data/lib/arel_extensions/nodes/case.rb +5 -6
  19. data/lib/arel_extensions/nodes/cast.rb +1 -1
  20. data/lib/arel_extensions/nodes/date_diff.rb +23 -4
  21. data/lib/arel_extensions/nodes/format.rb +3 -2
  22. data/lib/arel_extensions/nodes/function.rb +2 -6
  23. data/lib/arel_extensions/nodes/json.rb +3 -1
  24. data/lib/arel_extensions/nodes/length.rb +6 -0
  25. data/lib/arel_extensions/nodes/replace.rb +0 -8
  26. data/lib/arel_extensions/nodes/union.rb +1 -1
  27. data/lib/arel_extensions/nodes/union_all.rb +1 -1
  28. data/lib/arel_extensions/string_functions.rb +10 -2
  29. data/lib/arel_extensions/version.rb +1 -1
  30. data/lib/arel_extensions/visitors/mssql.rb +109 -51
  31. data/lib/arel_extensions/visitors/mysql.rb +15 -2
  32. data/lib/arel_extensions/visitors/oracle.rb +8 -3
  33. data/lib/arel_extensions/visitors/postgresql.rb +21 -11
  34. data/lib/arel_extensions/visitors/sqlite.rb +6 -3
  35. data/lib/arel_extensions/visitors/to_sql.rb +14 -9
  36. data/lib/arel_extensions/visitors.rb +9 -1
  37. data/lib/arel_extensions.rb +66 -12
  38. data/test/arelx_test_helper.rb +45 -0
  39. data/test/database.yml +8 -2
  40. data/test/real_db_test.rb +5 -1
  41. data/test/support/fake_record.rb +1 -1
  42. data/test/visitors/test_to_sql.rb +39 -11
  43. data/test/with_ar/all_agnostic_test.rb +79 -6
  44. data/test/with_ar/insert_agnostic_test.rb +6 -2
  45. data/test/with_ar/test_bulk_sqlite.rb +6 -2
  46. data/test/with_ar/test_math_sqlite.rb +6 -2
  47. data/test/with_ar/test_string_mysql.rb +6 -2
  48. data/test/with_ar/test_string_sqlite.rb +6 -2
  49. data/version_v1.rb +1 -1
  50. data/version_v2.rb +1 -1
  51. metadata +10 -8
  52. data/appveyor.yml +0 -44
data/appveyor.yml DELETED
@@ -1,44 +0,0 @@
1
- version: "{build}"
2
-
3
- cache:
4
- - vendor/bundle
5
-
6
- branches:
7
- only:
8
- - master
9
-
10
- services:
11
- - mssql2014
12
-
13
-
14
- install:
15
- - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
16
- - bundle config --local path vendor/bundle
17
- - bundle install
18
-
19
- # Disable normal Windows builds in favor of our test script.
20
- build: off
21
-
22
-
23
- before_test:
24
- - ruby -v
25
- - gem -v
26
- - bundle -v
27
-
28
- test_script:
29
- - ruby --version
30
- - gem --version
31
- - bundler --version
32
- - bundle exec rake test
33
- - ps: Start-Service 'MSSQL$SQL2014'
34
- - timeout /t 4 /nobreak > NUL
35
- - bundle exec rake test:mssql
36
-
37
- environment:
38
- matrix:
39
- - RUBY_VERSION: 200
40
- - RUBY_VERSION: 21
41
- - RUBY_VERSION: 22
42
- - RUBY_VERSION: 23
43
- - RUBY_VERSION: 23-x64
44
-