activerecord-delegation-expected_behaviour 1.4.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/activerecord-delegation-expected_behaviour.rb +1 -1
- metadata +22 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a10e9cf97818c47c083b7d0899cd4f073404d341532ca6fc164805b5ef5102a9
|
4
|
+
data.tar.gz: 4ffc7bd7a3fddde5c2d29cb57d819de8962ae15b53a8addae3f997bedd04307d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 821205ab4a607897d5e68ee2b0446e0f7221af9230e5ca998c3a907aed8e555a6e98d5e5ca44eb79e1ae02503f483d552f29a90fb4ee1d4d6b760a8f6998a15c
|
7
|
+
data.tar.gz: b2a29c6acdcbbcf3c1baf97427d94c61dcb1efad919ace9e8f85a356c7a81775bc5a6c3f85902758ccb63e240dfc51683a31154631677a21994425a14571c620
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Prefer some class methods over methods from Enumerable on ActiveRecord relations
|
|
7
7
|
In Rails 5 you can no longer call some ActiveRecord class methods named
|
8
8
|
like their Enumerable counterparts:
|
9
9
|
|
10
|
-
```:encode_with, :to_ary, :join, :[], :&, :|, :+, :-, :sample, :reverse, :compact, :in_groups, :in_groups_of, :to_sentence, :to_formatted_s, :shuffle, :split, :index```
|
10
|
+
```:encode_with, :to_ary, :join, :[], :&, :|, :+, :-, :sample, :reverse, :compact, :in_groups, :in_groups_of, :to_sentence, :to_formatted_s, :shuffle, :split, :index, :excluding```
|
11
11
|
|
12
12
|
This gem reinstates the expected behaviour, where you can always
|
13
13
|
get the method from Enumerable by calling to_a on the relation,
|
@@ -3,7 +3,7 @@ require 'active_record'
|
|
3
3
|
ActiveRecord::Delegation.module_eval do
|
4
4
|
REDELEGATED_METHODS = [:encode_with, :to_ary, :join, :[], :&, :|, :+, :-, :sample,
|
5
5
|
:reverse, :compact, :in_groups, :in_groups_of, :to_sentence, :to_formatted_s,
|
6
|
-
:shuffle, :split, :index]
|
6
|
+
:shuffle, :split, :index, :excluding]
|
7
7
|
|
8
8
|
REDELEGATED_METHODS.each do |method|
|
9
9
|
if method =~ /[^\]]=$/
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-delegation-expected_behaviour
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthias Grosser
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 7.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 7.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: minitest
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: sqlite3
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,8 +108,8 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
description:
|
112
|
-
like their Enumerable counterparts. This gem reinstates the expected behaviour,
|
111
|
+
description: Since Rails 5 you can no longer call some ActiveRecord class methods
|
112
|
+
named like their Enumerable counterparts. This gem reinstates the expected behaviour,
|
113
113
|
where you can always get the method from Enumerable by calling to_a on the relation.
|
114
114
|
email:
|
115
115
|
- mtgrosser@gmx.net
|
@@ -124,7 +124,7 @@ homepage: https://github.com/mtgrosser/activerecord-delegation-expected_behaviou
|
|
124
124
|
licenses:
|
125
125
|
- MIT
|
126
126
|
metadata: {}
|
127
|
-
post_install_message:
|
127
|
+
post_install_message:
|
128
128
|
rdoc_options: []
|
129
129
|
require_paths:
|
130
130
|
- lib
|
@@ -139,8 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
|
-
rubygems_version: 3.
|
143
|
-
signing_key:
|
142
|
+
rubygems_version: 3.3.26
|
143
|
+
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Prefer some class methods over methods from Enumerable on relations
|
146
146
|
test_files: []
|