mensa 0.1.16 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37a02446732948bcde9301a7df1657c2d4aec6d3ed054ddc62dedc347033d00e
4
- data.tar.gz: 67b435c88433755647f641751bab34ed95743a9169ae5030940c52ffbedd5691
3
+ metadata.gz: bcf63a1e05c2caa2ec8ef66f7ce73b721f5d6a895902aaa7f800ad8957b824b6
4
+ data.tar.gz: 9ea3064bbcf09518f0eee1709dac74e39150873a02d3ef48cc063ae68b46d631
5
5
  SHA512:
6
- metadata.gz: a3c0ddca7e763dbcfe78e42b0112be803bd464ded9d884a4fd76c57a5aa6aef1203005849bebce2079c7cf3f3ad3edb924941728e6d8f3276e3de9a329e7a353
7
- data.tar.gz: 7cd822390302f4ea74f4f097f5f136de61d1a8938ac43bedcb2590258ddb9449b12cf46f2e520eb9a9e4651edd5ee51cbf1bbe902d4ebdab776cbfba10d93f9f
6
+ metadata.gz: fe1630a7ce720705a3c58803eb376727cfebc794f68c404b3d07a757041e25bc39dcd40781a32548af79e3c2d7ac1485e28d0158ec4741cd9c76b13f3ecb8c20
7
+ data.tar.gz: a69e2ac944ee88bd3e434f0e4b5271bc7f9c10d73c6e16c526c37f0d774d379f435a49d953ea40ad38f7b5aa864a2437364dd2b5ea48ffb048f13ade524e71b7
@@ -4,17 +4,16 @@
4
4
  "name": "mensa",
5
5
  "dockerComposeFile": "compose.yaml",
6
6
  "service": "rails-app",
7
- "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
7
+ "workspaceFolder": "/workspaces/mensa",
8
8
  // Features to add to the dev container. More info: https://containers.dev/features.
9
9
  "features": {
10
- "ghcr.io/devcontainers/features/github-cli:1": {},
11
- "ghcr.io/rails/devcontainer/features/activestorage": {},
10
+ "ghcr.io/devcontainers/features/github-cli:1": { },
11
+ "ghcr.io/rails/devcontainer/features/activestorage": { },
12
12
  "ghcr.io/rails/devcontainer/features/postgres-client": {
13
13
  "version": "17"
14
14
  },
15
- "ghcr.io/devcontainers/features/node:1": {},
16
- "ghcr.io/duduribeiro/devcontainer-features/tmux:1": {},
17
- "ghcr.io/devcontainers-extra/features/mkcert:1": {}
15
+ "ghcr.io/devcontainers/features/node:1": { },
16
+ "ghcr.io/duduribeiro/devcontainer-features/tmux:1": { }
18
17
  },
19
18
  "containerEnv": {
20
19
  "CAPYBARA_SERVER_PORT": "45678",
data/.gem_release.yml ADDED
@@ -0,0 +1,3 @@
1
+ bump:
2
+ push: true
3
+ tag: true
data/.gitignore CHANGED
@@ -11,3 +11,10 @@
11
11
  /test/dummy/app/assets/builds/
12
12
  /test/dummy/tmp/
13
13
  /node_modules/
14
+
15
+
16
+ test/dummy/app/assets/stylesheets/application.tailwind.css
17
+ config/tailwind.config.js
18
+ app/assets/builds
19
+ test/dummy/config/tailwind.config.js
20
+
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ gemspec
7
7
 
8
8
  gem "puma"
9
9
  gem "sprockets-rails"
10
- gem "satis", "~> 1", entdec: "satis", branch: "main"
10
+ gem "satis", "~> 2", entdec: "satis", branch: "main"
11
11
  gem "pry"
12
12
  gem "capybara", "~> 3.40"
13
13
  gem "selenium-webdriver", "~> 4.17"
data/Gemfile.lock CHANGED
@@ -1,115 +1,116 @@
1
1
  GIT
2
2
  remote: git@github.com:entdec/satis.git
3
- revision: b065f7cebc4d8d28448e75c743fa88da643e3e03
3
+ revision: 1ef5f70700a755f01ed49168929200b2aaec792d
4
4
  branch: main
5
5
  specs:
6
- satis (1.0.136)
7
- ar_doc_store (~> 2.1)
6
+ satis (2.2.1)
8
7
  browser
9
8
  diffy
9
+ importmap-rails
10
+ jsonb_accessor (~> 1.4)
10
11
  rails (>= 6)
12
+ stimulus-rails
13
+ tailwindcss-rails
14
+ turbo-rails
11
15
  view_component
12
16
 
13
17
  PATH
14
18
  remote: .
15
19
  specs:
16
- mensa (0.1.12)
20
+ mensa (0.1.17)
17
21
  caxlsx_rails (~> 0)
18
22
  importmap-rails
19
- pagy (>= 6)
23
+ pagy (>= 43)
20
24
  rails (>= 7.1)
21
25
  slim
22
26
  stimulus-rails
23
- tailwindcss-rails
27
+ tailwindcss-rails (~> 3.3)
24
28
  textacular (>= 5)
25
29
  turbo-rails
26
30
 
27
31
  GEM
28
32
  remote: https://rubygems.org/
29
33
  specs:
30
- actioncable (7.1.2)
31
- actionpack (= 7.1.2)
32
- activesupport (= 7.1.2)
34
+ action_text-trix (2.1.15)
35
+ railties
36
+ actioncable (8.1.1)
37
+ actionpack (= 8.1.1)
38
+ activesupport (= 8.1.1)
33
39
  nio4r (~> 2.0)
34
40
  websocket-driver (>= 0.6.1)
35
41
  zeitwerk (~> 2.6)
36
- actionmailbox (7.1.2)
37
- actionpack (= 7.1.2)
38
- activejob (= 7.1.2)
39
- activerecord (= 7.1.2)
40
- activestorage (= 7.1.2)
41
- activesupport (= 7.1.2)
42
- mail (>= 2.7.1)
43
- net-imap
44
- net-pop
45
- net-smtp
46
- actionmailer (7.1.2)
47
- actionpack (= 7.1.2)
48
- actionview (= 7.1.2)
49
- activejob (= 7.1.2)
50
- activesupport (= 7.1.2)
51
- mail (~> 2.5, >= 2.5.4)
52
- net-imap
53
- net-pop
54
- net-smtp
42
+ actionmailbox (8.1.1)
43
+ actionpack (= 8.1.1)
44
+ activejob (= 8.1.1)
45
+ activerecord (= 8.1.1)
46
+ activestorage (= 8.1.1)
47
+ activesupport (= 8.1.1)
48
+ mail (>= 2.8.0)
49
+ actionmailer (8.1.1)
50
+ actionpack (= 8.1.1)
51
+ actionview (= 8.1.1)
52
+ activejob (= 8.1.1)
53
+ activesupport (= 8.1.1)
54
+ mail (>= 2.8.0)
55
55
  rails-dom-testing (~> 2.2)
56
- actionpack (7.1.2)
57
- actionview (= 7.1.2)
58
- activesupport (= 7.1.2)
56
+ actionpack (8.1.1)
57
+ actionview (= 8.1.1)
58
+ activesupport (= 8.1.1)
59
59
  nokogiri (>= 1.8.5)
60
- racc
61
60
  rack (>= 2.2.4)
62
61
  rack-session (>= 1.0.1)
63
62
  rack-test (>= 0.6.3)
64
63
  rails-dom-testing (~> 2.2)
65
64
  rails-html-sanitizer (~> 1.6)
66
- actiontext (7.1.2)
67
- actionpack (= 7.1.2)
68
- activerecord (= 7.1.2)
69
- activestorage (= 7.1.2)
70
- activesupport (= 7.1.2)
65
+ useragent (~> 0.16)
66
+ actiontext (8.1.1)
67
+ action_text-trix (~> 2.1.15)
68
+ actionpack (= 8.1.1)
69
+ activerecord (= 8.1.1)
70
+ activestorage (= 8.1.1)
71
+ activesupport (= 8.1.1)
71
72
  globalid (>= 0.6.0)
72
73
  nokogiri (>= 1.8.5)
73
- actionview (7.1.2)
74
- activesupport (= 7.1.2)
74
+ actionview (8.1.1)
75
+ activesupport (= 8.1.1)
75
76
  builder (~> 3.1)
76
77
  erubi (~> 1.11)
77
78
  rails-dom-testing (~> 2.2)
78
79
  rails-html-sanitizer (~> 1.6)
79
- activejob (7.1.2)
80
- activesupport (= 7.1.2)
80
+ activejob (8.1.1)
81
+ activesupport (= 8.1.1)
81
82
  globalid (>= 0.3.6)
82
- activemodel (7.1.2)
83
- activesupport (= 7.1.2)
84
- activerecord (7.1.2)
85
- activemodel (= 7.1.2)
86
- activesupport (= 7.1.2)
83
+ activemodel (8.1.1)
84
+ activesupport (= 8.1.1)
85
+ activerecord (8.1.1)
86
+ activemodel (= 8.1.1)
87
+ activesupport (= 8.1.1)
87
88
  timeout (>= 0.4.0)
88
- activestorage (7.1.2)
89
- actionpack (= 7.1.2)
90
- activejob (= 7.1.2)
91
- activerecord (= 7.1.2)
92
- activesupport (= 7.1.2)
89
+ activestorage (8.1.1)
90
+ actionpack (= 8.1.1)
91
+ activejob (= 8.1.1)
92
+ activerecord (= 8.1.1)
93
+ activesupport (= 8.1.1)
93
94
  marcel (~> 1.0)
94
- activesupport (7.1.2)
95
+ activesupport (8.1.1)
95
96
  base64
96
97
  bigdecimal
97
- concurrent-ruby (~> 1.0, >= 1.0.2)
98
+ concurrent-ruby (~> 1.0, >= 1.3.1)
98
99
  connection_pool (>= 2.2.5)
99
100
  drb
100
101
  i18n (>= 1.6, < 2)
102
+ json
103
+ logger (>= 1.4.2)
101
104
  minitest (>= 5.1)
102
- mutex_m
103
- tzinfo (~> 2.0)
104
- addressable (2.8.6)
105
- public_suffix (>= 2.0.2, < 6.0)
106
- ar_doc_store (2.1.3)
107
- activerecord (>= 6.1)
108
- pg
109
- base64 (0.2.0)
110
- bigdecimal (3.1.5)
111
- browser (5.3.1)
112
- builder (3.2.4)
105
+ securerandom (>= 0.3)
106
+ tzinfo (~> 2.0, >= 2.0.5)
107
+ uri (>= 0.13.1)
108
+ addressable (2.8.7)
109
+ public_suffix (>= 2.0.2, < 7.0)
110
+ base64 (0.3.0)
111
+ bigdecimal (3.3.1)
112
+ browser (6.2.0)
113
+ builder (3.3.0)
113
114
  capybara (3.40.0)
114
115
  addressable
115
116
  matrix
@@ -119,183 +120,231 @@ GEM
119
120
  rack-test (>= 0.6.3)
120
121
  regexp_parser (>= 1.5, < 3.0)
121
122
  xpath (~> 3.2)
122
- caxlsx (4.2.0)
123
+ caxlsx (4.4.0)
123
124
  htmlentities (~> 4.3, >= 4.3.4)
124
125
  marcel (~> 1.0)
125
126
  nokogiri (~> 1.10, >= 1.10.4)
126
- rubyzip (>= 1.3.0, < 3)
127
+ rubyzip (>= 2.4, < 4)
127
128
  caxlsx_rails (0.6.4)
128
129
  actionpack (>= 3.1)
129
130
  caxlsx (>= 3.0)
130
131
  coderay (1.1.3)
131
- concurrent-ruby (1.2.2)
132
- connection_pool (2.4.1)
132
+ concurrent-ruby (1.3.5)
133
+ connection_pool (2.5.4)
133
134
  crass (1.0.6)
134
- date (3.3.4)
135
- diffy (3.4.2)
136
- drb (2.2.0)
137
- ruby2_keywords
138
- erubi (1.12.0)
139
- globalid (1.2.1)
135
+ date (3.5.0)
136
+ diffy (3.4.4)
137
+ drb (2.2.3)
138
+ erb (5.1.3)
139
+ erubi (1.13.1)
140
+ globalid (1.3.0)
140
141
  activesupport (>= 6.1)
141
142
  htmlentities (4.3.4)
142
- i18n (1.14.1)
143
+ i18n (1.14.7)
143
144
  concurrent-ruby (~> 1.0)
144
- importmap-rails (2.1.0)
145
+ importmap-rails (2.2.2)
145
146
  actionpack (>= 6.0.0)
146
147
  activesupport (>= 6.0.0)
147
148
  railties (>= 6.0.0)
148
- io-console (0.7.1)
149
- irb (1.11.1)
150
- rdoc
149
+ io-console (0.8.1)
150
+ irb (1.15.3)
151
+ pp (>= 0.6.0)
152
+ rdoc (>= 4.0.0)
151
153
  reline (>= 0.4.2)
152
- loofah (2.22.0)
154
+ json (2.15.2)
155
+ jsonb_accessor (1.4)
156
+ activerecord (>= 6.1)
157
+ activesupport (>= 6.1)
158
+ pg (>= 0.18.1)
159
+ logger (1.7.0)
160
+ loofah (2.24.1)
153
161
  crass (~> 1.0.2)
154
162
  nokogiri (>= 1.12.0)
155
- mail (2.8.1)
163
+ mail (2.9.0)
164
+ logger
156
165
  mini_mime (>= 0.1.1)
157
166
  net-imap
158
167
  net-pop
159
168
  net-smtp
160
- marcel (1.0.2)
161
- matrix (0.4.2)
162
- method_source (1.0.0)
169
+ marcel (1.1.0)
170
+ matrix (0.4.3)
171
+ method_source (1.1.0)
163
172
  mini_mime (1.1.5)
164
- mini_portile2 (2.8.8)
165
- minitest (5.21.1)
166
- mutex_m (0.2.0)
167
- net-imap (0.4.9.1)
173
+ minitest (5.26.0)
174
+ net-imap (0.5.12)
168
175
  date
169
176
  net-protocol
170
177
  net-pop (0.1.2)
171
178
  net-protocol
172
179
  net-protocol (0.2.2)
173
180
  timeout
174
- net-smtp (0.4.0.1)
181
+ net-smtp (0.5.1)
175
182
  net-protocol
176
- nio4r (2.7.0)
177
- nokogiri (1.16.0)
178
- mini_portile2 (~> 2.8.2)
183
+ nio4r (2.7.5)
184
+ nokogiri (1.18.10-aarch64-linux-gnu)
179
185
  racc (~> 1.4)
180
- pagy (9.3.3)
181
- pg (1.5.4)
182
- pry (0.14.2)
186
+ nokogiri (1.18.10-aarch64-linux-musl)
187
+ racc (~> 1.4)
188
+ nokogiri (1.18.10-arm-linux-gnu)
189
+ racc (~> 1.4)
190
+ nokogiri (1.18.10-arm-linux-musl)
191
+ racc (~> 1.4)
192
+ nokogiri (1.18.10-arm64-darwin)
193
+ racc (~> 1.4)
194
+ nokogiri (1.18.10-x86_64-darwin)
195
+ racc (~> 1.4)
196
+ nokogiri (1.18.10-x86_64-linux-gnu)
197
+ racc (~> 1.4)
198
+ nokogiri (1.18.10-x86_64-linux-musl)
199
+ racc (~> 1.4)
200
+ pagy (43.0.0)
201
+ json
202
+ yaml
203
+ pg (1.6.2)
204
+ pg (1.6.2-aarch64-linux)
205
+ pg (1.6.2-aarch64-linux-musl)
206
+ pg (1.6.2-arm64-darwin)
207
+ pg (1.6.2-x86_64-darwin)
208
+ pg (1.6.2-x86_64-linux)
209
+ pg (1.6.2-x86_64-linux-musl)
210
+ pp (0.6.3)
211
+ prettyprint
212
+ prettyprint (0.2.0)
213
+ pry (0.15.2)
183
214
  coderay (~> 1.1)
184
215
  method_source (~> 1.0)
185
- psych (5.1.2)
216
+ psych (5.2.6)
217
+ date
186
218
  stringio
187
- public_suffix (5.0.4)
188
- puma (6.4.2)
219
+ public_suffix (6.0.2)
220
+ puma (7.1.0)
189
221
  nio4r (~> 2.0)
190
- racc (1.7.3)
191
- rack (3.0.8)
192
- rack-session (2.0.0)
222
+ racc (1.8.1)
223
+ rack (3.2.4)
224
+ rack-session (2.1.1)
225
+ base64 (>= 0.1.0)
193
226
  rack (>= 3.0.0)
194
- rack-test (2.1.0)
227
+ rack-test (2.2.0)
195
228
  rack (>= 1.3)
196
- rackup (2.1.0)
229
+ rackup (2.2.1)
197
230
  rack (>= 3)
198
- webrick (~> 1.8)
199
- rails (7.1.2)
200
- actioncable (= 7.1.2)
201
- actionmailbox (= 7.1.2)
202
- actionmailer (= 7.1.2)
203
- actionpack (= 7.1.2)
204
- actiontext (= 7.1.2)
205
- actionview (= 7.1.2)
206
- activejob (= 7.1.2)
207
- activemodel (= 7.1.2)
208
- activerecord (= 7.1.2)
209
- activestorage (= 7.1.2)
210
- activesupport (= 7.1.2)
231
+ rails (8.1.1)
232
+ actioncable (= 8.1.1)
233
+ actionmailbox (= 8.1.1)
234
+ actionmailer (= 8.1.1)
235
+ actionpack (= 8.1.1)
236
+ actiontext (= 8.1.1)
237
+ actionview (= 8.1.1)
238
+ activejob (= 8.1.1)
239
+ activemodel (= 8.1.1)
240
+ activerecord (= 8.1.1)
241
+ activestorage (= 8.1.1)
242
+ activesupport (= 8.1.1)
211
243
  bundler (>= 1.15.0)
212
- railties (= 7.1.2)
213
- rails-dom-testing (2.2.0)
244
+ railties (= 8.1.1)
245
+ rails-dom-testing (2.3.0)
214
246
  activesupport (>= 5.0.0)
215
247
  minitest
216
248
  nokogiri (>= 1.6)
217
- rails-html-sanitizer (1.6.0)
249
+ rails-html-sanitizer (1.6.2)
218
250
  loofah (~> 2.21)
219
- nokogiri (~> 1.14)
220
- railties (7.1.2)
221
- actionpack (= 7.1.2)
222
- activesupport (= 7.1.2)
223
- irb
251
+ 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)
252
+ railties (8.1.1)
253
+ actionpack (= 8.1.1)
254
+ activesupport (= 8.1.1)
255
+ irb (~> 1.13)
224
256
  rackup (>= 1.0.0)
225
257
  rake (>= 12.2)
226
258
  thor (~> 1.0, >= 1.2.2)
259
+ tsort (>= 0.2)
227
260
  zeitwerk (~> 2.6)
228
- rake (13.1.0)
229
- rdoc (6.6.2)
261
+ rake (13.3.1)
262
+ rdoc (6.15.1)
263
+ erb
230
264
  psych (>= 4.0.0)
231
- regexp_parser (2.9.0)
232
- reline (0.4.2)
265
+ tsort
266
+ regexp_parser (2.11.3)
267
+ reline (0.6.2)
233
268
  io-console (~> 0.5)
234
- rexml (3.2.6)
235
- ruby2_keywords (0.0.5)
236
- rubyzip (2.3.2)
237
- selenium-webdriver (4.18.1)
269
+ rexml (3.4.4)
270
+ rubyzip (3.2.2)
271
+ securerandom (0.4.1)
272
+ selenium-webdriver (4.38.0)
238
273
  base64 (~> 0.2)
274
+ logger (~> 1.4)
239
275
  rexml (~> 3.2, >= 3.2.5)
240
- rubyzip (>= 1.2.2, < 3.0)
276
+ rubyzip (>= 1.2.2, < 4.0)
241
277
  websocket (~> 1.0)
242
278
  slim (5.2.1)
243
279
  temple (~> 0.10.0)
244
280
  tilt (>= 2.1.0)
245
- sprockets (4.2.1)
281
+ sprockets (4.2.2)
246
282
  concurrent-ruby (~> 1.0)
283
+ logger
247
284
  rack (>= 2.2.4, < 4)
248
- sprockets-rails (3.4.2)
249
- actionpack (>= 5.2)
250
- activesupport (>= 5.2)
285
+ sprockets-rails (3.5.2)
286
+ actionpack (>= 6.1)
287
+ activesupport (>= 6.1)
251
288
  sprockets (>= 3.0.0)
252
289
  stimulus-rails (1.3.4)
253
290
  railties (>= 6.0.0)
254
- stringio (3.1.0)
255
- tailwindcss-rails (4.0.0)
291
+ stringio (3.1.7)
292
+ tailwindcss-rails (3.3.2)
256
293
  railties (>= 7.0.0)
257
- tailwindcss-ruby (~> 4.0)
258
- tailwindcss-ruby (4.0.4-aarch64-linux-gnu)
259
- tailwindcss-ruby (4.0.4-arm64-darwin)
260
- tailwindcss-ruby (4.0.4-x86_64-linux-gnu)
261
- temple (0.10.3)
294
+ tailwindcss-ruby (~> 3.0)
295
+ tailwindcss-ruby (3.4.17-aarch64-linux)
296
+ tailwindcss-ruby (3.4.17-arm-linux)
297
+ tailwindcss-ruby (3.4.17-arm64-darwin)
298
+ tailwindcss-ruby (3.4.17-x86_64-darwin)
299
+ tailwindcss-ruby (3.4.17-x86_64-linux)
300
+ temple (0.10.4)
262
301
  textacular (5.7.0)
263
302
  activerecord (>= 5.0)
264
- thor (1.3.0)
265
- tilt (2.3.0)
266
- timeout (0.4.1)
267
- turbo-rails (2.0.11)
268
- actionpack (>= 6.0.0)
269
- railties (>= 6.0.0)
303
+ thor (1.4.0)
304
+ tilt (2.6.1)
305
+ timeout (0.4.4)
306
+ tsort (0.2.0)
307
+ turbo-rails (2.0.20)
308
+ actionpack (>= 7.1.0)
309
+ railties (>= 7.1.0)
270
310
  tzinfo (2.0.6)
271
311
  concurrent-ruby (~> 1.0)
272
- view_component (3.10.0)
273
- activesupport (>= 5.2.0, < 8.0)
274
- concurrent-ruby (~> 1.0)
275
- method_source (~> 1.0)
276
- webrick (1.8.1)
277
- websocket (1.2.10)
278
- websocket-driver (0.7.6)
312
+ uri (1.1.1)
313
+ useragent (0.16.11)
314
+ view_component (4.1.0)
315
+ activesupport (>= 7.1.0, < 8.2)
316
+ concurrent-ruby (~> 1)
317
+ websocket (1.2.11)
318
+ websocket-driver (0.8.0)
319
+ base64
279
320
  websocket-extensions (>= 0.1.0)
280
321
  websocket-extensions (0.1.5)
281
322
  xpath (3.2.0)
282
323
  nokogiri (~> 1.8)
283
- zeitwerk (2.6.12)
324
+ yaml (0.4.0)
325
+ zeitwerk (2.7.3)
284
326
 
285
327
  PLATFORMS
286
- aarch64-linux
287
- arm64-darwin-22
328
+ aarch64-linux-gnu
329
+ aarch64-linux-musl
330
+ arm-linux
331
+ arm-linux-gnu
332
+ arm-linux-musl
333
+ arm64-darwin
334
+ x86_64-darwin
288
335
  x86_64-linux
336
+ x86_64-linux-gnu
337
+ x86_64-linux-musl
289
338
 
290
339
  DEPENDENCIES
291
340
  capybara (~> 3.40)
292
341
  mensa!
293
342
  pry
294
343
  puma
295
- satis (~> 1)!
344
+ satis (~> 2)!
296
345
  selenium-webdriver (~> 4.17)
297
346
  slim (~> 5.2)
298
347
  sprockets-rails
299
348
 
300
349
  BUNDLED WITH
301
- 2.3.21
350
+ 2.6.2
data/README.md CHANGED
@@ -17,7 +17,7 @@ Wanted features:
17
17
 
18
18
  Todo:
19
19
 
20
- - [ ] Hide filter icon in case there are no filters
20
+ - [X] Hide filter icon in case there are no filters
21
21
  - [ ] Search only works on table columns
22
22
 
23
23
  ## Usage
@@ -74,15 +74,18 @@ You can show your tables on the page using the following:
74
74
  = sts.table :users
75
75
  ```
76
76
 
77
+ #### Views
78
+
79
+ Initial support for views is there, but pretty rudimentary:
80
+ `Mensa::TableView.create(table: "users", name: "Guests", data: {filters: {role: "guest"}})`
81
+
77
82
  ### Fast
78
83
 
79
84
  Mensa selects only the data it needs, based on the columns. Sometimes it needs additional columns to do it's work, but you don't want them displayed.
80
- This can be done by adding `internal true` to the column definition.
85
+ This can be done by adding `internal true` to the column definition, or shorter: use `internal` instead
81
86
 
82
87
  ```ruby
83
- column :born_on do
84
- internal true # Needed for age below
85
- end
88
+ internal :born_on
86
89
  column :age do
87
90
  attribute "EXTRACT(YEAR FROM AGE(born_on))::int"
88
91
  end
@@ -3,7 +3,7 @@
3
3
  span.block.truncate data-mensa-add-filter-target="description"
4
4
  = t('.add_filter')
5
5
  span.pointer-events-none.absolute.inset-y-0.right-0.flex.items-center.pr-2
6
- .fal.fa-plus
6
+ div class=Mensa.config.icons[:filters_add_filter]
7
7
 
8
8
  ul.hidden.absolute.z-10.mt-1.max-h-60.w-64.overflow-auto.rounded-md.bg-white.dark:bg-gray-800.py-1.text-base.shadow-lg.ring-1.ring-black.ring-opacity-5.focus:outline-none.sm:text-sm data-mensa-add-filter-target="filterList"
9
9
  - table.columns.select(&:filter?).each do |column|
@@ -3,7 +3,7 @@
3
3
  button.flex.justify-right.cursor-pointer.py-1.5.h-full.text-gray-400 class="#{table.supports_views? ? 'w-8' : 'w-4'}" data-action="mensa-table#openFiltersAndSearch"
4
4
  - if table.supports_views?
5
5
  i class=Mensa.config.icons[:control_bar_search]
6
- - if table.supports_filters?
6
+ - if table.supports_filters? && table.filters?
7
7
  i class=Mensa.config.icons[:control_bar_filter]
8
8
  /- if view_columns_sorting?
9
9
  button.cursor-pointer.w-6.h-full.text-gray-400
@@ -21,7 +21,7 @@
21
21
  @apply divide-y divide-gray-200 dark:divide-gray-600;
22
22
 
23
23
  tr {
24
- @apply cursor-pointer bg-white dark:bg-gray-800 divide-x divide-gray-400 divide-opacity-25 hover:bg-gray-100 dark:hover:bg-gray-700;
24
+ @apply cursor-pointer bg-white dark:bg-gray-800 divide-x divide-gray-400 divide-opacity-25 hover:bg-gray-200 dark:hover:bg-gray-700;
25
25
 
26
26
  &:nth-child(even) {
27
27
  @apply bg-gray-50 dark:bg-gray-900 hover:bg-gray-200 dark:hover:bg-gray-700;
@@ -10,8 +10,8 @@
10
10
  tbody
11
11
  = render(Mensa::TableRow::Component.with_collection(table.rows, table: table))
12
12
 
13
- - if table.pagy_details&.pages > 1 || table.pagy_details.count == 0
13
+ - if table.pagy_details&.last > 1 || table.pagy_details.count == 0
14
14
  .paging
15
- == pagy_info(table.pagy_details)
16
- - if table.pagy_details&.pages > 1
17
- == pagy_nav(table.pagy_details, anchor_string: 'data-turbo-frame="_self"')
15
+ == table.pagy_details.info_tag
16
+ - if table.pagy_details&.last > 1
17
+ == table.pagy_details.series_nav(anchor_string: 'data-turbo-frame="_self"')
@@ -14,5 +14,5 @@
14
14
 
15
15
  - if table.supports_custom_views?
16
16
  a.text-gray-600.dark:text-gray-400.hover:text-gray-800.hover:bg-gray-200.rounded-md.px-3.py-1.5.text-sm[href="#" title=t("new_view", default: "New view")]
17
- .fal.fa-plus
17
+ .fa-solid.fa-plus
18
18
  = render Mensa::ControlBar::Component.new(table: table)
@@ -18,6 +18,7 @@ module Mensa
18
18
  config = config.merge(params.permit(:format, :query, :id, :page, :table_view_id, :turbo_frame_id, order: {}, filters: {}).to_h)
19
19
 
20
20
  @table = Mensa.for_name(params[:id], config)
21
+ @table.request = request
21
22
  @table.table_view = @view
22
23
  @table.original_view_context = helpers
23
24
 
@@ -1,5 +1,4 @@
1
1
  module Mensa
2
2
  module TablesHelper
3
- include Pagy::Frontend
4
3
  end
5
4
  end
@@ -1,3 +1,2 @@
1
- import "@fortawesome/fontawesome-free"
2
1
  import "@hotwired/turbo-rails"
3
2
  import "mensa/controllers"
@@ -1,11 +1,11 @@
1
1
  module Mensa
2
2
  class Base
3
- include Pagy::Backend
3
+ include Pagy::Method
4
4
  include ConfigReaders
5
5
  include Scope
6
6
 
7
7
  attr_writer :original_view_context
8
- attr_accessor :component, :name, :table_view
8
+ attr_accessor :component, :name, :table_view, :request
9
9
  attr_reader :config, :params
10
10
 
11
11
  config_reader :model
@@ -56,6 +56,10 @@ module Mensa
56
56
  ordered_scope.map { |row| Mensa::Row.new(self, row) }
57
57
  end
58
58
 
59
+ def filters?
60
+ columns.any?(&:filter?)
61
+ end
62
+
59
63
  def actions?
60
64
  config[:actions].present?
61
65
  end
@@ -50,6 +50,7 @@ module Mensa::Config
50
50
 
51
51
  option :model, default: -> { self.class.name.demodulize.to_s.classify.constantize rescue raise "No model found for #{self.class.name}" }
52
52
  option :column, dsl_hash: Mensa::Config::ColumnDsl
53
+ option :internal, dsl_hash: Mensa::Config::ColumnDsl, default: {internal: true}
53
54
  option :link
54
55
 
55
56
  option :exportable, default: true
@@ -72,7 +72,7 @@ module Mensa
72
72
  def pagy_object
73
73
  return if @pagy_details && @records
74
74
 
75
- @pagy_details, @records = selected_scope.is_a?(Array) ? pagy_array(ordered_scope, anchor_string: 'data-turbo-frame="_self"') : pagy(selected_scope, anchor_string: 'data-turbo-frame="_self"')
75
+ @pagy_details, @records = selected_scope.is_a?(Array) ? pagy(:offset, ordered_scope, anchor_string: 'data-turbo-frame="_self"') : pagy(:offset, selected_scope, anchor_string: 'data-turbo-frame="_self"')
76
76
  end
77
77
 
78
78
  # Though this works, perhaps moving this in column(s) is nicer
data/bin/setup CHANGED
@@ -40,14 +40,15 @@ FileUtils.chdir APP_ROOT do
40
40
  copy_sample! "config/tailwind.config.js"
41
41
  copy_sample! "app/assets/stylesheets/application.tailwind.css"
42
42
  copy_sample "config/puma.rb"
43
- unless File.exist?(".ssl/localhost.crt")
44
- FileUtils.mkdir_p ".ssl"
45
- FileUtils.chdir "#{APP_ROOT}/.ssl" do
46
- system!("mkcert localhost")
47
- end
48
- end
43
+ # unless File.exist?(".ssl/localhost.crt")
44
+ # FileUtils.mkdir_p ".ssl"
45
+ # FileUtils.chdir "#{APP_ROOT}/.ssl" do
46
+ # system!("mkcert localhost")
47
+ # end
48
+ # end
49
49
 
50
50
  puts "\n== Caching mode =="
51
+ system! "bin/rails tmp:create"
51
52
  FileUtils.touch "tmp/caching-dev.txt"
52
53
 
53
54
  puts "\n== Preparing database =="
@@ -56,6 +57,6 @@ FileUtils.chdir APP_ROOT do
56
57
  puts "\n== Removing old logs and tempfiles =="
57
58
  system! "bin/rails log:clear tmp:clear"
58
59
 
59
- puts "\n== Done, welcome to Soverin Core =="
60
+ puts "\n== Done, welcome to Mensa =="
60
61
  puts "To start the application, run 'cd test/dummy; bin/rails s'"
61
62
  end
data/config/importmap.rb CHANGED
@@ -2,7 +2,6 @@ pin "mensa", to: "mensa/application.js", preload: true
2
2
  pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
3
3
  pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
4
4
  pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
5
- pin '@fortawesome/fontawesome-free', to: 'https://ga.jspm.io/npm:@fortawesome/fontawesome-free@6.1.1/js/all.js'
6
5
  pin_all_from Mensa::Engine.root.join("app/javascript/mensa/controllers"), under: "mensa/controllers", to: "mensa/controllers", preload: false
7
6
  pin_all_from Mensa::Engine.root.join("app/components/mensa"), under: "mensa/components", to: "mensa", preload: false
8
7
  pin "@rails/request.js", to: "@rails--request.js.js" # @0.0.9
@@ -18,5 +18,6 @@ Mensa.setup do |config|
18
18
  control_bar_compress: "fa-solid fa-compress",
19
19
  control_bar_export: "fa-solid fa-file-export",
20
20
  search: "fa-solid fa-magnifying-glass",
21
+ filters_add_filter: "fa-solid fa-plus",
21
22
  }
22
23
  end
@@ -40,7 +40,8 @@ module Mensa
40
40
  control_bar_edit: "fa-solid fa-table-columns",
41
41
  control_bar_compress: "fa-solid fa-compress",
42
42
  control_bar_export: "fa-solid fa-file-export",
43
- search: "fa-solid fa-magnifying-glass"
43
+ search: "fa-solid fa-magnifying-glass",
44
+ filters_add_filter: "fa-solid fa-plus",
44
45
  }
45
46
  # PRO
46
47
  # option :icons, default: {
data/lib/mensa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mensa
2
- VERSION = "0.1.16"
2
+ VERSION = "0.2.0"
3
3
  end
data/mensa.gemspec CHANGED
@@ -31,11 +31,11 @@ Gem::Specification.new do |spec|
31
31
 
32
32
  spec.add_dependency 'caxlsx_rails', '~> 0'
33
33
  spec.add_dependency "rails", ">= 7.1"
34
- spec.add_dependency 'pagy', '>=6'
34
+ spec.add_dependency 'pagy', '>=43'
35
35
  spec.add_dependency 'textacular', '>=5'
36
36
 
37
37
  spec.add_dependency 'slim'
38
- spec.add_dependency 'tailwindcss-rails'
38
+ spec.add_dependency 'tailwindcss-rails', "~> 3.3"
39
39
  spec.add_dependency 'importmap-rails'
40
40
  spec.add_dependency 'turbo-rails'
41
41
  spec.add_dependency 'stimulus-rails'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mensa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom de Grunt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-12 00:00:00.000000000 Z
11
+ date: 2025-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: caxlsx_rails
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '6'
47
+ version: '43'
48
48
  type: :runtime
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: '6'
54
+ version: '43'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: textacular
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: tailwindcss-rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '3.3'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '3.3'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: importmap-rails
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -147,6 +147,7 @@ files:
147
147
  - ".devcontainer/Dockerfile"
148
148
  - ".devcontainer/compose.yaml"
149
149
  - ".devcontainer/devcontainer.json"
150
+ - ".gem_release.yml"
150
151
  - ".github/workflows/gem-push.yml"
151
152
  - ".gitignore"
152
153
  - Gemfile
@@ -227,7 +228,6 @@ files:
227
228
  - app/tables/mensa/filter.rb
228
229
  - app/tables/mensa/row.rb
229
230
  - app/tables/mensa/scope.rb
230
- - app/views/layouts/mensa/application.html.slim
231
231
  - app/views/mensa/tables/filters/show.turbo_stream.slim
232
232
  - app/views/mensa/tables/index.html.slim
233
233
  - app/views/mensa/tables/show.html.slim
@@ -1,11 +0,0 @@
1
- doctype html
2
- html
3
- head
4
- title Dummy
5
- meta name="viewport" content="width=device-width,initial-scale=1"
6
- = csrf_meta_tags
7
- = csp_meta_tag
8
- = stylesheet_link_tag "mensa"
9
- = javascript_importmap_tags "mensa"
10
- body
11
- = yield