edge_rider 2.3.1 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32bfec9bfa5c200e32346b737cab2a2ca8022a7970592b545ea441d18fc7cb1e
4
- data.tar.gz: 27a7901e4a45da9e8c82672b4c94157a811308a85fbef9bda063c2c8854bbf3a
3
+ metadata.gz: d13d56880447746cd89944370f412e8c51b40246617ed6eb6eba5105bbd922ac
4
+ data.tar.gz: 16898ac50a495596ab83c6a14f3f147e94a2c5f467d011944d40b8c75c9f2725
5
5
  SHA512:
6
- metadata.gz: 56a14c1c14b1385eeacbea770151e82237fda1b0c80e3b774127f47dfc97ebda0886e455a60958784e6d65c07b7da52902b4f88311b376c2b7ea8b6b490e1428
7
- data.tar.gz: bbda66b48e74e0515b38b1959d1836a77aced98bdb90778d215698a3886c88828edcc7ab0463ce40ffbcfd757addf534fb3690508dfad155aac51557003a9208
6
+ metadata.gz: 8a930d0c6cfdba933994273fd399f49d16054b57c1591f76aa73d4b18fd7774591ce15084deab24ec27aa8cb865734a2b2672dcf14e1ce362d15e7bbe89115fb
7
+ data.tar.gz: 07b6e483bf2811c9443a080b572580cbd8d41bed3ab2a6f16191ea5bc4dd780f55fe96cb10503c2bb4292982f4f1f9d0cefc37675466eea7c27a5e75483992ca
@@ -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,34 @@ 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
75
- gemfile: Gemfile.6.1.pg
76
- - ruby: 2.7.4
77
- gemfile: Gemfile.5.2.pg
78
26
  - ruby: 2.7.4
79
27
  gemfile: Gemfile.6.1.pg
80
28
  - ruby: 3.2.1
81
29
  gemfile: Gemfile.6.1.pg
82
30
  - ruby: 2.7.4
83
31
  gemfile: Gemfile.7.0.pg
32
+ - ruby: 2.7.4
33
+ gemfile: Gemfile.7.1.pg
34
+ - ruby: 3.2.1
35
+ gemfile: Gemfile.7.0.pg
84
36
  - ruby: 3.2.1
37
+ gemfile: Gemfile.8.0.pg
38
+ - ruby: 3.3.6
85
39
  gemfile: Gemfile.7.0.pg
40
+ - ruby: 3.3.6
41
+ gemfile: Gemfile.7.1.pg
42
+ - ruby: 3.3.6
43
+ gemfile: Gemfile.7.2.pg
44
+ - ruby: 3.3.6
45
+ gemfile: Gemfile.8.0.pg
46
+ - ruby: 3.4.1
47
+ gemfile: Gemfile.7.1.pg
48
+ - ruby: 3.4.1
49
+ gemfile: Gemfile.7.2.pg
50
+ - ruby: 3.4.1
51
+ gemfile: Gemfile.8.0.pg
86
52
  env:
87
53
  BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
88
54
  steps:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.7
1
+ 2.7.4
data/CHANGELOG.md CHANGED
@@ -10,6 +10,18 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
10
10
  ### Compatible changes
11
11
 
12
12
 
13
+ ## 2.4.0 - 2025-01-29
14
+
15
+ ### Breaking changes
16
+
17
+ - Drop support for Rails < 6.1. This also drops support for MySQL, which had only been present for Rails < 6.
18
+
19
+ ### Compatible changes
20
+
21
+ - Add support for Rails 7.1, 7.2 and Ruby 3.3
22
+ - Add support for Rails 8.0 and Ruby 3.4
23
+
24
+
13
25
  ## 2.3.1 - 2024-10-18
14
26
 
15
27
  ### Compatible changes
data/Gemfile CHANGED
@@ -1 +1 @@
1
- Gemfile.6.1.pg
1
+ ./Gemfile.6.1.pg
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 (2.4.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -64,7 +64,7 @@ GEM
64
64
  zeitwerk (2.4.2)
65
65
 
66
66
  PLATFORMS
67
- ruby
67
+ x86_64-linux
68
68
 
69
69
  DEPENDENCIES
70
70
  activerecord (~> 6.1.3)
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 (2.4.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -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 (2.4.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
+ x86_64-linux
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.10.1'
14
14
  gem 'db-query-matchers'
15
15
 
16
16
  # Gem under test
@@ -0,0 +1,97 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ edge_rider (2.4.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 (11.1.3)
32
+ coderay (1.1.3)
33
+ concurrent-ruby (1.3.4)
34
+ connection_pool (2.4.1)
35
+ database_cleaner (2.1.0)
36
+ database_cleaner-active_record (>= 2, < 3)
37
+ database_cleaner-active_record (2.2.0)
38
+ activerecord (>= 5.a)
39
+ database_cleaner-core (~> 2.0.0)
40
+ database_cleaner-core (2.0.1)
41
+ db-query-matchers (0.14.0)
42
+ activesupport (>= 4.0, < 8.1)
43
+ rspec (>= 3.0)
44
+ diff-lcs (1.5.1)
45
+ drb (2.2.1)
46
+ gemika (0.8.3)
47
+ has_defaults (1.2.1)
48
+ activerecord
49
+ i18n (1.14.6)
50
+ concurrent-ruby (~> 1.0)
51
+ logger (1.6.1)
52
+ method_source (1.1.0)
53
+ minitest (5.25.2)
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
+ x86_64-linux
83
+
84
+ DEPENDENCIES
85
+ activerecord (~> 7.2.2)
86
+ database_cleaner
87
+ db-query-matchers
88
+ edge_rider!
89
+ gemika (>= 0.8.1)
90
+ has_defaults
91
+ pg (>= 1.3)
92
+ pry-byebug (>= 3.10.1)
93
+ rake
94
+ rspec
95
+
96
+ BUNDLED WITH
97
+ 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.10.1'
15
14
  gem 'db-query-matchers'
16
15
 
17
16
  # Gem under test
@@ -0,0 +1,98 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ edge_rider (2.4.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 (11.1.3)
33
+ coderay (1.1.3)
34
+ concurrent-ruby (1.3.5)
35
+ connection_pool (2.5.0)
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.4)
48
+ has_defaults (1.2.1)
49
+ activerecord
50
+ i18n (1.14.7)
51
+ concurrent-ruby (~> 1.0)
52
+ logger (1.6.5)
53
+ method_source (1.1.0)
54
+ minitest (5.25.4)
55
+ pg (1.5.9)
56
+ pry (0.14.2)
57
+ coderay (~> 1.1)
58
+ method_source (~> 1.0)
59
+ pry-byebug (3.10.1)
60
+ byebug (~> 11.0)
61
+ pry (>= 0.13, < 0.15)
62
+ rake (13.2.1)
63
+ rspec (3.13.0)
64
+ rspec-core (~> 3.13.0)
65
+ rspec-expectations (~> 3.13.0)
66
+ rspec-mocks (~> 3.13.0)
67
+ rspec-core (3.13.2)
68
+ rspec-support (~> 3.13.0)
69
+ rspec-expectations (3.13.3)
70
+ diff-lcs (>= 1.2.0, < 2.0)
71
+ rspec-support (~> 3.13.0)
72
+ rspec-mocks (3.13.2)
73
+ diff-lcs (>= 1.2.0, < 2.0)
74
+ rspec-support (~> 3.13.0)
75
+ rspec-support (3.13.2)
76
+ securerandom (0.4.1)
77
+ timeout (0.4.3)
78
+ tzinfo (2.0.6)
79
+ concurrent-ruby (~> 1.0)
80
+ uri (1.0.2)
81
+
82
+ PLATFORMS
83
+ x86_64-linux
84
+
85
+ DEPENDENCIES
86
+ activerecord (~> 8.0.0)
87
+ database_cleaner
88
+ db-query-matchers
89
+ edge_rider!
90
+ gemika (>= 0.8.1)
91
+ has_defaults
92
+ pg (>= 1.3)
93
+ pry-byebug (>= 3.10.1)
94
+ rake
95
+ rspec
96
+
97
+ BUNDLED WITH
98
+ 2.4.7
data/Gemfile.lock CHANGED
@@ -1 +1 @@
1
- Gemfile.6.1.pg.lock
1
+ ./Gemfile.6.1.pg.lock
@@ -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 = '2.4.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
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: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-18 00:00:00.000000000 Z
11
+ date: 2025-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -37,18 +37,16 @@ files:
37
37
  - ".ruby-version"
38
38
  - CHANGELOG.md
39
39
  - 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
40
  - Gemfile.6.1.pg
49
41
  - Gemfile.6.1.pg.lock
50
42
  - Gemfile.7.0.pg
51
43
  - Gemfile.7.0.pg.lock
44
+ - Gemfile.7.1.pg
45
+ - Gemfile.7.1.pg.lock
46
+ - Gemfile.7.2.pg
47
+ - Gemfile.7.2.pg.lock
48
+ - Gemfile.8.0.pg
49
+ - Gemfile.8.0.pg.lock
52
50
  - Gemfile.lock
53
51
  - LICENSE
54
52
  - README.md
@@ -85,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
83
  - !ruby/object:Gem::Version
86
84
  version: '0'
87
85
  requirements: []
88
- rubygems_version: 3.2.32
86
+ rubygems_version: 3.1.6
89
87
  signing_key:
90
88
  specification_version: 4
91
89
  summary: Power tools for ActiveRecord relations (scopes)
@@ -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
data/Gemfile.5.2.mysql2 DELETED
@@ -1,18 +0,0 @@
1
- source 'https://rubygems.org'
2
-
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
7
-
8
- # Development dependencies
9
- gem 'rake'
10
- gem 'database_cleaner'
11
- gem 'rspec'
12
- gem 'has_defaults' # used by test models
13
- gem 'gemika', '>=0.5.0'
14
- gem 'pry-byebug'
15
- gem 'db-query-matchers'
16
-
17
- # Gem under test
18
- gem 'edge_rider', path: '.'
@@ -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