edge_rider 2.3.1 → 3.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32bfec9bfa5c200e32346b737cab2a2ca8022a7970592b545ea441d18fc7cb1e
4
- data.tar.gz: 27a7901e4a45da9e8c82672b4c94157a811308a85fbef9bda063c2c8854bbf3a
3
+ metadata.gz: 89c58c73902dc1fb230ef750890222d8cb1c07485f081b04209a245a27b8e48a
4
+ data.tar.gz: 99a48339ceebeb9eacf4b24a54aaa11866e322c2b9324adb30c00fd3e83b54fd
5
5
  SHA512:
6
- metadata.gz: 56a14c1c14b1385eeacbea770151e82237fda1b0c80e3b774127f47dfc97ebda0886e455a60958784e6d65c07b7da52902b4f88311b376c2b7ea8b6b490e1428
7
- data.tar.gz: bbda66b48e74e0515b38b1959d1836a77aced98bdb90778d215698a3886c88828edcc7ab0463ce40ffbcfd757addf534fb3690508dfad155aac51557003a9208
6
+ metadata.gz: ef15fa9dd9e60c15bcca9d6196854d4fc24d8ccebd9c3c2a037e50d298cb8ca79696aa122e743fce525ec664bf714d1d6bfba33a0c38d2387badd0246707c196
7
+ data.tar.gz: b107e2454ade349c7156c8667a98d58bac7eb33172686a65329272e88987fd393b456ecb29da318c587284535636aa2a4a4ad7db34dd97ce941343ea4761a3c2
@@ -8,46 +8,6 @@ name: Tests
8
8
  branches:
9
9
  - master
10
10
  jobs:
11
- test_mysql:
12
- runs-on: ubuntu-20.04
13
- services:
14
- mysql:
15
- image: mysql:5.6
16
- env:
17
- MYSQL_ROOT_PASSWORD: password
18
- options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout
19
- 5s --health-retries 5
20
- ports:
21
- - 3306:3306
22
- strategy:
23
- fail-fast: false
24
- # Rails 4.2: Ruby 2.5.7
25
- # Rails 5.2: Ruby 2.5.7 and 2.7.4
26
- matrix:
27
- include:
28
- - ruby: 2.5.7
29
- gemfile: Gemfile.4.2.mysql2
30
- - ruby: 2.5.7
31
- gemfile: Gemfile.5.2.mysql2
32
- - ruby: 2.7.4
33
- gemfile: Gemfile.5.2.mysql2
34
- env:
35
- BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
36
- steps:
37
- - uses: actions/checkout@v2
38
- - name: Install ruby
39
- uses: ruby/setup-ruby@v1
40
- with:
41
- ruby-version: "${{ matrix.ruby }}"
42
- - name: Setup database
43
- run: |
44
- mysql -e 'create database IF NOT EXISTS test;' -u root --password=password -P 3306 -h 127.0.0.1
45
- - name: Bundle
46
- run: |
47
- gem install bundler:2.2.26
48
- bundle install --no-deployment
49
- - name: Run tests
50
- run: bundle exec rspec
51
11
  test_pg:
52
12
  runs-on: ubuntu-22.04
53
13
  services:
@@ -61,28 +21,45 @@ jobs:
61
21
  - 5432:5432
62
22
  strategy:
63
23
  fail-fast: false
64
- # Rails 4.2: Ruby 2.5.7
65
- # Rails 5.2: Ruby 2.5.7 and 2.7.4
66
- # Rails 6.1: Ruby 2.5.7, 2.7.4 and 3.2.1
67
- # Rails 7.0: 2.7.4 and 3.2.1
68
24
  matrix:
69
25
  include:
70
- - ruby: 2.5.7
71
- gemfile: Gemfile.4.2.pg
72
- - ruby: 2.5.7
73
- gemfile: Gemfile.5.2.pg
74
- - ruby: 2.5.7
26
+ # legacy - If a version breaks, just drop it - don't fix it.
27
+ - ruby: 2.7.4
75
28
  gemfile: Gemfile.6.1.pg
76
29
  - ruby: 2.7.4
77
- gemfile: Gemfile.5.2.pg
30
+ gemfile: Gemfile.7.0.pg
78
31
  - ruby: 2.7.4
79
- gemfile: Gemfile.6.1.pg
32
+ gemfile: Gemfile.7.1.pg
80
33
  - ruby: 3.2.1
81
34
  gemfile: Gemfile.6.1.pg
82
- - ruby: 2.7.4
83
- gemfile: Gemfile.7.0.pg
84
35
  - ruby: 3.2.1
85
36
  gemfile: Gemfile.7.0.pg
37
+
38
+ # Officially supported
39
+ - ruby: 3.2.1
40
+ gemfile: Gemfile.7.2.pg
41
+ - ruby: 3.2.1
42
+ gemfile: Gemfile.8.0.pg
43
+ - ruby: 3.2.1
44
+ gemfile: Gemfile.8.1.pg
45
+ - ruby: 3.3.6
46
+ gemfile: Gemfile.7.2.pg
47
+ - ruby: 3.3.6
48
+ gemfile: Gemfile.8.0.pg
49
+ - ruby: 3.3.6
50
+ gemfile: Gemfile.8.1.pg
51
+ - ruby: 3.4.1
52
+ gemfile: Gemfile.7.2.pg
53
+ - ruby: 3.4.1
54
+ gemfile: Gemfile.8.0.pg
55
+ - ruby: 3.4.1
56
+ gemfile: Gemfile.8.1.pg
57
+ - ruby: 4.0.0
58
+ gemfile: Gemfile.7.2.pg
59
+ - ruby: 4.0.0
60
+ gemfile: Gemfile.8.0.pg
61
+ - ruby: 4.0.0
62
+ gemfile: Gemfile.8.1.pg
86
63
  env:
87
64
  BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
88
65
  steps:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.7
1
+ 2.7.4
data/CHANGELOG.md CHANGED
@@ -10,6 +10,28 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
10
10
  ### Compatible changes
11
11
 
12
12
 
13
+ ## 3.0.0 - 2026-03-12
14
+
15
+ ### Breaking changes
16
+ - Drop support for Ruby < 2.7
17
+
18
+ ### Compatible changes
19
+ - Add support for Ruby 4.0
20
+ - Add support for Rails 8.1
21
+
22
+
23
+ ## 2.4.0 - 2025-01-29
24
+
25
+ ### Breaking changes
26
+
27
+ - Drop support for Rails < 6.1. This also drops support for MySQL, which had only been present for Rails < 6.
28
+
29
+ ### Compatible changes
30
+
31
+ - Add support for Rails 7.1, 7.2 and Ruby 3.3
32
+ - Add support for Rails 8.0 and Ruby 3.4
33
+
34
+
13
35
  ## 2.3.1 - 2024-10-18
14
36
 
15
37
  ### Compatible changes
data/Gemfile.6.1.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- edge_rider (2.3.1)
4
+ edge_rider (3.0.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
data/Gemfile.7.0.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- edge_rider (2.3.1)
4
+ edge_rider (3.0.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -60,7 +60,7 @@ GEM
60
60
  concurrent-ruby (~> 1.0)
61
61
 
62
62
  PLATFORMS
63
- x86_64-linux
63
+ ruby
64
64
 
65
65
  DEPENDENCIES
66
66
  activerecord (~> 7.0.1)
@@ -1,16 +1,16 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Runtime dependencies
4
- gem 'activerecord', '~>4.2.0'
5
- gem 'mysql2', '~>0.4.10'
4
+ gem 'activerecord', '~>7.1.5'
5
+ gem 'pg', '>=1.3'
6
6
 
7
7
  # Development dependencies
8
8
  gem 'rake'
9
9
  gem 'database_cleaner'
10
10
  gem 'has_defaults' # used by test models
11
11
  gem 'rspec'
12
- gem 'gemika', '>=0.5.0'
13
- gem 'pry-byebug'
12
+ gem 'gemika', '>=0.8.1'
13
+ gem 'pry-byebug', '>=3.10.1'
14
14
  gem 'db-query-matchers'
15
15
 
16
16
  # Gem under test
@@ -0,0 +1,96 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ edge_rider (3.0.0)
5
+ activerecord (>= 3.2)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (7.1.5)
11
+ activesupport (= 7.1.5)
12
+ activerecord (7.1.5)
13
+ activemodel (= 7.1.5)
14
+ activesupport (= 7.1.5)
15
+ timeout (>= 0.4.0)
16
+ activesupport (7.1.5)
17
+ base64
18
+ benchmark (>= 0.3)
19
+ bigdecimal
20
+ concurrent-ruby (~> 1.0, >= 1.0.2)
21
+ connection_pool (>= 2.2.5)
22
+ drb
23
+ i18n (>= 1.6, < 2)
24
+ logger (>= 1.4.2)
25
+ minitest (>= 5.1)
26
+ mutex_m
27
+ securerandom (>= 0.3)
28
+ tzinfo (~> 2.0)
29
+ base64 (0.2.0)
30
+ benchmark (0.4.0)
31
+ bigdecimal (3.1.8)
32
+ byebug (11.1.3)
33
+ coderay (1.1.3)
34
+ concurrent-ruby (1.3.4)
35
+ connection_pool (2.4.1)
36
+ database_cleaner (2.1.0)
37
+ database_cleaner-active_record (>= 2, < 3)
38
+ database_cleaner-active_record (2.2.0)
39
+ activerecord (>= 5.a)
40
+ database_cleaner-core (~> 2.0.0)
41
+ database_cleaner-core (2.0.1)
42
+ db-query-matchers (0.8.0)
43
+ diff-lcs (1.5.1)
44
+ drb (2.2.1)
45
+ gemika (0.8.3)
46
+ has_defaults (1.2.1)
47
+ activerecord
48
+ i18n (1.14.6)
49
+ concurrent-ruby (~> 1.0)
50
+ logger (1.6.1)
51
+ method_source (1.1.0)
52
+ minitest (5.25.2)
53
+ mutex_m (0.3.0)
54
+ pg (1.5.9)
55
+ pry (0.14.2)
56
+ coderay (~> 1.1)
57
+ method_source (~> 1.0)
58
+ pry-byebug (3.10.1)
59
+ byebug (~> 11.0)
60
+ pry (>= 0.13, < 0.15)
61
+ rake (13.2.1)
62
+ rspec (3.13.0)
63
+ rspec-core (~> 3.13.0)
64
+ rspec-expectations (~> 3.13.0)
65
+ rspec-mocks (~> 3.13.0)
66
+ rspec-core (3.13.2)
67
+ rspec-support (~> 3.13.0)
68
+ rspec-expectations (3.13.3)
69
+ diff-lcs (>= 1.2.0, < 2.0)
70
+ rspec-support (~> 3.13.0)
71
+ rspec-mocks (3.13.2)
72
+ diff-lcs (>= 1.2.0, < 2.0)
73
+ rspec-support (~> 3.13.0)
74
+ rspec-support (3.13.1)
75
+ securerandom (0.3.2)
76
+ timeout (0.4.2)
77
+ tzinfo (2.0.6)
78
+ concurrent-ruby (~> 1.0)
79
+
80
+ PLATFORMS
81
+ ruby
82
+
83
+ DEPENDENCIES
84
+ activerecord (~> 7.1.5)
85
+ database_cleaner
86
+ db-query-matchers
87
+ edge_rider!
88
+ gemika (>= 0.8.1)
89
+ has_defaults
90
+ pg (>= 1.3)
91
+ pry-byebug (>= 3.10.1)
92
+ rake
93
+ rspec
94
+
95
+ BUNDLED WITH
96
+ 2.3.4
@@ -1,16 +1,16 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Runtime dependencies
4
- gem 'activerecord', '~>4.2.0'
5
- gem 'pg'
4
+ gem 'activerecord', '~>7.2.2'
5
+ gem 'pg', '>=1.3'
6
6
 
7
7
  # Development dependencies
8
8
  gem 'rake'
9
9
  gem 'database_cleaner'
10
- gem 'rspec'
11
10
  gem 'has_defaults' # used by test models
12
- gem 'gemika', '>=0.5.0'
13
- gem 'pry-byebug'
11
+ gem 'rspec'
12
+ gem 'gemika', '>=0.8.1'
13
+ gem 'pry-byebug', '>=3.11.0'
14
14
  gem 'db-query-matchers'
15
15
 
16
16
  # Gem under test
@@ -0,0 +1,104 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ edge_rider (3.0.0)
5
+ activerecord (>= 3.2)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (7.2.2)
11
+ activesupport (= 7.2.2)
12
+ activerecord (7.2.2)
13
+ activemodel (= 7.2.2)
14
+ activesupport (= 7.2.2)
15
+ timeout (>= 0.4.0)
16
+ activesupport (7.2.2)
17
+ base64
18
+ benchmark (>= 0.3)
19
+ bigdecimal
20
+ concurrent-ruby (~> 1.0, >= 1.3.1)
21
+ connection_pool (>= 2.2.5)
22
+ drb
23
+ i18n (>= 1.6, < 2)
24
+ logger (>= 1.4.2)
25
+ minitest (>= 5.1)
26
+ securerandom (>= 0.3)
27
+ tzinfo (~> 2.0, >= 2.0.5)
28
+ base64 (0.2.0)
29
+ benchmark (0.4.0)
30
+ bigdecimal (3.1.8)
31
+ byebug (13.0.0)
32
+ reline (>= 0.6.0)
33
+ coderay (1.1.3)
34
+ concurrent-ruby (1.3.4)
35
+ connection_pool (2.4.1)
36
+ database_cleaner (2.1.0)
37
+ database_cleaner-active_record (>= 2, < 3)
38
+ database_cleaner-active_record (2.2.0)
39
+ activerecord (>= 5.a)
40
+ database_cleaner-core (~> 2.0.0)
41
+ database_cleaner-core (2.0.1)
42
+ db-query-matchers (0.14.0)
43
+ activesupport (>= 4.0, < 8.1)
44
+ rspec (>= 3.0)
45
+ diff-lcs (1.5.1)
46
+ drb (2.2.1)
47
+ gemika (0.8.3)
48
+ has_defaults (1.2.1)
49
+ activerecord
50
+ i18n (1.14.6)
51
+ concurrent-ruby (~> 1.0)
52
+ io-console (0.8.2)
53
+ logger (1.6.1)
54
+ method_source (1.1.0)
55
+ minitest (6.0.2)
56
+ drb (~> 2.0)
57
+ prism (~> 1.5)
58
+ pg (1.5.9)
59
+ prism (1.9.0)
60
+ pry (0.16.0)
61
+ coderay (~> 1.1)
62
+ method_source (~> 1.0)
63
+ reline (>= 0.6.0)
64
+ pry-byebug (3.12.0)
65
+ byebug (~> 13.0)
66
+ pry (>= 0.13, < 0.17)
67
+ rake (13.2.1)
68
+ reline (0.6.3)
69
+ io-console (~> 0.5)
70
+ rspec (3.13.0)
71
+ rspec-core (~> 3.13.0)
72
+ rspec-expectations (~> 3.13.0)
73
+ rspec-mocks (~> 3.13.0)
74
+ rspec-core (3.13.2)
75
+ rspec-support (~> 3.13.0)
76
+ rspec-expectations (3.13.3)
77
+ diff-lcs (>= 1.2.0, < 2.0)
78
+ rspec-support (~> 3.13.0)
79
+ rspec-mocks (3.13.2)
80
+ diff-lcs (>= 1.2.0, < 2.0)
81
+ rspec-support (~> 3.13.0)
82
+ rspec-support (3.13.1)
83
+ securerandom (0.3.2)
84
+ timeout (0.4.2)
85
+ tzinfo (2.0.6)
86
+ concurrent-ruby (~> 1.0)
87
+
88
+ PLATFORMS
89
+ ruby
90
+
91
+ DEPENDENCIES
92
+ activerecord (~> 7.2.2)
93
+ database_cleaner
94
+ db-query-matchers
95
+ edge_rider!
96
+ gemika (>= 0.8.1)
97
+ has_defaults
98
+ pg (>= 1.3)
99
+ pry-byebug (>= 3.11.0)
100
+ rake
101
+ rspec
102
+
103
+ BUNDLED WITH
104
+ 2.5.23
@@ -1,17 +1,16 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Runtime dependencies
4
- gem 'activerecord', '~>5.2.3'
5
- gem 'pg'
6
- gem 'i18n', '<=1.5.1' # Required to support tests for Ruby 2.2.x
4
+ gem 'activerecord', '~>8.0.0'
5
+ gem 'pg', '>=1.3'
7
6
 
8
7
  # Development dependencies
9
8
  gem 'rake'
10
9
  gem 'database_cleaner'
11
10
  gem 'has_defaults' # used by test models
12
11
  gem 'rspec'
13
- gem 'gemika', '>=0.5.0'
14
- gem 'pry-byebug'
12
+ gem 'gemika', '>=0.8.1'
13
+ gem 'pry-byebug', '>=3.11.0'
15
14
  gem 'db-query-matchers'
16
15
 
17
16
  # Gem under test
@@ -0,0 +1,106 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ edge_rider (3.0.0)
5
+ activerecord (>= 3.2)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (8.0.1)
11
+ activesupport (= 8.0.1)
12
+ activerecord (8.0.1)
13
+ activemodel (= 8.0.1)
14
+ activesupport (= 8.0.1)
15
+ timeout (>= 0.4.0)
16
+ activesupport (8.0.1)
17
+ base64
18
+ benchmark (>= 0.3)
19
+ bigdecimal
20
+ concurrent-ruby (~> 1.0, >= 1.3.1)
21
+ connection_pool (>= 2.2.5)
22
+ drb
23
+ i18n (>= 1.6, < 2)
24
+ logger (>= 1.4.2)
25
+ minitest (>= 5.1)
26
+ securerandom (>= 0.3)
27
+ tzinfo (~> 2.0, >= 2.0.5)
28
+ uri (>= 0.13.1)
29
+ base64 (0.2.0)
30
+ benchmark (0.4.0)
31
+ bigdecimal (3.1.9)
32
+ byebug (13.0.0)
33
+ reline (>= 0.6.0)
34
+ coderay (1.1.3)
35
+ concurrent-ruby (1.3.5)
36
+ connection_pool (2.5.0)
37
+ database_cleaner (2.1.0)
38
+ database_cleaner-active_record (>= 2, < 3)
39
+ database_cleaner-active_record (2.2.0)
40
+ activerecord (>= 5.a)
41
+ database_cleaner-core (~> 2.0.0)
42
+ database_cleaner-core (2.0.1)
43
+ db-query-matchers (0.14.0)
44
+ activesupport (>= 4.0, < 8.1)
45
+ rspec (>= 3.0)
46
+ diff-lcs (1.5.1)
47
+ drb (2.2.1)
48
+ gemika (0.8.4)
49
+ has_defaults (1.2.1)
50
+ activerecord
51
+ i18n (1.14.7)
52
+ concurrent-ruby (~> 1.0)
53
+ io-console (0.8.2)
54
+ logger (1.6.5)
55
+ method_source (1.1.0)
56
+ minitest (6.0.2)
57
+ drb (~> 2.0)
58
+ prism (~> 1.5)
59
+ pg (1.5.9)
60
+ prism (1.9.0)
61
+ pry (0.16.0)
62
+ coderay (~> 1.1)
63
+ method_source (~> 1.0)
64
+ reline (>= 0.6.0)
65
+ pry-byebug (3.12.0)
66
+ byebug (~> 13.0)
67
+ pry (>= 0.13, < 0.17)
68
+ rake (13.2.1)
69
+ reline (0.6.3)
70
+ io-console (~> 0.5)
71
+ rspec (3.13.0)
72
+ rspec-core (~> 3.13.0)
73
+ rspec-expectations (~> 3.13.0)
74
+ rspec-mocks (~> 3.13.0)
75
+ rspec-core (3.13.2)
76
+ rspec-support (~> 3.13.0)
77
+ rspec-expectations (3.13.3)
78
+ diff-lcs (>= 1.2.0, < 2.0)
79
+ rspec-support (~> 3.13.0)
80
+ rspec-mocks (3.13.2)
81
+ diff-lcs (>= 1.2.0, < 2.0)
82
+ rspec-support (~> 3.13.0)
83
+ rspec-support (3.13.2)
84
+ securerandom (0.4.1)
85
+ timeout (0.4.3)
86
+ tzinfo (2.0.6)
87
+ concurrent-ruby (~> 1.0)
88
+ uri (1.0.2)
89
+
90
+ PLATFORMS
91
+ ruby
92
+
93
+ DEPENDENCIES
94
+ activerecord (~> 8.0.0)
95
+ database_cleaner
96
+ db-query-matchers
97
+ edge_rider!
98
+ gemika (>= 0.8.1)
99
+ has_defaults
100
+ pg (>= 1.3)
101
+ pry-byebug (>= 3.11.0)
102
+ rake
103
+ rspec
104
+
105
+ BUNDLED WITH
106
+ 2.4.7
@@ -1,17 +1,16 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Runtime dependencies
4
- gem 'activerecord', '~>5.2.3'
5
- gem 'mysql2', '~>0.4.10'
6
- gem 'i18n', '<=1.5.1' # Required to support tests for Ruby 2.2.x
4
+ gem 'activerecord', '~>8.1.0'
5
+ gem 'pg', '>=1.3'
7
6
 
8
7
  # Development dependencies
9
8
  gem 'rake'
10
9
  gem 'database_cleaner'
11
- gem 'rspec'
12
10
  gem 'has_defaults' # used by test models
13
- gem 'gemika', '>=0.5.0'
14
- gem 'pry-byebug'
11
+ gem 'rspec'
12
+ gem 'gemika', '>=0.8.1'
13
+ gem 'pry-byebug', '>=3.11.0'
15
14
  gem 'db-query-matchers'
16
15
 
17
16
  # Gem under test
@@ -0,0 +1,106 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ edge_rider (3.0.0)
5
+ activerecord (>= 3.2)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (8.1.2)
11
+ activesupport (= 8.1.2)
12
+ activerecord (8.1.2)
13
+ activemodel (= 8.1.2)
14
+ activesupport (= 8.1.2)
15
+ timeout (>= 0.4.0)
16
+ activesupport (8.1.2)
17
+ base64
18
+ bigdecimal
19
+ concurrent-ruby (~> 1.0, >= 1.3.1)
20
+ connection_pool (>= 2.2.5)
21
+ drb
22
+ i18n (>= 1.6, < 2)
23
+ json
24
+ logger (>= 1.4.2)
25
+ minitest (>= 5.1)
26
+ securerandom (>= 0.3)
27
+ tzinfo (~> 2.0, >= 2.0.5)
28
+ uri (>= 0.13.1)
29
+ base64 (0.3.0)
30
+ bigdecimal (4.0.1)
31
+ byebug (13.0.0)
32
+ reline (>= 0.6.0)
33
+ coderay (1.1.3)
34
+ concurrent-ruby (1.3.6)
35
+ connection_pool (3.0.2)
36
+ database_cleaner (2.1.0)
37
+ database_cleaner-active_record (>= 2, < 3)
38
+ database_cleaner-active_record (2.2.2)
39
+ activerecord (>= 5.a)
40
+ database_cleaner-core (~> 2.0)
41
+ database_cleaner-core (2.0.1)
42
+ db-query-matchers (0.15.0)
43
+ activesupport (>= 4.0)
44
+ rspec (>= 3.0)
45
+ diff-lcs (1.6.2)
46
+ drb (2.2.3)
47
+ gemika (2.0.0)
48
+ has_defaults (1.3.0)
49
+ activerecord
50
+ i18n (1.14.8)
51
+ concurrent-ruby (~> 1.0)
52
+ io-console (0.8.2)
53
+ json (2.18.1)
54
+ logger (1.7.0)
55
+ method_source (1.1.0)
56
+ minitest (6.0.2)
57
+ drb (~> 2.0)
58
+ prism (~> 1.5)
59
+ pg (1.6.3-x86_64-linux)
60
+ prism (1.9.0)
61
+ pry (0.16.0)
62
+ coderay (~> 1.1)
63
+ method_source (~> 1.0)
64
+ reline (>= 0.6.0)
65
+ pry-byebug (3.12.0)
66
+ byebug (~> 13.0)
67
+ pry (>= 0.13, < 0.17)
68
+ rake (13.3.1)
69
+ reline (0.6.3)
70
+ io-console (~> 0.5)
71
+ rspec (3.13.2)
72
+ rspec-core (~> 3.13.0)
73
+ rspec-expectations (~> 3.13.0)
74
+ rspec-mocks (~> 3.13.0)
75
+ rspec-core (3.13.6)
76
+ rspec-support (~> 3.13.0)
77
+ rspec-expectations (3.13.5)
78
+ diff-lcs (>= 1.2.0, < 2.0)
79
+ rspec-support (~> 3.13.0)
80
+ rspec-mocks (3.13.7)
81
+ diff-lcs (>= 1.2.0, < 2.0)
82
+ rspec-support (~> 3.13.0)
83
+ rspec-support (3.13.7)
84
+ securerandom (0.4.1)
85
+ timeout (0.6.0)
86
+ tzinfo (2.0.6)
87
+ concurrent-ruby (~> 1.0)
88
+ uri (1.1.1)
89
+
90
+ PLATFORMS
91
+ ruby
92
+
93
+ DEPENDENCIES
94
+ activerecord (~> 8.1.0)
95
+ database_cleaner
96
+ db-query-matchers
97
+ edge_rider!
98
+ gemika (>= 0.8.1)
99
+ has_defaults
100
+ pg (>= 1.3)
101
+ pry-byebug (>= 3.11.0)
102
+ rake
103
+ rspec
104
+
105
+ BUNDLED WITH
106
+ 2.4.7
data/edge_rider.gemspec CHANGED
@@ -5,7 +5,7 @@ require "edge_rider/version"
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'edge_rider'
7
7
  spec.version = EdgeRider::VERSION
8
- spec.required_ruby_version = '>= 2.3.0'
8
+ spec.required_ruby_version = '>= 2.7.4'
9
9
  spec.authors = ['Henning Koch']
10
10
  spec.email = ['henning.koch@makandra.de']
11
11
 
@@ -6,13 +6,7 @@ module EdgeRider
6
6
  qualified_column_name = EdgeRider::Util.qualify_column_name(self, column_name)
7
7
 
8
8
  scope = scoped({})
9
- if distinct
10
- if ActiveRecord::VERSION::MAJOR < 5
11
- scope = scope.uniq
12
- else
13
- scope = scope.distinct
14
- end
15
- end
9
+ scope = scope.distinct if distinct
16
10
  scope.pluck(qualified_column_name)
17
11
  end
18
12
 
@@ -9,9 +9,7 @@ module EdgeRider
9
9
  def preload_associations(*args)
10
10
  preloader = ActiveRecord::Associations::Preloader
11
11
 
12
- if preloader.method_defined?(:run) # Rails 3.2 / Rails 4
13
- preloader.new(*args).run
14
- elsif preloader.method_defined?(:preload) # Rails 5 to Rails 6.1
12
+ if preloader.method_defined?(:preload) # Rails 5 to Rails 6.1
15
13
  preloader.new.preload(*args)
16
14
  else # Rails 7+
17
15
  records = args.first
@@ -26,7 +26,5 @@ module EdgeRider
26
26
  end
27
27
 
28
28
  ActiveSupport.on_load :active_record do
29
- if ActiveRecord::VERSION::MAJOR >= 4
30
- extend(EdgeRider::Scoped)
31
- end
29
+ extend(EdgeRider::Scoped)
32
30
  end
@@ -6,17 +6,7 @@ module EdgeRider
6
6
 
7
7
  def qualify_column_name(model, column_name)
8
8
  column_name = column_name.to_s
9
- unless column_name.include?('.')
10
- column_name = if ActiveRecord::VERSION::MAJOR < 4
11
- quoted_table_name = model.connection.quote_table_name(model.table_name)
12
- quoted_column_name = model.connection.quote_column_name(column_name)
13
- "#{quoted_table_name}.#{quoted_column_name}"
14
- else
15
- # Rails 4+ will quote correctly and Rails 5.2 will print
16
- # deprecation warnings if there are surplus quotes
17
- "#{model.table_name}.#{column_name}"
18
- end
19
- end
9
+ column_name = "#{model.table_name}.#{column_name}" unless column_name.include?('.')
20
10
  column_name
21
11
  end
22
12
 
@@ -27,33 +17,18 @@ module EdgeRider
27
17
  def scope?(object)
28
18
  object.respond_to?(:scoped)
29
19
  end
30
-
20
+
31
21
  def define_scope(klass, name, lambda)
32
- if ActiveRecord::VERSION::MAJOR == 3
33
- klass.send :scope, name, lambda
34
- else
35
- klass.send :scope, name, lambda { |*args|
36
- options = lambda.call(*args)
37
- if ActiveRecord::VERSION::MAJOR < 6
38
- klass.scoped(options.slice :conditions)
39
- else
40
- scoped(options.slice :conditions)
41
- end
42
- }
43
- end
22
+ klass.send :scope, name, lambda { |*args|
23
+ options = lambda.call(*args)
24
+ scoped(options.slice :conditions)
25
+ }
44
26
  end
45
-
27
+
46
28
  def define_association(owner, association, target, options)
47
- if active_record_version < 4
48
- owner.send association, target, options
49
- else
50
- # Reduce the options hash to the given keys and store the remainder in
51
- # other_options. Using Hash#extract! would be easier to unterstand,
52
- # but Rails 2 does not have it.
53
- other_options = options.slice!(:conditions)
54
- scope = lambda { |*args| scoped(options) }
55
- owner.send association, target, scope, **other_options
56
- end
29
+ conditions = options.extract!(:conditions)
30
+ scope = lambda { |*args| scoped(conditions) }
31
+ owner.send association, target, scope, **options
57
32
  end
58
33
 
59
34
  def active_record_version
@@ -1,3 +1,3 @@
1
1
  module EdgeRider
2
- VERSION = '2.3.1'
2
+ VERSION = '3.0.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edge_rider
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-10-18 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activerecord
@@ -37,18 +36,18 @@ files:
37
36
  - ".ruby-version"
38
37
  - CHANGELOG.md
39
38
  - Gemfile
40
- - Gemfile.4.2.mysql2
41
- - Gemfile.4.2.mysql2.lock
42
- - Gemfile.4.2.pg
43
- - Gemfile.4.2.pg.lock
44
- - Gemfile.5.2.mysql2
45
- - Gemfile.5.2.mysql2.lock
46
- - Gemfile.5.2.pg
47
- - Gemfile.5.2.pg.lock
48
39
  - Gemfile.6.1.pg
49
40
  - Gemfile.6.1.pg.lock
50
41
  - Gemfile.7.0.pg
51
42
  - Gemfile.7.0.pg.lock
43
+ - Gemfile.7.1.pg
44
+ - Gemfile.7.1.pg.lock
45
+ - Gemfile.7.2.pg
46
+ - Gemfile.7.2.pg.lock
47
+ - Gemfile.8.0.pg
48
+ - Gemfile.8.0.pg.lock
49
+ - Gemfile.8.1.pg
50
+ - Gemfile.8.1.pg.lock
52
51
  - Gemfile.lock
53
52
  - LICENSE
54
53
  - README.md
@@ -70,7 +69,6 @@ licenses:
70
69
  - MIT
71
70
  metadata:
72
71
  rubygems_mfa_required: 'true'
73
- post_install_message:
74
72
  rdoc_options: []
75
73
  require_paths:
76
74
  - lib
@@ -78,15 +76,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
76
  requirements:
79
77
  - - ">="
80
78
  - !ruby/object:Gem::Version
81
- version: 2.3.0
79
+ version: 2.7.4
82
80
  required_rubygems_version: !ruby/object:Gem::Requirement
83
81
  requirements:
84
82
  - - ">="
85
83
  - !ruby/object:Gem::Version
86
84
  version: '0'
87
85
  requirements: []
88
- rubygems_version: 3.2.32
89
- signing_key:
86
+ rubygems_version: 4.0.6
90
87
  specification_version: 4
91
88
  summary: Power tools for ActiveRecord relations (scopes)
92
89
  test_files: []
@@ -1,80 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- edge_rider (2.3.1)
5
- activerecord (>= 3.2)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activemodel (4.2.11)
11
- activesupport (= 4.2.11)
12
- builder (~> 3.1)
13
- activerecord (4.2.11)
14
- activemodel (= 4.2.11)
15
- activesupport (= 4.2.11)
16
- arel (~> 6.0)
17
- activesupport (4.2.11)
18
- i18n (~> 0.7)
19
- minitest (~> 5.1)
20
- thread_safe (~> 0.3, >= 0.3.4)
21
- tzinfo (~> 1.1)
22
- arel (6.0.4)
23
- builder (3.2.4)
24
- byebug (10.0.2)
25
- coderay (1.1.2)
26
- concurrent-ruby (1.1.9)
27
- database_cleaner (1.0.1)
28
- db-query-matchers (0.10.0)
29
- activesupport (>= 4.0, < 7)
30
- rspec (~> 3.0)
31
- diff-lcs (1.2.5)
32
- gemika (0.6.1)
33
- has_defaults (0.4.4)
34
- activerecord
35
- i18n (0.9.5)
36
- concurrent-ruby (~> 1.0)
37
- method_source (0.9.2)
38
- minitest (5.14.4)
39
- mysql2 (0.4.10)
40
- pry (0.12.2)
41
- coderay (~> 1.1.0)
42
- method_source (~> 0.9.0)
43
- pry-byebug (3.6.0)
44
- byebug (~> 10.0)
45
- pry (~> 0.10)
46
- rake (11.3.0)
47
- rspec (3.5.0)
48
- rspec-core (~> 3.5.0)
49
- rspec-expectations (~> 3.5.0)
50
- rspec-mocks (~> 3.5.0)
51
- rspec-core (3.5.3)
52
- rspec-support (~> 3.5.0)
53
- rspec-expectations (3.5.0)
54
- diff-lcs (>= 1.2.0, < 2.0)
55
- rspec-support (~> 3.5.0)
56
- rspec-mocks (3.5.0)
57
- diff-lcs (>= 1.2.0, < 2.0)
58
- rspec-support (~> 3.5.0)
59
- rspec-support (3.5.0)
60
- thread_safe (0.3.6)
61
- tzinfo (1.2.9)
62
- thread_safe (~> 0.1)
63
-
64
- PLATFORMS
65
- ruby
66
-
67
- DEPENDENCIES
68
- activerecord (~> 4.2.0)
69
- database_cleaner
70
- db-query-matchers
71
- edge_rider!
72
- gemika (>= 0.5.0)
73
- has_defaults
74
- mysql2 (~> 0.4.10)
75
- pry-byebug
76
- rake
77
- rspec
78
-
79
- BUNDLED WITH
80
- 2.2.32
data/Gemfile.4.2.pg.lock DELETED
@@ -1,80 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- edge_rider (2.3.1)
5
- activerecord (>= 3.2)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activemodel (4.2.11)
11
- activesupport (= 4.2.11)
12
- builder (~> 3.1)
13
- activerecord (4.2.11)
14
- activemodel (= 4.2.11)
15
- activesupport (= 4.2.11)
16
- arel (~> 6.0)
17
- activesupport (4.2.11)
18
- i18n (~> 0.7)
19
- minitest (~> 5.1)
20
- thread_safe (~> 0.3, >= 0.3.4)
21
- tzinfo (~> 1.1)
22
- arel (6.0.4)
23
- builder (3.2.4)
24
- byebug (10.0.2)
25
- coderay (1.1.2)
26
- concurrent-ruby (1.1.9)
27
- database_cleaner (1.5.3)
28
- db-query-matchers (0.10.0)
29
- activesupport (>= 4.0, < 7)
30
- rspec (~> 3.0)
31
- diff-lcs (1.2.5)
32
- gemika (0.6.1)
33
- has_defaults (0.4.4)
34
- activerecord
35
- i18n (0.9.5)
36
- concurrent-ruby (~> 1.0)
37
- method_source (0.9.2)
38
- minitest (5.14.4)
39
- pg (0.19.0)
40
- pry (0.12.2)
41
- coderay (~> 1.1.0)
42
- method_source (~> 0.9.0)
43
- pry-byebug (3.6.0)
44
- byebug (~> 10.0)
45
- pry (~> 0.10)
46
- rake (11.3.0)
47
- rspec (3.5.0)
48
- rspec-core (~> 3.5.0)
49
- rspec-expectations (~> 3.5.0)
50
- rspec-mocks (~> 3.5.0)
51
- rspec-core (3.5.3)
52
- rspec-support (~> 3.5.0)
53
- rspec-expectations (3.5.0)
54
- diff-lcs (>= 1.2.0, < 2.0)
55
- rspec-support (~> 3.5.0)
56
- rspec-mocks (3.5.0)
57
- diff-lcs (>= 1.2.0, < 2.0)
58
- rspec-support (~> 3.5.0)
59
- rspec-support (3.5.0)
60
- thread_safe (0.3.6)
61
- tzinfo (1.2.9)
62
- thread_safe (~> 0.1)
63
-
64
- PLATFORMS
65
- ruby
66
-
67
- DEPENDENCIES
68
- activerecord (~> 4.2.0)
69
- database_cleaner
70
- db-query-matchers
71
- edge_rider!
72
- gemika (>= 0.5.0)
73
- has_defaults
74
- pg
75
- pry-byebug
76
- rake
77
- rspec
78
-
79
- BUNDLED WITH
80
- 2.2.32
@@ -1,79 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- edge_rider (2.3.1)
5
- activerecord (>= 3.2)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activemodel (5.2.3)
11
- activesupport (= 5.2.3)
12
- activerecord (5.2.3)
13
- activemodel (= 5.2.3)
14
- activesupport (= 5.2.3)
15
- arel (>= 9.0)
16
- activesupport (5.2.3)
17
- concurrent-ruby (~> 1.0, >= 1.0.2)
18
- i18n (>= 0.7, < 2)
19
- minitest (~> 5.1)
20
- tzinfo (~> 1.1)
21
- arel (9.0.0)
22
- byebug (10.0.2)
23
- coderay (1.1.2)
24
- concurrent-ruby (1.1.5)
25
- database_cleaner (1.6.1)
26
- db-query-matchers (0.10.0)
27
- activesupport (>= 4.0, < 7)
28
- rspec (~> 3.0)
29
- diff-lcs (1.3)
30
- gemika (0.5.0)
31
- has_defaults (0.4.4)
32
- activerecord
33
- i18n (1.5.1)
34
- concurrent-ruby (~> 1.0)
35
- method_source (0.9.2)
36
- minitest (5.11.3)
37
- mysql2 (0.4.10)
38
- pry (0.12.2)
39
- coderay (~> 1.1.0)
40
- method_source (~> 0.9.0)
41
- pry-byebug (3.6.0)
42
- byebug (~> 10.0)
43
- pry (~> 0.10)
44
- rake (12.0.0)
45
- rspec (3.6.0)
46
- rspec-core (~> 3.6.0)
47
- rspec-expectations (~> 3.6.0)
48
- rspec-mocks (~> 3.6.0)
49
- rspec-core (3.6.0)
50
- rspec-support (~> 3.6.0)
51
- rspec-expectations (3.6.0)
52
- diff-lcs (>= 1.2.0, < 2.0)
53
- rspec-support (~> 3.6.0)
54
- rspec-mocks (3.6.0)
55
- diff-lcs (>= 1.2.0, < 2.0)
56
- rspec-support (~> 3.6.0)
57
- rspec-support (3.6.0)
58
- thread_safe (0.3.6)
59
- tzinfo (1.2.5)
60
- thread_safe (~> 0.1)
61
-
62
- PLATFORMS
63
- ruby
64
-
65
- DEPENDENCIES
66
- activerecord (~> 5.2.3)
67
- database_cleaner
68
- db-query-matchers
69
- edge_rider!
70
- gemika (>= 0.5.0)
71
- has_defaults
72
- i18n (<= 1.5.1)
73
- mysql2 (~> 0.4.10)
74
- pry-byebug
75
- rake
76
- rspec
77
-
78
- BUNDLED WITH
79
- 2.3.26
data/Gemfile.5.2.pg.lock DELETED
@@ -1,79 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- edge_rider (2.3.1)
5
- activerecord (>= 3.2)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activemodel (5.2.3)
11
- activesupport (= 5.2.3)
12
- activerecord (5.2.3)
13
- activemodel (= 5.2.3)
14
- activesupport (= 5.2.3)
15
- arel (>= 9.0)
16
- activesupport (5.2.3)
17
- concurrent-ruby (~> 1.0, >= 1.0.2)
18
- i18n (>= 0.7, < 2)
19
- minitest (~> 5.1)
20
- tzinfo (~> 1.1)
21
- arel (9.0.0)
22
- byebug (10.0.2)
23
- coderay (1.1.2)
24
- concurrent-ruby (1.1.5)
25
- database_cleaner (1.6.1)
26
- db-query-matchers (0.10.0)
27
- activesupport (>= 4.0, < 7)
28
- rspec (~> 3.0)
29
- diff-lcs (1.3)
30
- gemika (0.5.0)
31
- has_defaults (0.4.4)
32
- activerecord
33
- i18n (1.5.1)
34
- concurrent-ruby (~> 1.0)
35
- method_source (0.9.2)
36
- minitest (5.11.3)
37
- pg (0.20.0)
38
- pry (0.12.2)
39
- coderay (~> 1.1.0)
40
- method_source (~> 0.9.0)
41
- pry-byebug (3.6.0)
42
- byebug (~> 10.0)
43
- pry (~> 0.10)
44
- rake (12.0.0)
45
- rspec (3.6.0)
46
- rspec-core (~> 3.6.0)
47
- rspec-expectations (~> 3.6.0)
48
- rspec-mocks (~> 3.6.0)
49
- rspec-core (3.6.0)
50
- rspec-support (~> 3.6.0)
51
- rspec-expectations (3.6.0)
52
- diff-lcs (>= 1.2.0, < 2.0)
53
- rspec-support (~> 3.6.0)
54
- rspec-mocks (3.6.0)
55
- diff-lcs (>= 1.2.0, < 2.0)
56
- rspec-support (~> 3.6.0)
57
- rspec-support (3.6.0)
58
- thread_safe (0.3.6)
59
- tzinfo (1.2.5)
60
- thread_safe (~> 0.1)
61
-
62
- PLATFORMS
63
- ruby
64
-
65
- DEPENDENCIES
66
- activerecord (~> 5.2.3)
67
- database_cleaner
68
- db-query-matchers
69
- edge_rider!
70
- gemika (>= 0.5.0)
71
- has_defaults
72
- i18n (<= 1.5.1)
73
- pg
74
- pry-byebug
75
- rake
76
- rspec
77
-
78
- BUNDLED WITH
79
- 2.3.26