phlexi-field 0.1.0 → 0.2.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.
@@ -0,0 +1,314 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ phlexi-field (0.1.0)
5
+ activesupport (>= 7.1)
6
+ fiber-local
7
+ phlex (~> 2.0)
8
+ zeitwerk
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actioncable (7.1.5.1)
14
+ actionpack (= 7.1.5.1)
15
+ activesupport (= 7.1.5.1)
16
+ nio4r (~> 2.0)
17
+ websocket-driver (>= 0.6.1)
18
+ zeitwerk (~> 2.6)
19
+ actionmailbox (7.1.5.1)
20
+ actionpack (= 7.1.5.1)
21
+ activejob (= 7.1.5.1)
22
+ activerecord (= 7.1.5.1)
23
+ activestorage (= 7.1.5.1)
24
+ activesupport (= 7.1.5.1)
25
+ mail (>= 2.7.1)
26
+ net-imap
27
+ net-pop
28
+ net-smtp
29
+ actionmailer (7.1.5.1)
30
+ actionpack (= 7.1.5.1)
31
+ actionview (= 7.1.5.1)
32
+ activejob (= 7.1.5.1)
33
+ activesupport (= 7.1.5.1)
34
+ mail (~> 2.5, >= 2.5.4)
35
+ net-imap
36
+ net-pop
37
+ net-smtp
38
+ rails-dom-testing (~> 2.2)
39
+ actionpack (7.1.5.1)
40
+ actionview (= 7.1.5.1)
41
+ activesupport (= 7.1.5.1)
42
+ nokogiri (>= 1.8.5)
43
+ racc
44
+ rack (>= 2.2.4)
45
+ rack-session (>= 1.0.1)
46
+ rack-test (>= 0.6.3)
47
+ rails-dom-testing (~> 2.2)
48
+ rails-html-sanitizer (~> 1.6)
49
+ actiontext (7.1.5.1)
50
+ actionpack (= 7.1.5.1)
51
+ activerecord (= 7.1.5.1)
52
+ activestorage (= 7.1.5.1)
53
+ activesupport (= 7.1.5.1)
54
+ globalid (>= 0.6.0)
55
+ nokogiri (>= 1.8.5)
56
+ actionview (7.1.5.1)
57
+ activesupport (= 7.1.5.1)
58
+ builder (~> 3.1)
59
+ erubi (~> 1.11)
60
+ rails-dom-testing (~> 2.2)
61
+ rails-html-sanitizer (~> 1.6)
62
+ activejob (7.1.5.1)
63
+ activesupport (= 7.1.5.1)
64
+ globalid (>= 0.3.6)
65
+ activemodel (7.1.5.1)
66
+ activesupport (= 7.1.5.1)
67
+ activerecord (7.1.5.1)
68
+ activemodel (= 7.1.5.1)
69
+ activesupport (= 7.1.5.1)
70
+ timeout (>= 0.4.0)
71
+ activestorage (7.1.5.1)
72
+ actionpack (= 7.1.5.1)
73
+ activejob (= 7.1.5.1)
74
+ activerecord (= 7.1.5.1)
75
+ activesupport (= 7.1.5.1)
76
+ marcel (~> 1.0)
77
+ activesupport (7.1.5.1)
78
+ base64
79
+ benchmark (>= 0.3)
80
+ bigdecimal
81
+ concurrent-ruby (~> 1.0, >= 1.0.2)
82
+ connection_pool (>= 2.2.5)
83
+ drb
84
+ i18n (>= 1.6, < 2)
85
+ logger (>= 1.4.2)
86
+ minitest (>= 5.1)
87
+ mutex_m
88
+ securerandom (>= 0.3)
89
+ tzinfo (~> 2.0)
90
+ ansi (1.5.0)
91
+ appraisal (2.5.0)
92
+ bundler
93
+ rake
94
+ thor (>= 0.14.0)
95
+ ast (2.4.3)
96
+ base64 (0.2.0)
97
+ benchmark (0.4.0)
98
+ bigdecimal (3.1.9)
99
+ builder (3.3.0)
100
+ bundle-audit (0.1.0)
101
+ bundler-audit
102
+ bundler-audit (0.9.2)
103
+ bundler (>= 1.2.0, < 3)
104
+ thor (~> 1.0)
105
+ combustion (1.5.0)
106
+ activesupport (>= 3.0.0)
107
+ railties (>= 3.0.0)
108
+ thor (>= 0.14.6)
109
+ concurrent-ruby (1.3.5)
110
+ connection_pool (2.5.3)
111
+ crass (1.0.6)
112
+ date (3.4.1)
113
+ drb (2.2.1)
114
+ erubi (1.13.1)
115
+ fiber-local (1.1.0)
116
+ fiber-storage
117
+ fiber-storage (1.0.1)
118
+ globalid (1.2.1)
119
+ activesupport (>= 6.1)
120
+ i18n (1.14.7)
121
+ concurrent-ruby (~> 1.0)
122
+ io-console (0.8.0)
123
+ irb (1.15.2)
124
+ pp (>= 0.6.0)
125
+ rdoc (>= 4.0.0)
126
+ reline (>= 0.4.2)
127
+ json (2.11.3)
128
+ language_server-protocol (3.17.0.4)
129
+ lint_roller (1.1.0)
130
+ logger (1.7.0)
131
+ loofah (2.24.0)
132
+ crass (~> 1.0.2)
133
+ nokogiri (>= 1.12.0)
134
+ mail (2.8.1)
135
+ mini_mime (>= 0.1.1)
136
+ net-imap
137
+ net-pop
138
+ net-smtp
139
+ marcel (1.0.4)
140
+ mini_mime (1.1.5)
141
+ minitest (5.25.5)
142
+ minitest-reporters (1.7.1)
143
+ ansi
144
+ builder
145
+ minitest (>= 5.0)
146
+ ruby-progressbar
147
+ mutex_m (0.3.0)
148
+ net-imap (0.5.8)
149
+ date
150
+ net-protocol
151
+ net-pop (0.1.2)
152
+ net-protocol
153
+ net-protocol (0.2.2)
154
+ timeout
155
+ net-smtp (0.5.1)
156
+ net-protocol
157
+ nio4r (2.7.4)
158
+ nokogiri (1.18.8-aarch64-linux-gnu)
159
+ racc (~> 1.4)
160
+ nokogiri (1.18.8-aarch64-linux-musl)
161
+ racc (~> 1.4)
162
+ nokogiri (1.18.8-arm-linux-gnu)
163
+ racc (~> 1.4)
164
+ nokogiri (1.18.8-arm-linux-musl)
165
+ racc (~> 1.4)
166
+ nokogiri (1.18.8-arm64-darwin)
167
+ racc (~> 1.4)
168
+ nokogiri (1.18.8-x86_64-darwin)
169
+ racc (~> 1.4)
170
+ nokogiri (1.18.8-x86_64-linux-gnu)
171
+ racc (~> 1.4)
172
+ nokogiri (1.18.8-x86_64-linux-musl)
173
+ racc (~> 1.4)
174
+ parallel (1.27.0)
175
+ parser (3.3.8.0)
176
+ ast (~> 2.4.1)
177
+ racc
178
+ phlex (2.2.1)
179
+ zeitwerk (~> 2.7)
180
+ phlex-rails (2.2.0)
181
+ phlex (~> 2.2.1)
182
+ railties (>= 7.1, < 9)
183
+ pp (0.6.2)
184
+ prettyprint
185
+ prettyprint (0.2.0)
186
+ prism (1.4.0)
187
+ psych (5.2.5)
188
+ date
189
+ stringio
190
+ racc (1.8.1)
191
+ rack (3.1.14)
192
+ rack-session (2.1.1)
193
+ base64 (>= 0.1.0)
194
+ rack (>= 3.0.0)
195
+ rack-test (2.2.0)
196
+ rack (>= 1.3)
197
+ rackup (2.2.1)
198
+ rack (>= 3)
199
+ rails (7.1.5.1)
200
+ actioncable (= 7.1.5.1)
201
+ actionmailbox (= 7.1.5.1)
202
+ actionmailer (= 7.1.5.1)
203
+ actionpack (= 7.1.5.1)
204
+ actiontext (= 7.1.5.1)
205
+ actionview (= 7.1.5.1)
206
+ activejob (= 7.1.5.1)
207
+ activemodel (= 7.1.5.1)
208
+ activerecord (= 7.1.5.1)
209
+ activestorage (= 7.1.5.1)
210
+ activesupport (= 7.1.5.1)
211
+ bundler (>= 1.15.0)
212
+ railties (= 7.1.5.1)
213
+ rails-dom-testing (2.2.0)
214
+ activesupport (>= 5.0.0)
215
+ minitest
216
+ nokogiri (>= 1.6)
217
+ rails-html-sanitizer (1.6.2)
218
+ loofah (~> 2.21)
219
+ 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)
220
+ railties (7.1.5.1)
221
+ actionpack (= 7.1.5.1)
222
+ activesupport (= 7.1.5.1)
223
+ irb
224
+ rackup (>= 1.0.0)
225
+ rake (>= 12.2)
226
+ thor (~> 1.0, >= 1.2.2)
227
+ zeitwerk (~> 2.6)
228
+ rainbow (3.1.1)
229
+ rake (13.2.1)
230
+ rdoc (6.13.1)
231
+ psych (>= 4.0.0)
232
+ regexp_parser (2.10.0)
233
+ reline (0.6.1)
234
+ io-console (~> 0.5)
235
+ rubocop (1.75.5)
236
+ json (~> 2.3)
237
+ language_server-protocol (~> 3.17.0.2)
238
+ lint_roller (~> 1.1.0)
239
+ parallel (~> 1.10)
240
+ parser (>= 3.3.0.2)
241
+ rainbow (>= 2.2.2, < 4.0)
242
+ regexp_parser (>= 2.9.3, < 3.0)
243
+ rubocop-ast (>= 1.44.0, < 2.0)
244
+ ruby-progressbar (~> 1.7)
245
+ unicode-display_width (>= 2.4.0, < 4.0)
246
+ rubocop-ast (1.44.1)
247
+ parser (>= 3.3.7.2)
248
+ prism (~> 1.4)
249
+ rubocop-performance (1.25.0)
250
+ lint_roller (~> 1.1)
251
+ rubocop (>= 1.75.0, < 2.0)
252
+ rubocop-ast (>= 1.38.0, < 2.0)
253
+ ruby-progressbar (1.13.0)
254
+ securerandom (0.4.1)
255
+ sqlite3 (1.7.3-aarch64-linux)
256
+ sqlite3 (1.7.3-arm-linux)
257
+ sqlite3 (1.7.3-arm64-darwin)
258
+ sqlite3 (1.7.3-x86_64-darwin)
259
+ sqlite3 (1.7.3-x86_64-linux)
260
+ standard (1.49.0)
261
+ language_server-protocol (~> 3.17.0.2)
262
+ lint_roller (~> 1.0)
263
+ rubocop (~> 1.75.2)
264
+ standard-custom (~> 1.0.0)
265
+ standard-performance (~> 1.8)
266
+ standard-custom (1.0.2)
267
+ lint_roller (~> 1.0)
268
+ rubocop (~> 1.50)
269
+ standard-performance (1.8.0)
270
+ lint_roller (~> 1.1)
271
+ rubocop-performance (~> 1.25.0)
272
+ stringio (3.1.7)
273
+ thor (1.3.2)
274
+ timeout (0.4.3)
275
+ tzinfo (2.0.6)
276
+ concurrent-ruby (~> 1.0)
277
+ unicode-display_width (3.1.4)
278
+ unicode-emoji (~> 4.0, >= 4.0.4)
279
+ unicode-emoji (4.0.4)
280
+ websocket-driver (0.7.7)
281
+ base64
282
+ websocket-extensions (>= 0.1.0)
283
+ websocket-extensions (0.1.5)
284
+ zeitwerk (2.7.2)
285
+
286
+ PLATFORMS
287
+ aarch64-linux
288
+ aarch64-linux-gnu
289
+ aarch64-linux-musl
290
+ arm-linux
291
+ arm-linux-gnu
292
+ arm-linux-musl
293
+ arm64-darwin
294
+ x86_64-darwin
295
+ x86_64-linux
296
+ x86_64-linux-gnu
297
+ x86_64-linux-musl
298
+
299
+ DEPENDENCIES
300
+ appraisal
301
+ bundle-audit
302
+ combustion
303
+ minitest
304
+ minitest-reporters
305
+ nokogiri
306
+ phlex-rails (~> 2.2)
307
+ phlexi-field!
308
+ rails (~> 7.1.3, >= 7.1.3.4, < 8.0.0)
309
+ rake
310
+ sqlite3 (~> 1.4)
311
+ standard
312
+
313
+ BUNDLED WITH
314
+ 2.6.2
@@ -0,0 +1,13 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 8.0.0"
6
+ gem "sqlite3", "~> 2.1"
7
+ gem "phlex-rails", "~> 2.2"
8
+
9
+ platforms :ruby, :x86_64_linux, :arm64_darwin do
10
+
11
+ end
12
+
13
+ gemspec path: "../"
@@ -0,0 +1,309 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ phlexi-field (0.1.0)
5
+ activesupport (>= 7.1)
6
+ fiber-local
7
+ phlex (~> 2.0)
8
+ zeitwerk
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actioncable (8.0.2)
14
+ actionpack (= 8.0.2)
15
+ activesupport (= 8.0.2)
16
+ nio4r (~> 2.0)
17
+ websocket-driver (>= 0.6.1)
18
+ zeitwerk (~> 2.6)
19
+ actionmailbox (8.0.2)
20
+ actionpack (= 8.0.2)
21
+ activejob (= 8.0.2)
22
+ activerecord (= 8.0.2)
23
+ activestorage (= 8.0.2)
24
+ activesupport (= 8.0.2)
25
+ mail (>= 2.8.0)
26
+ actionmailer (8.0.2)
27
+ actionpack (= 8.0.2)
28
+ actionview (= 8.0.2)
29
+ activejob (= 8.0.2)
30
+ activesupport (= 8.0.2)
31
+ mail (>= 2.8.0)
32
+ rails-dom-testing (~> 2.2)
33
+ actionpack (8.0.2)
34
+ actionview (= 8.0.2)
35
+ activesupport (= 8.0.2)
36
+ nokogiri (>= 1.8.5)
37
+ rack (>= 2.2.4)
38
+ rack-session (>= 1.0.1)
39
+ rack-test (>= 0.6.3)
40
+ rails-dom-testing (~> 2.2)
41
+ rails-html-sanitizer (~> 1.6)
42
+ useragent (~> 0.16)
43
+ actiontext (8.0.2)
44
+ actionpack (= 8.0.2)
45
+ activerecord (= 8.0.2)
46
+ activestorage (= 8.0.2)
47
+ activesupport (= 8.0.2)
48
+ globalid (>= 0.6.0)
49
+ nokogiri (>= 1.8.5)
50
+ actionview (8.0.2)
51
+ activesupport (= 8.0.2)
52
+ builder (~> 3.1)
53
+ erubi (~> 1.11)
54
+ rails-dom-testing (~> 2.2)
55
+ rails-html-sanitizer (~> 1.6)
56
+ activejob (8.0.2)
57
+ activesupport (= 8.0.2)
58
+ globalid (>= 0.3.6)
59
+ activemodel (8.0.2)
60
+ activesupport (= 8.0.2)
61
+ activerecord (8.0.2)
62
+ activemodel (= 8.0.2)
63
+ activesupport (= 8.0.2)
64
+ timeout (>= 0.4.0)
65
+ activestorage (8.0.2)
66
+ actionpack (= 8.0.2)
67
+ activejob (= 8.0.2)
68
+ activerecord (= 8.0.2)
69
+ activesupport (= 8.0.2)
70
+ marcel (~> 1.0)
71
+ activesupport (8.0.2)
72
+ base64
73
+ benchmark (>= 0.3)
74
+ bigdecimal
75
+ concurrent-ruby (~> 1.0, >= 1.3.1)
76
+ connection_pool (>= 2.2.5)
77
+ drb
78
+ i18n (>= 1.6, < 2)
79
+ logger (>= 1.4.2)
80
+ minitest (>= 5.1)
81
+ securerandom (>= 0.3)
82
+ tzinfo (~> 2.0, >= 2.0.5)
83
+ uri (>= 0.13.1)
84
+ ansi (1.5.0)
85
+ appraisal (2.5.0)
86
+ bundler
87
+ rake
88
+ thor (>= 0.14.0)
89
+ ast (2.4.3)
90
+ base64 (0.2.0)
91
+ benchmark (0.4.0)
92
+ bigdecimal (3.1.9)
93
+ builder (3.3.0)
94
+ bundle-audit (0.1.0)
95
+ bundler-audit
96
+ bundler-audit (0.9.2)
97
+ bundler (>= 1.2.0, < 3)
98
+ thor (~> 1.0)
99
+ combustion (1.5.0)
100
+ activesupport (>= 3.0.0)
101
+ railties (>= 3.0.0)
102
+ thor (>= 0.14.6)
103
+ concurrent-ruby (1.3.5)
104
+ connection_pool (2.5.3)
105
+ crass (1.0.6)
106
+ date (3.4.1)
107
+ drb (2.2.1)
108
+ erubi (1.13.1)
109
+ fiber-local (1.1.0)
110
+ fiber-storage
111
+ fiber-storage (1.0.1)
112
+ globalid (1.2.1)
113
+ activesupport (>= 6.1)
114
+ i18n (1.14.7)
115
+ concurrent-ruby (~> 1.0)
116
+ io-console (0.8.0)
117
+ irb (1.15.2)
118
+ pp (>= 0.6.0)
119
+ rdoc (>= 4.0.0)
120
+ reline (>= 0.4.2)
121
+ json (2.11.3)
122
+ language_server-protocol (3.17.0.4)
123
+ lint_roller (1.1.0)
124
+ logger (1.7.0)
125
+ loofah (2.24.0)
126
+ crass (~> 1.0.2)
127
+ nokogiri (>= 1.12.0)
128
+ mail (2.8.1)
129
+ mini_mime (>= 0.1.1)
130
+ net-imap
131
+ net-pop
132
+ net-smtp
133
+ marcel (1.0.4)
134
+ mini_mime (1.1.5)
135
+ minitest (5.25.5)
136
+ minitest-reporters (1.7.1)
137
+ ansi
138
+ builder
139
+ minitest (>= 5.0)
140
+ ruby-progressbar
141
+ net-imap (0.5.8)
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.1)
149
+ net-protocol
150
+ nio4r (2.7.4)
151
+ nokogiri (1.18.8-aarch64-linux-gnu)
152
+ racc (~> 1.4)
153
+ nokogiri (1.18.8-aarch64-linux-musl)
154
+ racc (~> 1.4)
155
+ nokogiri (1.18.8-arm-linux-gnu)
156
+ racc (~> 1.4)
157
+ nokogiri (1.18.8-arm-linux-musl)
158
+ racc (~> 1.4)
159
+ nokogiri (1.18.8-arm64-darwin)
160
+ racc (~> 1.4)
161
+ nokogiri (1.18.8-x86_64-darwin)
162
+ racc (~> 1.4)
163
+ nokogiri (1.18.8-x86_64-linux-gnu)
164
+ racc (~> 1.4)
165
+ nokogiri (1.18.8-x86_64-linux-musl)
166
+ racc (~> 1.4)
167
+ parallel (1.27.0)
168
+ parser (3.3.8.0)
169
+ ast (~> 2.4.1)
170
+ racc
171
+ phlex (2.2.1)
172
+ zeitwerk (~> 2.7)
173
+ phlex-rails (2.2.0)
174
+ phlex (~> 2.2.1)
175
+ railties (>= 7.1, < 9)
176
+ pp (0.6.2)
177
+ prettyprint
178
+ prettyprint (0.2.0)
179
+ prism (1.4.0)
180
+ psych (5.2.5)
181
+ date
182
+ stringio
183
+ racc (1.8.1)
184
+ rack (3.1.14)
185
+ rack-session (2.1.1)
186
+ base64 (>= 0.1.0)
187
+ rack (>= 3.0.0)
188
+ rack-test (2.2.0)
189
+ rack (>= 1.3)
190
+ rackup (2.2.1)
191
+ rack (>= 3)
192
+ rails (8.0.2)
193
+ actioncable (= 8.0.2)
194
+ actionmailbox (= 8.0.2)
195
+ actionmailer (= 8.0.2)
196
+ actionpack (= 8.0.2)
197
+ actiontext (= 8.0.2)
198
+ actionview (= 8.0.2)
199
+ activejob (= 8.0.2)
200
+ activemodel (= 8.0.2)
201
+ activerecord (= 8.0.2)
202
+ activestorage (= 8.0.2)
203
+ activesupport (= 8.0.2)
204
+ bundler (>= 1.15.0)
205
+ railties (= 8.0.2)
206
+ rails-dom-testing (2.2.0)
207
+ activesupport (>= 5.0.0)
208
+ minitest
209
+ nokogiri (>= 1.6)
210
+ rails-html-sanitizer (1.6.2)
211
+ loofah (~> 2.21)
212
+ 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)
213
+ railties (8.0.2)
214
+ actionpack (= 8.0.2)
215
+ activesupport (= 8.0.2)
216
+ irb (~> 1.13)
217
+ rackup (>= 1.0.0)
218
+ rake (>= 12.2)
219
+ thor (~> 1.0, >= 1.2.2)
220
+ zeitwerk (~> 2.6)
221
+ rainbow (3.1.1)
222
+ rake (13.2.1)
223
+ rdoc (6.13.1)
224
+ psych (>= 4.0.0)
225
+ regexp_parser (2.10.0)
226
+ reline (0.6.1)
227
+ io-console (~> 0.5)
228
+ rubocop (1.75.5)
229
+ json (~> 2.3)
230
+ language_server-protocol (~> 3.17.0.2)
231
+ lint_roller (~> 1.1.0)
232
+ parallel (~> 1.10)
233
+ parser (>= 3.3.0.2)
234
+ rainbow (>= 2.2.2, < 4.0)
235
+ regexp_parser (>= 2.9.3, < 3.0)
236
+ rubocop-ast (>= 1.44.0, < 2.0)
237
+ ruby-progressbar (~> 1.7)
238
+ unicode-display_width (>= 2.4.0, < 4.0)
239
+ rubocop-ast (1.44.1)
240
+ parser (>= 3.3.7.2)
241
+ prism (~> 1.4)
242
+ rubocop-performance (1.25.0)
243
+ lint_roller (~> 1.1)
244
+ rubocop (>= 1.75.0, < 2.0)
245
+ rubocop-ast (>= 1.38.0, < 2.0)
246
+ ruby-progressbar (1.13.0)
247
+ securerandom (0.4.1)
248
+ sqlite3 (2.6.0-aarch64-linux-gnu)
249
+ sqlite3 (2.6.0-aarch64-linux-musl)
250
+ sqlite3 (2.6.0-arm-linux-gnu)
251
+ sqlite3 (2.6.0-arm-linux-musl)
252
+ sqlite3 (2.6.0-arm64-darwin)
253
+ sqlite3 (2.6.0-x86_64-darwin)
254
+ sqlite3 (2.6.0-x86_64-linux-gnu)
255
+ sqlite3 (2.6.0-x86_64-linux-musl)
256
+ standard (1.49.0)
257
+ language_server-protocol (~> 3.17.0.2)
258
+ lint_roller (~> 1.0)
259
+ rubocop (~> 1.75.2)
260
+ standard-custom (~> 1.0.0)
261
+ standard-performance (~> 1.8)
262
+ standard-custom (1.0.2)
263
+ lint_roller (~> 1.0)
264
+ rubocop (~> 1.50)
265
+ standard-performance (1.8.0)
266
+ lint_roller (~> 1.1)
267
+ rubocop-performance (~> 1.25.0)
268
+ stringio (3.1.7)
269
+ thor (1.3.2)
270
+ timeout (0.4.3)
271
+ tzinfo (2.0.6)
272
+ concurrent-ruby (~> 1.0)
273
+ unicode-display_width (3.1.4)
274
+ unicode-emoji (~> 4.0, >= 4.0.4)
275
+ unicode-emoji (4.0.4)
276
+ uri (1.0.3)
277
+ useragent (0.16.11)
278
+ websocket-driver (0.7.7)
279
+ base64
280
+ websocket-extensions (>= 0.1.0)
281
+ websocket-extensions (0.1.5)
282
+ zeitwerk (2.7.2)
283
+
284
+ PLATFORMS
285
+ aarch64-linux-gnu
286
+ aarch64-linux-musl
287
+ arm-linux-gnu
288
+ arm-linux-musl
289
+ arm64-darwin
290
+ x86_64-darwin
291
+ x86_64-linux-gnu
292
+ x86_64-linux-musl
293
+
294
+ DEPENDENCIES
295
+ appraisal
296
+ bundle-audit
297
+ combustion
298
+ minitest
299
+ minitest-reporters
300
+ nokogiri
301
+ phlex-rails (~> 2.2)
302
+ phlexi-field!
303
+ rails (~> 8.0.0)
304
+ rake
305
+ sqlite3 (~> 2.1)
306
+ standard
307
+
308
+ BUNDLED WITH
309
+ 2.6.2
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Phlexi
4
+ module Field
5
+ module Common
6
+ module Tokens
7
+ def classes(*tokens, **conditional_tokens)
8
+ tokens = self.tokens(*tokens, **conditional_tokens)
9
+
10
+ if tokens.empty?
11
+ {}
12
+ else
13
+ {class: tokens}
14
+ end
15
+ end
16
+
17
+ def tokens(*tokens, **conditional_tokens)
18
+ conditional_tokens.each do |condition, token|
19
+ truthy = case condition
20
+ when Symbol then send(condition)
21
+ when Proc then condition.call
22
+ else raise ArgumentError, "The class condition must be a Symbol or a Proc."
23
+ end
24
+
25
+ if truthy
26
+ case token
27
+ when Hash then __append_token__(tokens, token[:then])
28
+ else __append_token__(tokens, token)
29
+ end
30
+ else
31
+ case token
32
+ when Hash then __append_token__(tokens, token[:else])
33
+ end
34
+ end
35
+ end
36
+
37
+ tokens = tokens.select(&:itself).join(" ")
38
+ tokens.strip!
39
+ tokens.gsub!(/\s+/, " ")
40
+ tokens
41
+ end
42
+
43
+ private
44
+
45
+ def __append_token__(tokens, token)
46
+ case token
47
+ when nil then nil
48
+ when String then tokens << token
49
+ when Symbol then tokens << token.name
50
+ when Array then tokens.concat(token)
51
+ else raise ArgumentError,
52
+ "Conditional classes must be Symbols, Strings, or Arrays of Symbols or Strings."
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -4,6 +4,8 @@ module Phlexi
4
4
  module Field
5
5
  module Components
6
6
  class Base < COMPONENT_BASE
7
+ include Phlexi::Field::Common::Tokens
8
+
7
9
  attr_reader :field, :attributes
8
10
 
9
11
  def initialize(field, **attributes)
@@ -23,9 +25,7 @@ module Phlexi
23
25
  def build_component_class
24
26
  return if attributes[:class] == false
25
27
 
26
- base_class = component_name
27
- existing_class = attributes[:class]
28
- attributes[:class] = existing_class ? "#{base_class} #{existing_class}" : base_class
28
+ attributes[:class] = tokens(component_name, attributes[:class])
29
29
  end
30
30
 
31
31
  def component_name