relation 0.4.5 → 0.5.1
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
- data/.github/workflows/rake.yml +3 -2
- data/.gitignore +5 -5
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Appraisals +8 -4
- data/Gemfile +2 -2
- data/Gemfile.lock +119 -179
- data/MIT-LICENSE +1 -1
- data/README.md +11 -6
- data/app/models/relation.rb +2 -1
- data/app/models/relation_ext.rb +2 -1
- data/gemfiles/rails_7.2.gemfile +2 -2
- data/gemfiles/{rails_7.1.gemfile → rails_8.0.gemfile} +2 -2
- data/lib/relation/version.rb +3 -1
- data/relation.gemspec +1 -0
- metadata +6 -9
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a75f137bcb290c805c1c881d7e5f40814afb0230498ca3872bd62a6e7b062408
|
|
4
|
+
data.tar.gz: 4d84ff636a489c20e7131931241dd4482d49e09f307995c47606a7697af80385
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9353cfa6ca88640740c5cbcaf90f09d8a232303947146b93b07ed8f69ed6ba83dc1d0ea690389303d8e99b0b95b5dd807b767da87e2c256a1766e5f061bd907c
|
|
7
|
+
data.tar.gz: 1a6a70bce387b2ebd866d6db7d53f106bf638340040247631d228350269535916b13d01cefae687c20df2bdb9964a8f6671ed6819dddc2708f48f1506bbc1e65
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -8,11 +8,12 @@ jobs:
|
|
|
8
8
|
strategy:
|
|
9
9
|
fail-fast: false
|
|
10
10
|
matrix:
|
|
11
|
-
ruby_version: ["3.
|
|
11
|
+
# ruby_version: [head, "3.4", "3.2"]
|
|
12
|
+
ruby_version: ["3.4", "3.2"]
|
|
12
13
|
gemfile:
|
|
13
14
|
- Gemfile
|
|
15
|
+
- gemfiles/Gemfile.rails-8.0
|
|
14
16
|
- gemfiles/Gemfile.rails-7.2
|
|
15
|
-
- gemfiles/Gemfile.rails-7.1
|
|
16
17
|
runs-on: ubuntu-latest
|
|
17
18
|
|
|
18
19
|
steps:
|
data/.gitignore
CHANGED
data/.ruby-gemset
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
../.ruby-gemset
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
../.ruby-version
|
data/Appraisals
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
appraise "rails-
|
|
2
|
-
gem "
|
|
1
|
+
appraise "rails-8.0" do
|
|
2
|
+
gem "activerecord", "~> 8.0"
|
|
3
3
|
end
|
|
4
4
|
|
|
5
|
-
appraise "rails-7.
|
|
6
|
-
gem "
|
|
5
|
+
appraise "rails-7.2" do
|
|
6
|
+
gem "activerecord", "~> 7.2"
|
|
7
7
|
end
|
|
8
8
|
|
|
9
|
+
# appraise "rails-7.1" do
|
|
10
|
+
# gem "rails", "~> 7.1"
|
|
11
|
+
# end
|
|
12
|
+
#
|
|
9
13
|
# appraise "rails-7.0" do
|
|
10
14
|
# gem "rails", "~> 7.0"
|
|
11
15
|
# gem "dryer-config", "~> 7.0"
|
data/Gemfile
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
source "https://rubygems.org"
|
|
2
2
|
gemspec
|
|
3
3
|
|
|
4
|
-
gem "
|
|
4
|
+
gem "activerecord"
|
|
5
5
|
|
|
6
6
|
group :test do
|
|
7
7
|
gem "cuco"
|
|
8
8
|
gem "minitest-spec-rails"
|
|
9
|
-
gem "ricecream"
|
|
9
|
+
gem "ricecream", require: false
|
|
10
10
|
gem "simplecov", require: false
|
|
11
11
|
gem "sqlite3"
|
|
12
12
|
gem "standard", require: false
|
data/Gemfile.lock
CHANGED
|
@@ -1,300 +1,240 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
relation (0.
|
|
4
|
+
relation (0.5.1)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
activesupport (=
|
|
12
|
-
nio4r (~> 2.0)
|
|
13
|
-
websocket-driver (>= 0.6.1)
|
|
14
|
-
zeitwerk (~> 2.6)
|
|
15
|
-
actionmailbox (7.2.1.1)
|
|
16
|
-
actionpack (= 7.2.1.1)
|
|
17
|
-
activejob (= 7.2.1.1)
|
|
18
|
-
activerecord (= 7.2.1.1)
|
|
19
|
-
activestorage (= 7.2.1.1)
|
|
20
|
-
activesupport (= 7.2.1.1)
|
|
21
|
-
mail (>= 2.8.0)
|
|
22
|
-
actionmailer (7.2.1.1)
|
|
23
|
-
actionpack (= 7.2.1.1)
|
|
24
|
-
actionview (= 7.2.1.1)
|
|
25
|
-
activejob (= 7.2.1.1)
|
|
26
|
-
activesupport (= 7.2.1.1)
|
|
27
|
-
mail (>= 2.8.0)
|
|
28
|
-
rails-dom-testing (~> 2.2)
|
|
29
|
-
actionpack (7.2.1.1)
|
|
30
|
-
actionview (= 7.2.1.1)
|
|
31
|
-
activesupport (= 7.2.1.1)
|
|
9
|
+
actionpack (8.1.1)
|
|
10
|
+
actionview (= 8.1.1)
|
|
11
|
+
activesupport (= 8.1.1)
|
|
32
12
|
nokogiri (>= 1.8.5)
|
|
33
|
-
|
|
34
|
-
rack (>= 2.2.4, < 3.2)
|
|
13
|
+
rack (>= 2.2.4)
|
|
35
14
|
rack-session (>= 1.0.1)
|
|
36
15
|
rack-test (>= 0.6.3)
|
|
37
16
|
rails-dom-testing (~> 2.2)
|
|
38
17
|
rails-html-sanitizer (~> 1.6)
|
|
39
18
|
useragent (~> 0.16)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
activerecord (= 7.2.1.1)
|
|
43
|
-
activestorage (= 7.2.1.1)
|
|
44
|
-
activesupport (= 7.2.1.1)
|
|
45
|
-
globalid (>= 0.6.0)
|
|
46
|
-
nokogiri (>= 1.8.5)
|
|
47
|
-
actionview (7.2.1.1)
|
|
48
|
-
activesupport (= 7.2.1.1)
|
|
19
|
+
actionview (8.1.1)
|
|
20
|
+
activesupport (= 8.1.1)
|
|
49
21
|
builder (~> 3.1)
|
|
50
22
|
erubi (~> 1.11)
|
|
51
23
|
rails-dom-testing (~> 2.2)
|
|
52
24
|
rails-html-sanitizer (~> 1.6)
|
|
53
|
-
|
|
54
|
-
activesupport (=
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
activesupport (=
|
|
58
|
-
activerecord (7.2.1.1)
|
|
59
|
-
activemodel (= 7.2.1.1)
|
|
60
|
-
activesupport (= 7.2.1.1)
|
|
25
|
+
activemodel (8.1.1)
|
|
26
|
+
activesupport (= 8.1.1)
|
|
27
|
+
activerecord (8.1.1)
|
|
28
|
+
activemodel (= 8.1.1)
|
|
29
|
+
activesupport (= 8.1.1)
|
|
61
30
|
timeout (>= 0.4.0)
|
|
62
|
-
|
|
63
|
-
actionpack (= 7.2.1.1)
|
|
64
|
-
activejob (= 7.2.1.1)
|
|
65
|
-
activerecord (= 7.2.1.1)
|
|
66
|
-
activesupport (= 7.2.1.1)
|
|
67
|
-
marcel (~> 1.0)
|
|
68
|
-
activesupport (7.2.1.1)
|
|
31
|
+
activesupport (8.1.1)
|
|
69
32
|
base64
|
|
70
33
|
bigdecimal
|
|
71
34
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
72
35
|
connection_pool (>= 2.2.5)
|
|
73
36
|
drb
|
|
74
37
|
i18n (>= 1.6, < 2)
|
|
38
|
+
json
|
|
75
39
|
logger (>= 1.4.2)
|
|
76
40
|
minitest (>= 5.1)
|
|
77
41
|
securerandom (>= 0.3)
|
|
78
42
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
43
|
+
uri (>= 0.13.1)
|
|
79
44
|
appraisal (2.5.0)
|
|
80
45
|
bundler
|
|
81
46
|
rake
|
|
82
47
|
thor (>= 0.14.0)
|
|
83
|
-
ast (2.4.
|
|
84
|
-
base64 (0.
|
|
85
|
-
bigdecimal (3.1
|
|
48
|
+
ast (2.4.3)
|
|
49
|
+
base64 (0.3.0)
|
|
50
|
+
bigdecimal (3.3.1)
|
|
86
51
|
builder (3.3.0)
|
|
87
52
|
combustion (1.5.0)
|
|
88
53
|
activesupport (>= 3.0.0)
|
|
89
54
|
railties (>= 3.0.0)
|
|
90
55
|
thor (>= 0.14.6)
|
|
91
|
-
concurrent-ruby (1.3.
|
|
92
|
-
connection_pool (2.4
|
|
56
|
+
concurrent-ruby (1.3.5)
|
|
57
|
+
connection_pool (2.5.4)
|
|
93
58
|
crass (1.0.6)
|
|
94
|
-
cuco (0.1.
|
|
59
|
+
cuco (0.1.4)
|
|
95
60
|
listen
|
|
96
61
|
micro-optparse
|
|
97
|
-
date (3.
|
|
62
|
+
date (3.5.0)
|
|
98
63
|
docile (1.4.1)
|
|
99
|
-
drb (2.2.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
ffi (1.17.
|
|
103
|
-
ffi (1.17.
|
|
104
|
-
ffi (1.17.
|
|
105
|
-
ffi (1.17.
|
|
106
|
-
ffi (1.17.
|
|
107
|
-
ffi (1.17.
|
|
108
|
-
ffi (1.17.
|
|
109
|
-
ffi (1.17.
|
|
110
|
-
|
|
111
|
-
globalid (1.2.1)
|
|
112
|
-
activesupport (>= 6.1)
|
|
113
|
-
i18n (1.14.6)
|
|
64
|
+
drb (2.2.3)
|
|
65
|
+
erb (5.1.3)
|
|
66
|
+
erubi (1.13.1)
|
|
67
|
+
ffi (1.17.2-aarch64-linux-gnu)
|
|
68
|
+
ffi (1.17.2-aarch64-linux-musl)
|
|
69
|
+
ffi (1.17.2-arm-linux-gnu)
|
|
70
|
+
ffi (1.17.2-arm-linux-musl)
|
|
71
|
+
ffi (1.17.2-arm64-darwin)
|
|
72
|
+
ffi (1.17.2-x86_64-darwin)
|
|
73
|
+
ffi (1.17.2-x86_64-linux-gnu)
|
|
74
|
+
ffi (1.17.2-x86_64-linux-musl)
|
|
75
|
+
i18n (1.14.7)
|
|
114
76
|
concurrent-ruby (~> 1.0)
|
|
115
|
-
io-console (0.
|
|
116
|
-
irb (1.
|
|
77
|
+
io-console (0.8.1)
|
|
78
|
+
irb (1.15.2)
|
|
79
|
+
pp (>= 0.6.0)
|
|
117
80
|
rdoc (>= 4.0.0)
|
|
118
81
|
reline (>= 0.4.2)
|
|
119
|
-
json (2.
|
|
120
|
-
language_server-protocol (3.17.0.
|
|
82
|
+
json (2.15.2)
|
|
83
|
+
language_server-protocol (3.17.0.5)
|
|
121
84
|
lint_roller (1.1.0)
|
|
122
85
|
listen (3.9.0)
|
|
123
86
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
124
87
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
125
|
-
logger (1.
|
|
126
|
-
loofah (2.
|
|
88
|
+
logger (1.7.0)
|
|
89
|
+
loofah (2.24.1)
|
|
127
90
|
crass (~> 1.0.2)
|
|
128
91
|
nokogiri (>= 1.12.0)
|
|
129
|
-
mail (2.8.1)
|
|
130
|
-
mini_mime (>= 0.1.1)
|
|
131
|
-
net-imap
|
|
132
|
-
net-pop
|
|
133
|
-
net-smtp
|
|
134
|
-
marcel (1.0.4)
|
|
135
92
|
micro-optparse (1.2.1)
|
|
136
|
-
|
|
137
|
-
minitest (
|
|
138
|
-
minitest-spec-rails (7.3.0)
|
|
93
|
+
minitest (5.26.0)
|
|
94
|
+
minitest-spec-rails (7.4.1)
|
|
139
95
|
minitest (>= 5.0)
|
|
140
96
|
railties (>= 4.1)
|
|
141
|
-
|
|
142
|
-
date
|
|
143
|
-
net-protocol
|
|
144
|
-
net-pop (0.1.2)
|
|
145
|
-
net-protocol
|
|
146
|
-
net-protocol (0.2.2)
|
|
147
|
-
timeout
|
|
148
|
-
net-smtp (0.5.0)
|
|
149
|
-
net-protocol
|
|
150
|
-
nio4r (2.7.3)
|
|
151
|
-
nokogiri (1.16.7-aarch64-linux)
|
|
97
|
+
nokogiri (1.18.10-aarch64-linux-gnu)
|
|
152
98
|
racc (~> 1.4)
|
|
153
|
-
nokogiri (1.
|
|
99
|
+
nokogiri (1.18.10-aarch64-linux-musl)
|
|
154
100
|
racc (~> 1.4)
|
|
155
|
-
nokogiri (1.
|
|
101
|
+
nokogiri (1.18.10-arm-linux-gnu)
|
|
156
102
|
racc (~> 1.4)
|
|
157
|
-
nokogiri (1.
|
|
103
|
+
nokogiri (1.18.10-arm-linux-musl)
|
|
158
104
|
racc (~> 1.4)
|
|
159
|
-
nokogiri (1.
|
|
105
|
+
nokogiri (1.18.10-arm64-darwin)
|
|
160
106
|
racc (~> 1.4)
|
|
161
|
-
nokogiri (1.
|
|
107
|
+
nokogiri (1.18.10-x86_64-darwin)
|
|
162
108
|
racc (~> 1.4)
|
|
163
|
-
|
|
164
|
-
|
|
109
|
+
nokogiri (1.18.10-x86_64-linux-gnu)
|
|
110
|
+
racc (~> 1.4)
|
|
111
|
+
nokogiri (1.18.10-x86_64-linux-musl)
|
|
112
|
+
racc (~> 1.4)
|
|
113
|
+
parallel (1.27.0)
|
|
114
|
+
parser (3.3.10.0)
|
|
165
115
|
ast (~> 2.4.1)
|
|
166
116
|
racc
|
|
167
|
-
|
|
117
|
+
pp (0.6.3)
|
|
118
|
+
prettyprint
|
|
119
|
+
prettyprint (0.2.0)
|
|
120
|
+
prism (1.6.0)
|
|
121
|
+
psych (5.2.6)
|
|
122
|
+
date
|
|
168
123
|
stringio
|
|
169
124
|
racc (1.8.1)
|
|
170
|
-
rack (3.
|
|
171
|
-
rack-session (2.
|
|
125
|
+
rack (3.2.3)
|
|
126
|
+
rack-session (2.1.1)
|
|
127
|
+
base64 (>= 0.1.0)
|
|
172
128
|
rack (>= 3.0.0)
|
|
173
|
-
rack-test (2.
|
|
129
|
+
rack-test (2.2.0)
|
|
174
130
|
rack (>= 1.3)
|
|
175
|
-
rackup (2.1
|
|
131
|
+
rackup (2.2.1)
|
|
176
132
|
rack (>= 3)
|
|
177
|
-
|
|
178
|
-
rails (7.2.1.1)
|
|
179
|
-
actioncable (= 7.2.1.1)
|
|
180
|
-
actionmailbox (= 7.2.1.1)
|
|
181
|
-
actionmailer (= 7.2.1.1)
|
|
182
|
-
actionpack (= 7.2.1.1)
|
|
183
|
-
actiontext (= 7.2.1.1)
|
|
184
|
-
actionview (= 7.2.1.1)
|
|
185
|
-
activejob (= 7.2.1.1)
|
|
186
|
-
activemodel (= 7.2.1.1)
|
|
187
|
-
activerecord (= 7.2.1.1)
|
|
188
|
-
activestorage (= 7.2.1.1)
|
|
189
|
-
activesupport (= 7.2.1.1)
|
|
190
|
-
bundler (>= 1.15.0)
|
|
191
|
-
railties (= 7.2.1.1)
|
|
192
|
-
rails-dom-testing (2.2.0)
|
|
133
|
+
rails-dom-testing (2.3.0)
|
|
193
134
|
activesupport (>= 5.0.0)
|
|
194
135
|
minitest
|
|
195
136
|
nokogiri (>= 1.6)
|
|
196
|
-
rails-html-sanitizer (1.6.
|
|
137
|
+
rails-html-sanitizer (1.6.2)
|
|
197
138
|
loofah (~> 2.21)
|
|
198
|
-
nokogiri (
|
|
199
|
-
railties (
|
|
200
|
-
actionpack (=
|
|
201
|
-
activesupport (=
|
|
139
|
+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
|
140
|
+
railties (8.1.1)
|
|
141
|
+
actionpack (= 8.1.1)
|
|
142
|
+
activesupport (= 8.1.1)
|
|
202
143
|
irb (~> 1.13)
|
|
203
144
|
rackup (>= 1.0.0)
|
|
204
145
|
rake (>= 12.2)
|
|
205
146
|
thor (~> 1.0, >= 1.2.2)
|
|
147
|
+
tsort (>= 0.2)
|
|
206
148
|
zeitwerk (~> 2.6)
|
|
207
149
|
rainbow (3.1.1)
|
|
208
|
-
rake (13.
|
|
150
|
+
rake (13.3.1)
|
|
209
151
|
rb-fsevent (0.11.2)
|
|
210
152
|
rb-inotify (0.11.1)
|
|
211
153
|
ffi (~> 1.0)
|
|
212
|
-
rdoc (6.
|
|
154
|
+
rdoc (6.15.0)
|
|
155
|
+
erb
|
|
213
156
|
psych (>= 4.0.0)
|
|
214
|
-
|
|
215
|
-
|
|
157
|
+
tsort
|
|
158
|
+
regexp_parser (2.11.3)
|
|
159
|
+
reline (0.6.2)
|
|
216
160
|
io-console (~> 0.5)
|
|
217
161
|
ricecream (0.2.1)
|
|
218
|
-
rubocop (1.
|
|
162
|
+
rubocop (1.80.2)
|
|
219
163
|
json (~> 2.3)
|
|
220
|
-
language_server-protocol (
|
|
164
|
+
language_server-protocol (~> 3.17.0.2)
|
|
165
|
+
lint_roller (~> 1.1.0)
|
|
221
166
|
parallel (~> 1.10)
|
|
222
167
|
parser (>= 3.3.0.2)
|
|
223
168
|
rainbow (>= 2.2.2, < 4.0)
|
|
224
|
-
regexp_parser (>= 2.
|
|
225
|
-
rubocop-ast (>= 1.
|
|
169
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
170
|
+
rubocop-ast (>= 1.46.0, < 2.0)
|
|
226
171
|
ruby-progressbar (~> 1.7)
|
|
227
|
-
unicode-display_width (>= 2.4.0, <
|
|
228
|
-
rubocop-ast (1.
|
|
229
|
-
parser (>= 3.3.
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
172
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
173
|
+
rubocop-ast (1.47.1)
|
|
174
|
+
parser (>= 3.3.7.2)
|
|
175
|
+
prism (~> 1.4)
|
|
176
|
+
rubocop-performance (1.25.0)
|
|
177
|
+
lint_roller (~> 1.1)
|
|
178
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
179
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
|
233
180
|
ruby-progressbar (1.13.0)
|
|
234
|
-
securerandom (0.
|
|
181
|
+
securerandom (0.4.1)
|
|
235
182
|
simplecov (0.22.0)
|
|
236
183
|
docile (~> 1.1)
|
|
237
184
|
simplecov-html (~> 0.11)
|
|
238
185
|
simplecov_json_formatter (~> 0.1)
|
|
239
|
-
simplecov-html (0.13.
|
|
186
|
+
simplecov-html (0.13.2)
|
|
240
187
|
simplecov_json_formatter (0.1.4)
|
|
241
|
-
sqlite3 (2.
|
|
242
|
-
sqlite3 (2.
|
|
243
|
-
sqlite3 (2.
|
|
244
|
-
sqlite3 (2.
|
|
245
|
-
sqlite3 (2.
|
|
246
|
-
sqlite3 (2.
|
|
247
|
-
sqlite3 (2.
|
|
248
|
-
sqlite3 (2.
|
|
249
|
-
|
|
250
|
-
sqlite3 (2.1.0-x86_64-linux-musl)
|
|
251
|
-
standard (1.41.1)
|
|
188
|
+
sqlite3 (2.7.4-aarch64-linux-gnu)
|
|
189
|
+
sqlite3 (2.7.4-aarch64-linux-musl)
|
|
190
|
+
sqlite3 (2.7.4-arm-linux-gnu)
|
|
191
|
+
sqlite3 (2.7.4-arm-linux-musl)
|
|
192
|
+
sqlite3 (2.7.4-arm64-darwin)
|
|
193
|
+
sqlite3 (2.7.4-x86_64-darwin)
|
|
194
|
+
sqlite3 (2.7.4-x86_64-linux-gnu)
|
|
195
|
+
sqlite3 (2.7.4-x86_64-linux-musl)
|
|
196
|
+
standard (1.51.1)
|
|
252
197
|
language_server-protocol (~> 3.17.0.2)
|
|
253
198
|
lint_roller (~> 1.0)
|
|
254
|
-
rubocop (~> 1.
|
|
199
|
+
rubocop (~> 1.80.2)
|
|
255
200
|
standard-custom (~> 1.0.0)
|
|
256
|
-
standard-performance (~> 1.
|
|
201
|
+
standard-performance (~> 1.8)
|
|
257
202
|
standard-custom (1.0.2)
|
|
258
203
|
lint_roller (~> 1.0)
|
|
259
204
|
rubocop (~> 1.50)
|
|
260
|
-
standard-performance (1.
|
|
205
|
+
standard-performance (1.8.0)
|
|
261
206
|
lint_roller (~> 1.1)
|
|
262
|
-
rubocop-performance (~> 1.
|
|
263
|
-
stringio (3.1.
|
|
264
|
-
thor (1.
|
|
265
|
-
timeout (0.4.
|
|
207
|
+
rubocop-performance (~> 1.25.0)
|
|
208
|
+
stringio (3.1.7)
|
|
209
|
+
thor (1.4.0)
|
|
210
|
+
timeout (0.4.4)
|
|
211
|
+
tsort (0.2.0)
|
|
266
212
|
tzinfo (2.0.6)
|
|
267
213
|
concurrent-ruby (~> 1.0)
|
|
268
|
-
unicode-display_width (2.
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
zeitwerk (2.7.1)
|
|
214
|
+
unicode-display_width (3.2.0)
|
|
215
|
+
unicode-emoji (~> 4.1)
|
|
216
|
+
unicode-emoji (4.1.0)
|
|
217
|
+
uri (1.0.4)
|
|
218
|
+
useragent (0.16.11)
|
|
219
|
+
zeitwerk (2.7.3)
|
|
275
220
|
|
|
276
221
|
PLATFORMS
|
|
277
|
-
aarch64-linux
|
|
278
222
|
aarch64-linux-gnu
|
|
279
223
|
aarch64-linux-musl
|
|
280
|
-
arm-linux
|
|
281
224
|
arm-linux-gnu
|
|
282
225
|
arm-linux-musl
|
|
283
226
|
arm64-darwin
|
|
284
|
-
x86-linux
|
|
285
|
-
x86-linux-gnu
|
|
286
|
-
x86-linux-musl
|
|
287
227
|
x86_64-darwin
|
|
288
228
|
x86_64-linux-gnu
|
|
289
229
|
x86_64-linux-musl
|
|
290
230
|
|
|
291
231
|
DEPENDENCIES
|
|
232
|
+
activerecord
|
|
292
233
|
appraisal
|
|
293
234
|
combustion
|
|
294
235
|
cuco
|
|
295
236
|
minitest
|
|
296
237
|
minitest-spec-rails
|
|
297
|
-
rails
|
|
298
238
|
relation!
|
|
299
239
|
ricecream
|
|
300
240
|
simplecov
|
|
@@ -302,4 +242,4 @@ DEPENDENCIES
|
|
|
302
242
|
standard
|
|
303
243
|
|
|
304
244
|
BUNDLED WITH
|
|
305
|
-
2.
|
|
245
|
+
2.7.2
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# Relation
|
|
2
|
-
|
|
3
|
-
[](https://rubygems.org/gems/relation)
|
|
4
|
+
[](https://rubygems.org/gems/relation)
|
|
5
|
+
[](https://github.com/matique/relation/actions/workflows/rake.yml)
|
|
6
|
+
[](https://github.com/standardrb/standard)
|
|
7
|
+
[](http://choosealicense.com/licenses/mit/)
|
|
7
8
|
|
|
8
9
|
AFAIK, Relation can replace all kind of relationships in a Rails database.
|
|
9
10
|
The gem stores the relationships in a additional table (named
|
|
@@ -90,6 +91,10 @@ They may be used for relationships which can not be based on the
|
|
|
90
91
|
class name of the ActiveRecords.
|
|
91
92
|
Keep in mind that dangling relations must be handled by yourself.
|
|
92
93
|
|
|
94
|
+
## Version 0.5
|
|
95
|
+
|
|
96
|
+
Version 0.5.* is intended for Rails 8.
|
|
97
|
+
|
|
93
98
|
## Version 0.4
|
|
94
99
|
|
|
95
100
|
Version 0.4.* is intended for Rails 7.
|
|
@@ -103,5 +108,5 @@ Older Rails versions may use "gem 'relation', '= 0.1.1'".
|
|
|
103
108
|
|
|
104
109
|
## Miscellaneous
|
|
105
110
|
|
|
106
|
-
Copyright (c) 2015-
|
|
111
|
+
Copyright (c) 2015-2025 Dittmar Krall (www.matiq.com),
|
|
107
112
|
released under the [MIT license](https://opensource.org/licenses/MIT).
|
data/app/models/relation.rb
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
class Relation < ActiveRecord::Base
|
|
4
4
|
def self.add_raw(name, from_id, to_id)
|
|
5
5
|
hsh = {name: name, from_id: from_id, to_id: to_id}
|
|
6
|
-
Relation.create!(hsh) if Relation.where(hsh).first.nil?
|
|
6
|
+
# Relation.create!(hsh) if Relation.where(hsh).first.nil?
|
|
7
|
+
Relation.create!(hsh) if Relation.where(hsh).count == 0
|
|
7
8
|
end
|
|
8
9
|
|
|
9
10
|
def self.delete_raw(name, from_id, to_id)
|
data/app/models/relation_ext.rb
CHANGED
|
@@ -4,7 +4,8 @@ class Relation < ActiveRecord::Base
|
|
|
4
4
|
# extended Relation
|
|
5
5
|
def self.add(row_from, row_to)
|
|
6
6
|
hsh = normalize(row_from, row_to)
|
|
7
|
-
Relation.create!(hsh) if Relation.where(hsh).first.nil?
|
|
7
|
+
# Relation.create!(hsh) if Relation.where(hsh).first.nil?
|
|
8
|
+
Relation.create!(hsh) if Relation.where(hsh).count == 0
|
|
8
9
|
end
|
|
9
10
|
|
|
10
11
|
def self.delete(row_from, row_to)
|
data/gemfiles/rails_7.2.gemfile
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
source "https://rubygems.org"
|
|
4
4
|
|
|
5
|
-
gem "
|
|
5
|
+
gem "activerecord", "~> 7.2"
|
|
6
6
|
|
|
7
7
|
group :test do
|
|
8
8
|
gem "cuco"
|
|
9
9
|
gem "minitest-spec-rails"
|
|
10
|
-
gem "ricecream"
|
|
10
|
+
gem "ricecream", require: false
|
|
11
11
|
gem "simplecov", require: false
|
|
12
12
|
gem "sqlite3"
|
|
13
13
|
gem "standard", require: false
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
source "https://rubygems.org"
|
|
4
4
|
|
|
5
|
-
gem "
|
|
5
|
+
gem "activerecord", "~> 8.0"
|
|
6
6
|
|
|
7
7
|
group :test do
|
|
8
8
|
gem "cuco"
|
|
9
9
|
gem "minitest-spec-rails"
|
|
10
|
-
gem "ricecream"
|
|
10
|
+
gem "ricecream", require: false
|
|
11
11
|
gem "simplecov", require: false
|
|
12
12
|
gem "sqlite3"
|
|
13
13
|
gem "standard", require: false
|
data/lib/relation/version.rb
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# rubocop: disable all
|
|
2
2
|
|
|
3
3
|
module ModRelation
|
|
4
|
-
VERSION = "0.
|
|
4
|
+
VERSION = "0.5.1" # 2025-10-29
|
|
5
|
+
# VERSION = "0.5.0" # 2025-06-18
|
|
6
|
+
# VERSION = "0.4.5" # 2024-10-21
|
|
5
7
|
# VERSION = "0.4.4" # 2023-12-12
|
|
6
8
|
# VERSION = "0.4.3" # 2023-04-16
|
|
7
9
|
# VERSION = "0.4.2" # 2023-01-19
|
data/relation.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dittmar Krall
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: appraisal
|
|
@@ -75,8 +74,8 @@ files:
|
|
|
75
74
|
- app/models/relation.rb
|
|
76
75
|
- app/models/relation_ext.rb
|
|
77
76
|
- db/migrate/003_create_relations.rb
|
|
78
|
-
- gemfiles/rails_7.1.gemfile
|
|
79
77
|
- gemfiles/rails_7.2.gemfile
|
|
78
|
+
- gemfiles/rails_8.0.gemfile
|
|
80
79
|
- lib/relation.rb
|
|
81
80
|
- lib/relation/engine.rb
|
|
82
81
|
- lib/relation/version.rb
|
|
@@ -94,24 +93,22 @@ licenses:
|
|
|
94
93
|
- MIT
|
|
95
94
|
metadata:
|
|
96
95
|
source_code_uri: https://github.com/matique/relation
|
|
97
|
-
post_install_message:
|
|
98
96
|
rdoc_options: []
|
|
99
97
|
require_paths:
|
|
100
98
|
- lib
|
|
101
99
|
- app
|
|
102
100
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
103
101
|
requirements:
|
|
104
|
-
- - "
|
|
102
|
+
- - "~>"
|
|
105
103
|
- !ruby/object:Gem::Version
|
|
106
|
-
version: '
|
|
104
|
+
version: '3'
|
|
107
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
106
|
requirements:
|
|
109
107
|
- - ">="
|
|
110
108
|
- !ruby/object:Gem::Version
|
|
111
109
|
version: '0'
|
|
112
110
|
requirements: []
|
|
113
|
-
rubygems_version: 3.
|
|
114
|
-
signing_key:
|
|
111
|
+
rubygems_version: 3.6.9
|
|
115
112
|
specification_version: 4
|
|
116
113
|
summary: Rails gem adding relationships between ActiveRecord models.
|
|
117
114
|
test_files: []
|
data/.ruby-gemset
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
rails-7.2
|
data/.ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ruby-3.3.5
|