mobility 1.2.7 → 1.2.8
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +48 -25
- data/README.md +1 -1
- data/lib/mobility/plugins/active_model/dirty.rb +7 -1
- data/lib/mobility/plugins/backend.rb +13 -7
- data/lib/mobility/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17bc48ee3eb32c8a9590bd2272a584cd2c6419464acd55466513e0d2e3c296f2
|
4
|
+
data.tar.gz: e29dbc1fb5276e466e3da8d8d88bf0ac6c993589dcb69603ac90881b33296b0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b938078ab08169631d98f8437109f391ab6ea942813652be76f30b94d986753aa0c0fb826b1e3e738372dc874273d944a2082afe97a4799a8648e39002d340f3
|
7
|
+
data.tar.gz: 99c18855141b073b7530eae978c7873727d40ef4e6eb22d7f5c84a0c4880e20f1586f3293776cde460794cc37ff88710a6b612b5a3552a4f6ee39abca074e347
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
## 1.2
|
4
4
|
|
5
|
+
### 1.2.8
|
6
|
+
- Fix issues with subclassing, such as when using AR STI,
|
7
|
+
fixes [#566](https://github.com/shioyama/mobility/issues/566)
|
8
|
+
([#568](https://github.com/shioyama/mobility/pull/568))
|
9
|
+
- Handle attribute_method_matchers rename (part of #560)
|
10
|
+
|
5
11
|
### 1.2.7
|
6
12
|
- Do not query same attribute more than once, fixes
|
7
13
|
[#564](https://github.com/shioyama/mobility/pull/578)
|
data/Gemfile.lock
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
GIT
|
2
|
+
remote: https://github.com/rails/rails.git
|
3
|
+
revision: ed3130a41d7728b2e650c1b9093545e0d06af489
|
4
|
+
branch: main
|
5
|
+
specs:
|
6
|
+
activemodel (7.1.0.alpha)
|
7
|
+
activesupport (= 7.1.0.alpha)
|
8
|
+
activerecord (7.1.0.alpha)
|
9
|
+
activemodel (= 7.1.0.alpha)
|
10
|
+
activesupport (= 7.1.0.alpha)
|
11
|
+
activesupport (7.1.0.alpha)
|
12
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
+
connection_pool (>= 2.2.5)
|
14
|
+
i18n (>= 1.6, < 2)
|
15
|
+
minitest (>= 5.1)
|
16
|
+
tzinfo (~> 2.0)
|
17
|
+
|
1
18
|
PATH
|
2
19
|
remote: .
|
3
20
|
specs:
|
@@ -8,14 +25,15 @@ PATH
|
|
8
25
|
GEM
|
9
26
|
remote: https://rubygems.org/
|
10
27
|
specs:
|
11
|
-
benchmark-ips (2.
|
28
|
+
benchmark-ips (2.10.0)
|
12
29
|
byebug (11.1.3)
|
13
30
|
coderay (1.1.3)
|
14
|
-
concurrent-ruby (1.1.
|
31
|
+
concurrent-ruby (1.1.10)
|
32
|
+
connection_pool (2.2.5)
|
15
33
|
database_cleaner (1.99.0)
|
16
|
-
diff-lcs (1.
|
17
|
-
ffi (1.15.
|
18
|
-
formatador (
|
34
|
+
diff-lcs (1.5.0)
|
35
|
+
ffi (1.15.5)
|
36
|
+
formatador (1.1.0)
|
19
37
|
guard (2.18.0)
|
20
38
|
formatador (>= 0.2.4)
|
21
39
|
listen (>= 2.7, < 4.0)
|
@@ -30,13 +48,14 @@ GEM
|
|
30
48
|
guard (~> 2.1)
|
31
49
|
guard-compat (~> 1.1)
|
32
50
|
rspec (>= 2.99.0, < 4.0)
|
33
|
-
i18n (1.
|
51
|
+
i18n (1.10.0)
|
34
52
|
concurrent-ruby (~> 1.0)
|
35
|
-
listen (3.7.
|
53
|
+
listen (3.7.1)
|
36
54
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
37
55
|
rb-inotify (~> 0.9, >= 0.9.10)
|
38
56
|
lumberjack (1.2.8)
|
39
57
|
method_source (1.0.0)
|
58
|
+
minitest (5.16.0)
|
40
59
|
nenv (0.3.0)
|
41
60
|
notiffany (0.1.3)
|
42
61
|
nenv (~> 0.1)
|
@@ -48,35 +67,40 @@ GEM
|
|
48
67
|
pry-byebug (3.9.0)
|
49
68
|
byebug (~> 11.0)
|
50
69
|
pry (~> 0.13.0)
|
51
|
-
rack (2.2.3)
|
70
|
+
rack (2.2.3.1)
|
52
71
|
rake (12.3.3)
|
53
|
-
rb-fsevent (0.11.
|
72
|
+
rb-fsevent (0.11.1)
|
54
73
|
rb-inotify (0.10.1)
|
55
74
|
ffi (~> 1.0)
|
56
|
-
request_store (1.5.
|
75
|
+
request_store (1.5.1)
|
57
76
|
rack (>= 1.4)
|
58
|
-
rspec (3.
|
59
|
-
rspec-core (~> 3.
|
60
|
-
rspec-expectations (~> 3.
|
61
|
-
rspec-mocks (~> 3.
|
62
|
-
rspec-core (3.
|
63
|
-
rspec-support (~> 3.
|
64
|
-
rspec-expectations (3.
|
77
|
+
rspec (3.11.0)
|
78
|
+
rspec-core (~> 3.11.0)
|
79
|
+
rspec-expectations (~> 3.11.0)
|
80
|
+
rspec-mocks (~> 3.11.0)
|
81
|
+
rspec-core (3.11.0)
|
82
|
+
rspec-support (~> 3.11.0)
|
83
|
+
rspec-expectations (3.11.0)
|
65
84
|
diff-lcs (>= 1.2.0, < 2.0)
|
66
|
-
rspec-support (~> 3.
|
67
|
-
rspec-mocks (3.
|
85
|
+
rspec-support (~> 3.11.0)
|
86
|
+
rspec-mocks (3.11.1)
|
68
87
|
diff-lcs (>= 1.2.0, < 2.0)
|
69
|
-
rspec-support (~> 3.
|
70
|
-
rspec-support (3.
|
71
|
-
sequel (5.57.0)
|
88
|
+
rspec-support (~> 3.11.0)
|
89
|
+
rspec-support (3.11.0)
|
72
90
|
shellany (0.0.1)
|
73
|
-
thor (1.1
|
74
|
-
|
91
|
+
thor (1.2.1)
|
92
|
+
tzinfo (2.0.4)
|
93
|
+
concurrent-ruby (~> 1.0)
|
94
|
+
webrick (1.7.0)
|
95
|
+
yard (0.9.28)
|
96
|
+
webrick (~> 1.7.0)
|
75
97
|
|
76
98
|
PLATFORMS
|
77
99
|
ruby
|
78
100
|
|
79
101
|
DEPENDENCIES
|
102
|
+
activerecord!
|
103
|
+
activesupport!
|
80
104
|
benchmark-ips
|
81
105
|
database_cleaner (~> 1.5, >= 1.5.3)
|
82
106
|
guard-rspec
|
@@ -85,7 +109,6 @@ DEPENDENCIES
|
|
85
109
|
pry-byebug
|
86
110
|
rake (~> 12, >= 12.2.1)
|
87
111
|
rspec (~> 3.0)
|
88
|
-
sequel (~> 5.0)
|
89
112
|
yard (~> 0.9.0)
|
90
113
|
|
91
114
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -153,7 +153,13 @@ the ActiveRecord dirty plugin for more information.
|
|
153
153
|
# suffixes is simplest given they change from Rails version to version.
|
154
154
|
def patterns
|
155
155
|
@patterns ||=
|
156
|
-
|
156
|
+
begin
|
157
|
+
# Method name changes in Rails 7.1
|
158
|
+
attribute_method_patterns = klass.respond_to?(:attribute_method_patterns) ?
|
159
|
+
klass.attribute_method_patterns :
|
160
|
+
klass.attribute_method_matchers
|
161
|
+
attribute_method_patterns.map { |p| "#{p.prefix}%s#{p.suffix}" } - excluded_patterns
|
162
|
+
end
|
157
163
|
end
|
158
164
|
|
159
165
|
private
|
@@ -159,16 +159,22 @@ Defines:
|
|
159
159
|
raise KeyError, "No backend for: #{name}"
|
160
160
|
end
|
161
161
|
|
162
|
-
def inherited(klass)
|
163
|
-
parent_classes = mobility_backend_classes.freeze # ensure backend classes are not modified after being inherited
|
164
|
-
klass.class_eval { @mobility_backend_classes = parent_classes.dup }
|
165
|
-
super
|
166
|
-
end
|
167
|
-
|
168
162
|
protected
|
169
163
|
|
170
164
|
def mobility_backend_classes
|
171
|
-
@mobility_backend_classes
|
165
|
+
if @mobility_backend_classes
|
166
|
+
@mobility_backend_classes
|
167
|
+
else
|
168
|
+
@mobility_backend_classes = {}
|
169
|
+
parent_class = self.superclass
|
170
|
+
while parent_class&.respond_to?(:mobility_backend_classes, true)
|
171
|
+
# ensure backend classes are not modified after being inherited
|
172
|
+
parent_class_classes = parent_class.mobility_backend_classes.freeze
|
173
|
+
@mobility_backend_classes.merge!(parent_class_classes)
|
174
|
+
parent_class = parent_class.superclass
|
175
|
+
end
|
176
|
+
@mobility_backend_classes
|
177
|
+
end
|
172
178
|
end
|
173
179
|
end
|
174
180
|
|
data/lib/mobility/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|