trusty-cms 7.0.1 → 7.0.3
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/.gitignore +0 -1
- data/Gemfile +2 -2
- data/Gemfile.lock +89 -102
- data/INSTALL.md +8 -6
- data/README.md +16 -11
- data/app/assets/stylesheets/admin/partials/_forms.scss +13 -0
- data/app/controllers/admin/configuration_controller.rb +1 -1
- data/app/controllers/admin/extensions_controller.rb +1 -0
- data/app/controllers/admin/layouts_controller.rb +2 -1
- data/app/controllers/admin/resource_controller.rb +10 -1
- data/app/controllers/admin/sites_controller.rb +1 -0
- data/app/controllers/admin/snippets_controller.rb +2 -1
- data/app/controllers/admin/users_controller.rb +2 -1
- data/app/helpers/admin/users_helper.rb +2 -1
- data/app/models/admins_site.rb +6 -0
- data/app/models/site.rb +2 -0
- data/app/models/trusty_cms/config.rb +2 -1
- data/app/models/user.rb +15 -4
- data/app/views/admin/layouts/_choose_site.html.haml +5 -3
- data/app/views/admin/layouts/_site_chooser.html.haml +2 -2
- data/app/views/admin/pages/_fields.html.haml +4 -3
- data/app/views/admin/pages/_node.html.haml +1 -1
- data/app/views/admin/snippets/_choose_site.html.haml +2 -1
- data/app/views/admin/users/_choose_site.html.haml +2 -1
- data/app/views/admin/users/_form.html.haml +3 -1
- data/bin/rails +2 -2
- data/config/application.rb +1 -0
- data/config/boot.rb +1 -1
- data/config/locales/en.yml +10 -8
- data/db/migrate/20241108172942_create_site_users.rb +8 -0
- data/lib/generators/extension_controller/extension_controller_generator.rb +1 -1
- data/lib/generators/extension_mailer/extension_mailer_generator.rb +1 -1
- data/lib/generators/extension_model/extension_model_generator.rb +1 -1
- data/lib/generators/instance/instance_generator.rb +24 -20
- data/lib/generators/trusty_cms/templates/boot.rb.erb +1 -1
- data/lib/login_system.rb +15 -15
- data/lib/tasks/framework.rake +3 -3
- data/lib/trusty_cms/available_locales.rb +1 -1
- data/lib/trusty_cms/task_support.rb +1 -1
- data/lib/trusty_cms/version.rb +1 -1
- data/spec/dummy/config/application.rb +2 -0
- data/spec/dummy/db/schema.rb +8 -1
- data/spec/factories/snippet.rb +10 -0
- data/spec/factories/user.rb +11 -11
- data/spec/models/snippets_spec.rb +29 -0
- data/spec/models/user_spec.rb +46 -0
- data/trusty_cms.gemspec +1 -1
- data/vendor/extensions/multi-site-extension/lib/multi_site/scoped_model.rb +17 -11
- data/vendor/extensions/multi-site-extension/lib/multi_site/site_chooser_helper.rb +10 -10
- metadata +12 -5
- data/app/users/_choose_site.html.haml +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f70f54fbf4a9bdd1942aa09ab0ce72e3d0d2936e4f3df17aa6e127bc94ef6344
|
4
|
+
data.tar.gz: d432e6f6aafa924bca508f829a4fdb3048526e6f081f1244002050e97d6d0d3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e321cca958b7654771284d611961db5b1ada2dd89abd0bae3b78dd33a4ef05313f1390f93a4ff355bb0e2534bab923caf73d2fba8ae44eb3a7b9aed83cd66d86
|
7
|
+
data.tar.gz: 8e0e2fc24697b390b9176aa8e0f8b03a7c4cafdae22a4625da787bbea24cd8a892b6a88f20f409a7a4a4bf196c7016c2802e76c5448d4afd0d879970d7ae1ba8
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -15,13 +15,13 @@ group :development, :test do
|
|
15
15
|
gem 'activestorage-validator'
|
16
16
|
gem 'acts_as_list'
|
17
17
|
gem 'database_cleaner'
|
18
|
-
gem 'factory_bot_rails', '6.4.
|
18
|
+
gem 'factory_bot_rails', '6.4.4'
|
19
19
|
gem 'file_validators'
|
20
20
|
gem 'launchy', '~> 3.0.1'
|
21
21
|
gem 'mysql2'
|
22
22
|
gem 'poltergeist', '~> 1.18.1'
|
23
23
|
gem 'pry-byebug'
|
24
|
-
gem 'psych', '5.
|
24
|
+
gem 'psych', '5.2.0'
|
25
25
|
gem 'rails-observers'
|
26
26
|
gem 'ransack'
|
27
27
|
gem 'rspec-rails'
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
trusty-cms (7.0.
|
4
|
+
trusty-cms (7.0.3)
|
5
5
|
RedCloth (= 4.3.3)
|
6
6
|
activestorage-validator
|
7
7
|
acts_as_list (>= 0.9.5, < 1.3.0)
|
@@ -21,7 +21,7 @@ PATH
|
|
21
21
|
mini_racer
|
22
22
|
mutex_m
|
23
23
|
mysql2
|
24
|
-
rack (>= 2.0.1, < 3.
|
24
|
+
rack (>= 2.0.1, < 3.2.0)
|
25
25
|
rack-cache (~> 1.7)
|
26
26
|
radius (~> 0.7)
|
27
27
|
rails (~> 7.0.0)
|
@@ -39,74 +39,74 @@ GEM
|
|
39
39
|
remote: https://rubygems.org/
|
40
40
|
specs:
|
41
41
|
RedCloth (4.3.3)
|
42
|
-
actioncable (7.0.8.
|
43
|
-
actionpack (= 7.0.8.
|
44
|
-
activesupport (= 7.0.8.
|
42
|
+
actioncable (7.0.8.6)
|
43
|
+
actionpack (= 7.0.8.6)
|
44
|
+
activesupport (= 7.0.8.6)
|
45
45
|
nio4r (~> 2.0)
|
46
46
|
websocket-driver (>= 0.6.1)
|
47
|
-
actionmailbox (7.0.8.
|
48
|
-
actionpack (= 7.0.8.
|
49
|
-
activejob (= 7.0.8.
|
50
|
-
activerecord (= 7.0.8.
|
51
|
-
activestorage (= 7.0.8.
|
52
|
-
activesupport (= 7.0.8.
|
47
|
+
actionmailbox (7.0.8.6)
|
48
|
+
actionpack (= 7.0.8.6)
|
49
|
+
activejob (= 7.0.8.6)
|
50
|
+
activerecord (= 7.0.8.6)
|
51
|
+
activestorage (= 7.0.8.6)
|
52
|
+
activesupport (= 7.0.8.6)
|
53
53
|
mail (>= 2.7.1)
|
54
54
|
net-imap
|
55
55
|
net-pop
|
56
56
|
net-smtp
|
57
|
-
actionmailer (7.0.8.
|
58
|
-
actionpack (= 7.0.8.
|
59
|
-
actionview (= 7.0.8.
|
60
|
-
activejob (= 7.0.8.
|
61
|
-
activesupport (= 7.0.8.
|
57
|
+
actionmailer (7.0.8.6)
|
58
|
+
actionpack (= 7.0.8.6)
|
59
|
+
actionview (= 7.0.8.6)
|
60
|
+
activejob (= 7.0.8.6)
|
61
|
+
activesupport (= 7.0.8.6)
|
62
62
|
mail (~> 2.5, >= 2.5.4)
|
63
63
|
net-imap
|
64
64
|
net-pop
|
65
65
|
net-smtp
|
66
66
|
rails-dom-testing (~> 2.0)
|
67
|
-
actionpack (7.0.8.
|
68
|
-
actionview (= 7.0.8.
|
69
|
-
activesupport (= 7.0.8.
|
67
|
+
actionpack (7.0.8.6)
|
68
|
+
actionview (= 7.0.8.6)
|
69
|
+
activesupport (= 7.0.8.6)
|
70
70
|
rack (~> 2.0, >= 2.2.4)
|
71
71
|
rack-test (>= 0.6.3)
|
72
72
|
rails-dom-testing (~> 2.0)
|
73
73
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
74
|
-
actiontext (7.0.8.
|
75
|
-
actionpack (= 7.0.8.
|
76
|
-
activerecord (= 7.0.8.
|
77
|
-
activestorage (= 7.0.8.
|
78
|
-
activesupport (= 7.0.8.
|
74
|
+
actiontext (7.0.8.6)
|
75
|
+
actionpack (= 7.0.8.6)
|
76
|
+
activerecord (= 7.0.8.6)
|
77
|
+
activestorage (= 7.0.8.6)
|
78
|
+
activesupport (= 7.0.8.6)
|
79
79
|
globalid (>= 0.6.0)
|
80
80
|
nokogiri (>= 1.8.5)
|
81
|
-
actionview (7.0.8.
|
82
|
-
activesupport (= 7.0.8.
|
81
|
+
actionview (7.0.8.6)
|
82
|
+
activesupport (= 7.0.8.6)
|
83
83
|
builder (~> 3.1)
|
84
84
|
erubi (~> 1.4)
|
85
85
|
rails-dom-testing (~> 2.0)
|
86
86
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
87
|
-
activejob (7.0.8.
|
88
|
-
activesupport (= 7.0.8.
|
87
|
+
activejob (7.0.8.6)
|
88
|
+
activesupport (= 7.0.8.6)
|
89
89
|
globalid (>= 0.3.6)
|
90
|
-
activemodel (7.0.8.
|
91
|
-
activesupport (= 7.0.8.
|
92
|
-
activerecord (7.0.8.
|
93
|
-
activemodel (= 7.0.8.
|
94
|
-
activesupport (= 7.0.8.
|
95
|
-
activestorage (7.0.8.
|
96
|
-
actionpack (= 7.0.8.
|
97
|
-
activejob (= 7.0.8.
|
98
|
-
activerecord (= 7.0.8.
|
99
|
-
activesupport (= 7.0.8.
|
90
|
+
activemodel (7.0.8.6)
|
91
|
+
activesupport (= 7.0.8.6)
|
92
|
+
activerecord (7.0.8.6)
|
93
|
+
activemodel (= 7.0.8.6)
|
94
|
+
activesupport (= 7.0.8.6)
|
95
|
+
activestorage (7.0.8.6)
|
96
|
+
actionpack (= 7.0.8.6)
|
97
|
+
activejob (= 7.0.8.6)
|
98
|
+
activerecord (= 7.0.8.6)
|
99
|
+
activesupport (= 7.0.8.6)
|
100
100
|
marcel (~> 1.0)
|
101
101
|
mini_mime (>= 1.1.0)
|
102
102
|
activestorage-validator (0.4.0)
|
103
103
|
rails (>= 6.1.0)
|
104
|
-
activesupport (7.0.8.
|
104
|
+
activesupport (7.0.8.6)
|
105
105
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
106
106
|
i18n (>= 1.6, < 2)
|
107
107
|
minitest (>= 5.1)
|
108
108
|
tzinfo (~> 2.0)
|
109
|
-
acts_as_list (1.2.
|
109
|
+
acts_as_list (1.2.4)
|
110
110
|
activerecord (>= 6.1)
|
111
111
|
activesupport (>= 6.1)
|
112
112
|
acts_as_tree (2.9.1)
|
@@ -137,16 +137,16 @@ GEM
|
|
137
137
|
coderay (1.1.3)
|
138
138
|
concurrent-ruby (1.3.4)
|
139
139
|
crass (1.0.6)
|
140
|
-
css_parser (1.19.
|
140
|
+
css_parser (1.19.1)
|
141
141
|
addressable
|
142
142
|
csv (3.3.0)
|
143
|
-
database_cleaner (2.0
|
143
|
+
database_cleaner (2.1.0)
|
144
144
|
database_cleaner-active_record (>= 2, < 3)
|
145
145
|
database_cleaner-active_record (2.2.0)
|
146
146
|
activerecord (>= 5.a)
|
147
147
|
database_cleaner-core (~> 2.0.0)
|
148
148
|
database_cleaner-core (2.0.1)
|
149
|
-
date (3.
|
149
|
+
date (3.4.0)
|
150
150
|
delocalize (1.2.0)
|
151
151
|
rails (>= 2)
|
152
152
|
devise (4.9.4)
|
@@ -159,22 +159,13 @@ GEM
|
|
159
159
|
docile (1.4.1)
|
160
160
|
drb (2.2.1)
|
161
161
|
erubi (1.13.0)
|
162
|
-
execjs (2.
|
162
|
+
execjs (2.10.0)
|
163
163
|
factory_bot (6.5.0)
|
164
164
|
activesupport (>= 5.0.0)
|
165
|
-
factory_bot_rails (6.4.
|
166
|
-
factory_bot (~> 6.
|
165
|
+
factory_bot_rails (6.4.4)
|
166
|
+
factory_bot (~> 6.5)
|
167
167
|
railties (>= 5.0.0)
|
168
|
-
ffi (1.17.0
|
169
|
-
ffi (1.17.0-aarch64-linux-musl)
|
170
|
-
ffi (1.17.0-arm-linux-gnu)
|
171
|
-
ffi (1.17.0-arm-linux-musl)
|
172
|
-
ffi (1.17.0-arm64-darwin)
|
173
|
-
ffi (1.17.0-x86-linux-gnu)
|
174
|
-
ffi (1.17.0-x86-linux-musl)
|
175
|
-
ffi (1.17.0-x86_64-darwin)
|
176
|
-
ffi (1.17.0-x86_64-linux-gnu)
|
177
|
-
ffi (1.17.0-x86_64-linux-musl)
|
168
|
+
ffi (1.17.0)
|
178
169
|
file_validators (3.0.0)
|
179
170
|
activemodel (>= 3.2)
|
180
171
|
mime-types (>= 1.0)
|
@@ -200,7 +191,7 @@ GEM
|
|
200
191
|
mini_magick (>= 4.9.5, < 5)
|
201
192
|
ruby-vips (>= 2.0.17, < 3)
|
202
193
|
io-console (0.7.2)
|
203
|
-
json (2.
|
194
|
+
json (2.8.1)
|
204
195
|
kraken-io (0.1.3)
|
205
196
|
activesupport
|
206
197
|
httparty
|
@@ -217,7 +208,7 @@ GEM
|
|
217
208
|
libv8-node (18.19.0.0-x86_64-linux)
|
218
209
|
libv8-node (18.19.0.0-x86_64-linux-musl)
|
219
210
|
logger (1.6.1)
|
220
|
-
loofah (2.
|
211
|
+
loofah (2.23.1)
|
221
212
|
crass (~> 1.0.2)
|
222
213
|
nokogiri (>= 1.12.0)
|
223
214
|
mail (2.8.1)
|
@@ -231,18 +222,18 @@ GEM
|
|
231
222
|
mime-types (3.6.0)
|
232
223
|
logger
|
233
224
|
mime-types-data (~> 3.2015)
|
234
|
-
mime-types-data (3.2024.
|
225
|
+
mime-types-data (3.2024.1105)
|
235
226
|
mini_magick (4.13.2)
|
236
227
|
mini_mime (1.1.5)
|
237
228
|
mini_racer (0.16.0)
|
238
229
|
libv8-node (~> 18.19.0.0)
|
239
|
-
minitest (5.25.
|
230
|
+
minitest (5.25.2)
|
240
231
|
multi_xml (0.7.1)
|
241
232
|
bigdecimal (~> 3.1)
|
242
233
|
multipart-post (2.4.1)
|
243
|
-
mutex_m (0.
|
234
|
+
mutex_m (0.3.0)
|
244
235
|
mysql2 (0.5.6)
|
245
|
-
net-imap (0.
|
236
|
+
net-imap (0.5.1)
|
246
237
|
date
|
247
238
|
net-protocol
|
248
239
|
net-pop (0.1.2)
|
@@ -252,17 +243,17 @@ GEM
|
|
252
243
|
net-smtp (0.5.0)
|
253
244
|
net-protocol
|
254
245
|
nio4r (2.7.3)
|
255
|
-
nokogiri (1.16.
|
246
|
+
nokogiri (1.16.8-aarch64-linux)
|
256
247
|
racc (~> 1.4)
|
257
|
-
nokogiri (1.16.
|
248
|
+
nokogiri (1.16.8-arm-linux)
|
258
249
|
racc (~> 1.4)
|
259
|
-
nokogiri (1.16.
|
250
|
+
nokogiri (1.16.8-arm64-darwin)
|
260
251
|
racc (~> 1.4)
|
261
|
-
nokogiri (1.16.
|
252
|
+
nokogiri (1.16.8-x86-linux)
|
262
253
|
racc (~> 1.4)
|
263
|
-
nokogiri (1.16.
|
254
|
+
nokogiri (1.16.8-x86_64-darwin)
|
264
255
|
racc (~> 1.4)
|
265
|
-
nokogiri (1.16.
|
256
|
+
nokogiri (1.16.8-x86_64-linux)
|
266
257
|
racc (~> 1.4)
|
267
258
|
orm_adapter (0.5.0)
|
268
259
|
poltergeist (1.18.1)
|
@@ -275,42 +266,42 @@ GEM
|
|
275
266
|
pry-byebug (3.10.1)
|
276
267
|
byebug (~> 11.0)
|
277
268
|
pry (>= 0.13, < 0.15)
|
278
|
-
psych (5.
|
269
|
+
psych (5.2.0)
|
279
270
|
stringio
|
280
271
|
public_suffix (6.0.1)
|
281
272
|
racc (1.8.1)
|
282
|
-
rack (2.2.
|
273
|
+
rack (2.2.10)
|
283
274
|
rack-cache (1.17.0)
|
284
275
|
rack (>= 0.4)
|
285
276
|
rack-test (2.1.0)
|
286
277
|
rack (>= 1.3)
|
287
278
|
radius (0.7.5)
|
288
|
-
rails (7.0.8.
|
289
|
-
actioncable (= 7.0.8.
|
290
|
-
actionmailbox (= 7.0.8.
|
291
|
-
actionmailer (= 7.0.8.
|
292
|
-
actionpack (= 7.0.8.
|
293
|
-
actiontext (= 7.0.8.
|
294
|
-
actionview (= 7.0.8.
|
295
|
-
activejob (= 7.0.8.
|
296
|
-
activemodel (= 7.0.8.
|
297
|
-
activerecord (= 7.0.8.
|
298
|
-
activestorage (= 7.0.8.
|
299
|
-
activesupport (= 7.0.8.
|
279
|
+
rails (7.0.8.6)
|
280
|
+
actioncable (= 7.0.8.6)
|
281
|
+
actionmailbox (= 7.0.8.6)
|
282
|
+
actionmailer (= 7.0.8.6)
|
283
|
+
actionpack (= 7.0.8.6)
|
284
|
+
actiontext (= 7.0.8.6)
|
285
|
+
actionview (= 7.0.8.6)
|
286
|
+
activejob (= 7.0.8.6)
|
287
|
+
activemodel (= 7.0.8.6)
|
288
|
+
activerecord (= 7.0.8.6)
|
289
|
+
activestorage (= 7.0.8.6)
|
290
|
+
activesupport (= 7.0.8.6)
|
300
291
|
bundler (>= 1.15.0)
|
301
|
-
railties (= 7.0.8.
|
292
|
+
railties (= 7.0.8.6)
|
302
293
|
rails-dom-testing (2.2.0)
|
303
294
|
activesupport (>= 5.0.0)
|
304
295
|
minitest
|
305
296
|
nokogiri (>= 1.6)
|
306
|
-
rails-html-sanitizer (1.6.
|
297
|
+
rails-html-sanitizer (1.6.1)
|
307
298
|
loofah (~> 2.21)
|
308
|
-
nokogiri (
|
299
|
+
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)
|
309
300
|
rails-observers (0.1.5)
|
310
301
|
activemodel (>= 4.0)
|
311
|
-
railties (7.0.8.
|
312
|
-
actionpack (= 7.0.8.
|
313
|
-
activesupport (= 7.0.8.
|
302
|
+
railties (7.0.8.6)
|
303
|
+
actionpack (= 7.0.8.6)
|
304
|
+
activesupport (= 7.0.8.6)
|
314
305
|
method_source
|
315
306
|
rake (>= 12.2)
|
316
307
|
thor (~> 1.0)
|
@@ -320,10 +311,10 @@ GEM
|
|
320
311
|
activerecord (>= 6.1.5)
|
321
312
|
activesupport (>= 6.1.5)
|
322
313
|
i18n
|
323
|
-
rdoc (6.
|
314
|
+
rdoc (6.8.1)
|
324
315
|
psych (>= 4.0.0)
|
325
316
|
regexp_parser (2.9.2)
|
326
|
-
reline (0.5.
|
317
|
+
reline (0.5.11)
|
327
318
|
io-console (~> 0.5)
|
328
319
|
responders (3.1.1)
|
329
320
|
actionpack (>= 5.2)
|
@@ -331,10 +322,10 @@ GEM
|
|
331
322
|
roadie (5.2.1)
|
332
323
|
css_parser (~> 1.4)
|
333
324
|
nokogiri (~> 1.15)
|
334
|
-
roadie-rails (3.
|
335
|
-
railties (>= 5.1, < 8.
|
325
|
+
roadie-rails (3.3.0)
|
326
|
+
railties (>= 5.1, < 8.1)
|
336
327
|
roadie (~> 5.0)
|
337
|
-
rspec-core (3.13.
|
328
|
+
rspec-core (3.13.2)
|
338
329
|
rspec-support (~> 3.13.0)
|
339
330
|
rspec-expectations (3.13.3)
|
340
331
|
diff-lcs (>= 1.2.0, < 2.0)
|
@@ -342,7 +333,7 @@ GEM
|
|
342
333
|
rspec-mocks (3.13.2)
|
343
334
|
diff-lcs (>= 1.2.0, < 2.0)
|
344
335
|
rspec-support (~> 3.13.0)
|
345
|
-
rspec-rails (7.0
|
336
|
+
rspec-rails (7.1.0)
|
346
337
|
actionpack (>= 7.0)
|
347
338
|
activesupport (>= 7.0)
|
348
339
|
railties (>= 7.0)
|
@@ -378,13 +369,13 @@ GEM
|
|
378
369
|
activesupport (>= 6.1)
|
379
370
|
sprockets (>= 3.0.0)
|
380
371
|
stringex (2.8.6)
|
381
|
-
stringio (3.1.
|
372
|
+
stringio (3.1.2)
|
382
373
|
temple (0.10.3)
|
383
374
|
terrapin (1.0.1)
|
384
375
|
climate_control
|
385
376
|
thor (1.3.2)
|
386
377
|
tilt (2.4.0)
|
387
|
-
timeout (0.4.
|
378
|
+
timeout (0.4.2)
|
388
379
|
trustygems (0.2.1)
|
389
380
|
rake
|
390
381
|
tzinfo (2.0.6)
|
@@ -403,31 +394,27 @@ GEM
|
|
403
394
|
|
404
395
|
PLATFORMS
|
405
396
|
aarch64-linux
|
406
|
-
aarch64-linux-gnu
|
407
397
|
aarch64-linux-musl
|
408
398
|
arm-linux
|
409
|
-
arm-linux-gnu
|
410
399
|
arm-linux-musl
|
411
400
|
arm64-darwin
|
412
401
|
x86-linux
|
413
|
-
x86-linux-gnu
|
414
402
|
x86-linux-musl
|
415
403
|
x86_64-darwin
|
416
404
|
x86_64-linux
|
417
|
-
x86_64-linux-gnu
|
418
405
|
x86_64-linux-musl
|
419
406
|
|
420
407
|
DEPENDENCIES
|
421
408
|
activestorage-validator
|
422
409
|
acts_as_list
|
423
410
|
database_cleaner
|
424
|
-
factory_bot_rails (= 6.4.
|
411
|
+
factory_bot_rails (= 6.4.4)
|
425
412
|
file_validators
|
426
413
|
launchy (~> 3.0.1)
|
427
414
|
mysql2
|
428
415
|
poltergeist (~> 1.18.1)
|
429
416
|
pry-byebug
|
430
|
-
psych (= 5.
|
417
|
+
psych (= 5.2.0)
|
431
418
|
rails-observers
|
432
419
|
ransack
|
433
420
|
rspec-rails
|
data/INSTALL.md
CHANGED
@@ -2,19 +2,21 @@
|
|
2
2
|
|
3
3
|
From within the directory containing your TrustyCMS instance:
|
4
4
|
|
5
|
-
1. Create a new Rails
|
5
|
+
1. Create a new Rails 7.0+ application (i.e. `rails new [project_name]`)
|
6
6
|
|
7
7
|
2. Add the following gems to your Gemfile:
|
8
|
-
|
9
|
-
|
8
|
+
|
9
|
+
- gem 'trusty-cms'
|
10
|
+
- gem 'rails-observers'
|
10
11
|
|
11
12
|
3. Run `bundle install`
|
12
13
|
|
13
14
|
4. Run the Trusty CMS generator to get the project into shape: `rails g trusty_cms [project_name]`.
|
14
|
-
|
15
|
+
- This will ask you if you want to replace a number of existing files (like application.rb); reply Y to all.
|
15
16
|
|
16
17
|
5. add config.extensions = [ :snippets, :clipped, :layouts, :multi_site ] to enable them in application.rb
|
17
18
|
|
18
19
|
7. Add utf8 encoding to your db.yml
|
19
|
-
|
20
|
-
6. Run `bundle exec rake db:setup`, `bundle exec rake
|
20
|
+
|
21
|
+
6. Run `bundle exec rake db:setup`, `bundle exec rake trusty_cms:install:migrations`, then
|
22
|
+
`bundle exec rake db:bootstrap`.
|
data/README.md
CHANGED
@@ -2,14 +2,15 @@
|
|
2
2
|
|
3
3
|
[](http://badge.fury.io/rb/trusty-cms)
|
4
4
|
|
5
|
-
TrustyCMS is a branch of Radiant CMS. Its goal is to pull the Radiant framework into Rails
|
5
|
+
TrustyCMS is a branch of Radiant CMS. Its goal is to pull the Radiant framework into Rails 7 with minimal changes to its
|
6
|
+
infrastructure.
|
6
7
|
|
7
8
|
TrustyCMS is a no-fluff, open source content management system designed for
|
8
9
|
small teams. It is similar to Textpattern or MovableType, but is a general
|
9
10
|
purpose content management system (not just a blogging engine). TrustyCMS is a
|
10
|
-
Rails engine and is built to be installed into an existing Rails
|
11
|
+
Rails engine and is built to be installed into an existing Rails 7 application as a gem.
|
11
12
|
|
12
|
-
|
13
|
+
CircleCI: [](https://circleci.com/gh/pgharts/trusty-cms/tree/master)
|
13
14
|
|
14
15
|
CodeClimate: [](https://codeclimate.com/github/codeclimate/codeclimate)
|
15
16
|
|
@@ -23,14 +24,14 @@ TrustyCMS features:
|
|
23
24
|
* Support for Markdown and Textile as well as traditional HTML (it's easy to
|
24
25
|
create other filters)
|
25
26
|
* An advanced plugin system
|
26
|
-
* Asset management
|
27
|
+
* Asset management & searching
|
27
28
|
* Serve multiple sites (domains) from a single instance
|
28
29
|
* Social sharing buttons
|
29
30
|
* Reusable bits of content (Snippets)
|
30
31
|
* Allows Rails controllers/actions to use Trusty CMS layouts as their "layout"
|
31
32
|
* Operates in two modes: dev and production depending on the URL
|
32
33
|
* A caching system which expires pages every 5 minutes
|
33
|
-
* Built using Ruby on Rails (version
|
34
|
+
* Built using Ruby on Rails (version 7)
|
34
35
|
|
35
36
|
## License
|
36
37
|
|
@@ -53,8 +54,8 @@ See the INSTALL.md file for more instructions.
|
|
53
54
|
Prerequisites:
|
54
55
|
|
55
56
|
* A Github account and Git ([Github has some really good instructions](https://help.github.com/articles/set-up-git))
|
56
|
-
* Ruby
|
57
|
-
* A Rails application (currently supports version
|
57
|
+
* Ruby 3.1 or higher
|
58
|
+
* A Rails application (currently supports version 7.0)
|
58
59
|
* Bundler
|
59
60
|
* MySQL
|
60
61
|
* [PhantomJS >= 1.8.1](https://github.com/teampoltergeist/poltergeist/tree/v1.5.0#installing-phantomjs)
|
@@ -65,9 +66,9 @@ Steps:
|
|
65
66
|
1. Clone your fork to your machine.
|
66
67
|
1. `cd` into the directory you just cloned into.
|
67
68
|
1. Follow the INSTALL.md instructions to setup an empty app with TrustyCMS installed. To modify TrustyCMS,
|
68
|
-
point your dependency to the local path of your fork.
|
69
|
+
point your dependency to the local path of your fork.
|
69
70
|
|
70
|
-
|
71
|
+
gem 'trusty-cms', path: '../trusty-cms'
|
71
72
|
|
72
73
|
1. Set up your databases in your Rails application:
|
73
74
|
|
@@ -80,9 +81,13 @@ point your dependency to the local path of your fork.
|
|
80
81
|
|
81
82
|
When you're ready to make a change:
|
82
83
|
|
83
|
-
1. Add the pgharts fork as a git remote called "upstream":
|
84
|
+
1. Add the pgharts fork as a git remote called "upstream":
|
85
|
+
`git remote add upstream https://github.com/pgharts/trusty-cms.git` so that you can keep up with changes that other
|
86
|
+
people make.
|
84
87
|
1. Fetch the remote you just added: `git fetch upstream`.
|
85
|
-
1. Start a new branch for the change you're going to make. Name it something having to do with the changes, like "
|
88
|
+
1. Start a new branch for the change you're going to make. Name it something having to do with the changes, like "
|
89
|
+
fix-queries" if you are going to try to fix some queries. Base this branch on `upstream/master` by running
|
90
|
+
`git checkout -b fix-queries upstream/master`.
|
86
91
|
1. Make your changes and commit them. Please include tests!
|
87
92
|
1. Run the tests and make sure they pass.
|
88
93
|
1. Push your changes to your github fork: `git push origin fix-queries`.
|
@@ -60,6 +60,19 @@ select {
|
|
60
60
|
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
|
61
61
|
}
|
62
62
|
|
63
|
+
select[multiple] {
|
64
|
+
height: auto;
|
65
|
+
|
66
|
+
option {
|
67
|
+
padding: 0.5em;
|
68
|
+
|
69
|
+
&:checked {
|
70
|
+
background-color: #e5e6e7;
|
71
|
+
font-weight: 700;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
63
76
|
label {
|
64
77
|
display: block;
|
65
78
|
}
|
@@ -5,7 +5,7 @@ class Admin::ConfigurationController < ApplicationController
|
|
5
5
|
# and the show and edit views determine what set of config values is shown and made editable.
|
6
6
|
|
7
7
|
before_action :initialize_config
|
8
|
-
|
8
|
+
before_action :authorize_role
|
9
9
|
only_allow_access_to :edit, :update,
|
10
10
|
when: [:admin],
|
11
11
|
denied_url: { controller: 'admin/configuration', action: 'show' },
|
@@ -1,7 +1,8 @@
|
|
1
1
|
class Admin::LayoutsController < Admin::ResourceController
|
2
2
|
paginate_models
|
3
|
+
before_action :authorize_role
|
3
4
|
only_allow_access_to :index, :show, :new, :create, :edit, :update, :remove, :destroy,
|
4
5
|
when: %i[designer admin],
|
5
6
|
denied_url: { controller: 'admin/pages', action: 'index' },
|
6
|
-
denied_message: 'You must have
|
7
|
+
denied_message: 'You must have at least editor privileges to perform this action.'
|
7
8
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'trusty_cms/resource_responses'
|
2
|
+
|
2
3
|
class Admin::ResourceController < ApplicationController
|
3
4
|
extend TrustyCms::ResourceResponses
|
4
5
|
|
@@ -95,6 +96,7 @@ class Admin::ResourceController < ApplicationController
|
|
95
96
|
def will_paginate_options
|
96
97
|
self.class.will_paginate_options || {}
|
97
98
|
end
|
99
|
+
|
98
100
|
helper_method :will_paginate_options
|
99
101
|
|
100
102
|
# a convenience method that returns true if paginate_models has been called on this controller class
|
@@ -102,6 +104,7 @@ class Admin::ResourceController < ApplicationController
|
|
102
104
|
def paginated?
|
103
105
|
self.class.paginated == true && params[:pp] != 'all'
|
104
106
|
end
|
107
|
+
|
105
108
|
helper_method :paginated?
|
106
109
|
|
107
110
|
# return a hash of page and per_page that can be used to build a will_paginate collection
|
@@ -145,7 +148,9 @@ class Admin::ResourceController < ApplicationController
|
|
145
148
|
def model
|
146
149
|
instance_variable_get("@#{model_symbol}") || load_model
|
147
150
|
end
|
151
|
+
|
148
152
|
alias :current_object :model
|
153
|
+
|
149
154
|
def model=(object)
|
150
155
|
instance_variable_set("@#{model_symbol}", object)
|
151
156
|
end
|
@@ -155,13 +160,15 @@ class Admin::ResourceController < ApplicationController
|
|
155
160
|
model_class.find(params[:id])
|
156
161
|
else
|
157
162
|
model_class.new
|
158
|
-
|
163
|
+
end
|
159
164
|
end
|
160
165
|
|
161
166
|
def models
|
162
167
|
instance_variable_get("@#{plural_model_symbol}") || load_models
|
163
168
|
end
|
169
|
+
|
164
170
|
alias :current_objects :models
|
171
|
+
|
165
172
|
def models=(objects)
|
166
173
|
instance_variable_set("@#{plural_model_symbol}", objects)
|
167
174
|
end
|
@@ -177,6 +184,7 @@ class Admin::ResourceController < ApplicationController
|
|
177
184
|
def plural_model_name
|
178
185
|
model_name.pluralize
|
179
186
|
end
|
187
|
+
|
180
188
|
alias :models_name :plural_model_name
|
181
189
|
|
182
190
|
def model_symbol
|
@@ -186,6 +194,7 @@ class Admin::ResourceController < ApplicationController
|
|
186
194
|
def plural_model_symbol
|
187
195
|
model_name.pluralize.underscore.intern
|
188
196
|
end
|
197
|
+
|
189
198
|
alias :models_symbol :plural_model_symbol
|
190
199
|
|
191
200
|
def humanized_model_name
|
@@ -1,7 +1,8 @@
|
|
1
1
|
class Admin::SnippetsController < Admin::ResourceController
|
2
2
|
paginate_models
|
3
|
+
before_action :authorize_role
|
3
4
|
only_allow_access_to :index, :show, :new, :create, :edit, :update, :remove, :destroy,
|
4
5
|
when: %i[designer admin],
|
5
6
|
denied_url: { controller: 'admin/pages', action: 'index' },
|
6
|
-
denied_message: 'You must have
|
7
|
+
denied_message: 'You must have at least editor privileges to perform this action.'
|
7
8
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
class Admin::UsersController < Admin::ResourceController
|
2
2
|
paginate_models
|
3
|
+
before_action :authorize_role
|
3
4
|
only_allow_access_to :index, :show, :new, :create, :edit, :update, :remove, :destroy,
|
4
5
|
when: :admin,
|
5
6
|
denied_url: { controller: 'pages', action: 'index' },
|
@@ -48,7 +49,7 @@ class Admin::UsersController < Admin::ResourceController
|
|
48
49
|
|
49
50
|
def user_params
|
50
51
|
params.require(:user).permit(:first_name, :last_name, :admin, :designer,
|
51
|
-
:password, :password_confirmation, :email, :site_id, :notes)
|
52
|
+
:password, :password_confirmation, :email, :site_id, :notes, site_ids: [])
|
52
53
|
end
|
53
54
|
|
54
55
|
def announce_cannot_delete_self
|