trusty-cms 7.0.2 → 7.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/Gemfile +2 -2
- data/Gemfile.lock +89 -102
- data/INSTALL.md +8 -6
- data/README.md +123 -15
- data/app/assets/javascripts/admin/validations/scheduled_status_validation.js +60 -0
- data/app/assets/stylesheets/admin/main.scss +2 -1
- data/app/assets/stylesheets/admin/partials/_datetime_input.scss +5 -0
- data/app/assets/stylesheets/admin/partials/_forms.scss +13 -0
- data/app/assets/stylesheets/admin/partials/_messages.scss +4 -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/controllers/page_status_controller.rb +61 -0
- data/app/controllers/site_controller.rb +0 -15
- data/app/helpers/admin/pages_helper.rb +0 -5
- data/app/helpers/admin/users_helper.rb +2 -1
- data/app/helpers/application_helper.rb +2 -1
- data/app/models/admins_site.rb +6 -0
- data/app/models/page.rb +3 -10
- data/app/models/site.rb +2 -0
- data/app/models/status.rb +1 -5
- 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 +15 -6
- 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/initializers/devise.rb +1 -1
- data/config/locales/en.yml +11 -9
- data/config/routes.rb +1 -0
- data/db/migrate/20241108172942_create_site_users.rb +8 -0
- data/lib/login_system.rb +15 -15
- 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 +16 -6
- data/app/users/_choose_site.html.haml +0 -4
- /data/app/assets/stylesheets/admin/partials/{_dateinput.scss → _date_input.scss} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '05933f41895532d7fe76ff1dfef0d58a2ca32616cc65d1371de837b8205fb038'
|
4
|
+
data.tar.gz: b0fb2ed52eba017ff08af74846e4e299fd21307f740954004002097a9279dbfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 863fe6620bddab68ac18164ba50a1b60e785f00efdfd8a16f907045d2f5fe5fa372b30352c3a7ea4e13bf89200823f3fc181ee4937a49e7f9d3d70bcf9338740
|
7
|
+
data.tar.gz: 16f1007d43c8ab0f8c52f36d1d90dae8d9652caaa0ad1f7e55b7a6d6699b1cdff6ab1e6f5ec059270e434bdb9d119449351f608dbd3a115c49b0c3d786a1f7f1
|
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.7)
|
43
|
+
actionpack (= 7.0.8.7)
|
44
|
+
activesupport (= 7.0.8.7)
|
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.7)
|
48
|
+
actionpack (= 7.0.8.7)
|
49
|
+
activejob (= 7.0.8.7)
|
50
|
+
activerecord (= 7.0.8.7)
|
51
|
+
activestorage (= 7.0.8.7)
|
52
|
+
activesupport (= 7.0.8.7)
|
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.7)
|
58
|
+
actionpack (= 7.0.8.7)
|
59
|
+
actionview (= 7.0.8.7)
|
60
|
+
activejob (= 7.0.8.7)
|
61
|
+
activesupport (= 7.0.8.7)
|
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.7)
|
68
|
+
actionview (= 7.0.8.7)
|
69
|
+
activesupport (= 7.0.8.7)
|
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.7)
|
75
|
+
actionpack (= 7.0.8.7)
|
76
|
+
activerecord (= 7.0.8.7)
|
77
|
+
activestorage (= 7.0.8.7)
|
78
|
+
activesupport (= 7.0.8.7)
|
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.7)
|
82
|
+
activesupport (= 7.0.8.7)
|
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.7)
|
88
|
+
activesupport (= 7.0.8.7)
|
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.7)
|
91
|
+
activesupport (= 7.0.8.7)
|
92
|
+
activerecord (7.0.8.7)
|
93
|
+
activemodel (= 7.0.8.7)
|
94
|
+
activesupport (= 7.0.8.7)
|
95
|
+
activestorage (7.0.8.7)
|
96
|
+
actionpack (= 7.0.8.7)
|
97
|
+
activejob (= 7.0.8.7)
|
98
|
+
activerecord (= 7.0.8.7)
|
99
|
+
activesupport (= 7.0.8.7)
|
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.7)
|
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.4)
|
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.
|
246
|
+
nokogiri (1.17.2-aarch64-linux)
|
256
247
|
racc (~> 1.4)
|
257
|
-
nokogiri (1.
|
248
|
+
nokogiri (1.17.2-arm-linux)
|
258
249
|
racc (~> 1.4)
|
259
|
-
nokogiri (1.
|
250
|
+
nokogiri (1.17.2-arm64-darwin)
|
260
251
|
racc (~> 1.4)
|
261
|
-
nokogiri (1.
|
252
|
+
nokogiri (1.17.2-x86-linux)
|
262
253
|
racc (~> 1.4)
|
263
|
-
nokogiri (1.
|
254
|
+
nokogiri (1.17.2-x86_64-darwin)
|
264
255
|
racc (~> 1.4)
|
265
|
-
nokogiri (1.
|
256
|
+
nokogiri (1.17.2-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.7)
|
280
|
+
actioncable (= 7.0.8.7)
|
281
|
+
actionmailbox (= 7.0.8.7)
|
282
|
+
actionmailer (= 7.0.8.7)
|
283
|
+
actionpack (= 7.0.8.7)
|
284
|
+
actiontext (= 7.0.8.7)
|
285
|
+
actionview (= 7.0.8.7)
|
286
|
+
activejob (= 7.0.8.7)
|
287
|
+
activemodel (= 7.0.8.7)
|
288
|
+
activerecord (= 7.0.8.7)
|
289
|
+
activestorage (= 7.0.8.7)
|
290
|
+
activesupport (= 7.0.8.7)
|
300
291
|
bundler (>= 1.15.0)
|
301
|
-
railties (= 7.0.8.
|
292
|
+
railties (= 7.0.8.7)
|
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.2)
|
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.7)
|
303
|
+
actionpack (= 7.0.8.7)
|
304
|
+
activesupport (= 7.0.8.7)
|
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
|
[![Gem Version](https://badge.fury.io/rb/trusty-cms.svg)](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: [![CircleCI](https://circleci.com/gh/pgharts/trusty-cms/tree/master.svg?style=shield)](https://circleci.com/gh/pgharts/trusty-cms/tree/master)
|
13
14
|
|
14
15
|
CodeClimate: [![Code Climate](https://codeclimate.com/github/codeclimate/codeclimate/badges/gpa.svg)](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
|
|
@@ -39,22 +40,20 @@ codebase are copyright (c) John W. Long and Sean Cribbs; anything after the
|
|
39
40
|
fork is copyright (c) Pittsburgh Cultural Trust. A copy of the MIT license can
|
40
41
|
be found in the LICENSE file.
|
41
42
|
|
42
|
-
## Installation and Setup
|
43
|
+
## Installation and Setup
|
43
44
|
|
44
45
|
TrustyCMS is a traditional Ruby on Rails engine, meaning that you can
|
45
46
|
configure and run it the way you would a normal gem, like [Devise](https://github.com/plataformatec/devise).
|
46
47
|
|
47
48
|
See the INSTALL.md file for more instructions.
|
48
49
|
|
49
|
-
### Installation
|
50
|
-
|
51
|
-
#### Setup
|
50
|
+
### Installation
|
52
51
|
|
53
52
|
Prerequisites:
|
54
53
|
|
55
54
|
* 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
|
55
|
+
* Ruby 3.1 or higher
|
56
|
+
* A Rails application (currently supports version 7.0)
|
58
57
|
* Bundler
|
59
58
|
* MySQL
|
60
59
|
* [PhantomJS >= 1.8.1](https://github.com/teampoltergeist/poltergeist/tree/v1.5.0#installing-phantomjs)
|
@@ -65,9 +64,9 @@ Steps:
|
|
65
64
|
1. Clone your fork to your machine.
|
66
65
|
1. `cd` into the directory you just cloned into.
|
67
66
|
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.
|
67
|
+
point your dependency to the local path of your fork.
|
69
68
|
|
70
|
-
|
69
|
+
gem 'trusty-cms', path: '../trusty-cms'
|
71
70
|
|
72
71
|
1. Set up your databases in your Rails application:
|
73
72
|
|
@@ -78,11 +77,120 @@ point your dependency to the local path of your fork.
|
|
78
77
|
|
79
78
|
rspec
|
80
79
|
|
80
|
+
|
81
|
+
### Page Status Refresh Setup
|
82
|
+
|
83
|
+
To ensure **Scheduled Pages** automatically update their status to **Published** after their designated **Publish Date & Time**, follow these steps to set up an automated refresh using **AWS Lambda** and **EventBridge**.
|
84
|
+
|
85
|
+
**1. Generate a Bearer Token**
|
86
|
+
Open a Rails console and run the following command:
|
87
|
+
```bash
|
88
|
+
rails c
|
89
|
+
```
|
90
|
+
Then generate a token:
|
91
|
+
```ruby
|
92
|
+
SecureRandom.base58(24)
|
93
|
+
```
|
94
|
+
|
95
|
+
**2. Store the Token in Rails Credentials**
|
96
|
+
Run the following command to edit your credentials:
|
97
|
+
```bash
|
98
|
+
bin/rails encrypted:edit config/credentials.yml.enc
|
99
|
+
```
|
100
|
+
Add the token to your credentials:
|
101
|
+
```yaml
|
102
|
+
trusty_cms:
|
103
|
+
page_status_bearer_token: '<your bearer token>'
|
104
|
+
```
|
105
|
+
|
106
|
+
**3. Create a Ruby Lambda Function in AWS**
|
107
|
+
- Log into **AWS Lambda** and create a **new Ruby Lambda function**.
|
108
|
+
- Note the **Ruby version** used, as you'll need it locally.
|
109
|
+
- Use [rbenv](https://github.com/rbenv/rbenv) to manage the Ruby version locally:
|
110
|
+
```bash
|
111
|
+
rbenv install 3.3.0
|
112
|
+
rbenv local 3.3.0
|
113
|
+
```
|
114
|
+
|
115
|
+
**4. Write the Lambda Function Code**
|
116
|
+
In your local development environment:
|
117
|
+
- Create a new folder and open it in your IDE.
|
118
|
+
- Save the following code in a file named `lambda_handler.rb`:
|
119
|
+
|
120
|
+
```ruby
|
121
|
+
require 'httparty'
|
122
|
+
|
123
|
+
def lambda_handler(event:, context:)
|
124
|
+
uri = ENV['API_ENDPOINT']
|
125
|
+
token = ENV['BEARER_TOKEN']
|
126
|
+
|
127
|
+
response = HTTParty.post(
|
128
|
+
uri,
|
129
|
+
headers: {
|
130
|
+
'Content-Type': 'application/json',
|
131
|
+
'Authorization': "Bearer #{token}"
|
132
|
+
}
|
133
|
+
)
|
134
|
+
|
135
|
+
if response.success?
|
136
|
+
puts "Success: #{response.body}"
|
137
|
+
else
|
138
|
+
puts "Error: #{response.code} - #{response.message}"
|
139
|
+
end
|
140
|
+
end
|
141
|
+
```
|
142
|
+
|
143
|
+
**5. Install Dependencies**
|
144
|
+
Run the following commands in your terminal:
|
145
|
+
```bash
|
146
|
+
gem install bundler
|
147
|
+
bundle init
|
148
|
+
```
|
149
|
+
Add the dependency to your `Gemfile`:
|
150
|
+
```ruby
|
151
|
+
gem 'httparty'
|
152
|
+
```
|
153
|
+
Install dependencies locally:
|
154
|
+
```bash
|
155
|
+
bundle config set --local path 'vendor/bundle'
|
156
|
+
bundle install
|
157
|
+
```
|
158
|
+
|
159
|
+
**6. Package the Lambda Function**
|
160
|
+
Archive your function and dependencies:
|
161
|
+
```bash
|
162
|
+
zip -r lambda_package.zip .
|
163
|
+
```
|
164
|
+
|
165
|
+
**7. Upload to AWS Lambda**
|
166
|
+
- In **AWS Lambda**, open your function.
|
167
|
+
- Select **Upload From > .zip file**.
|
168
|
+
- Upload the `lambda_package.zip` file.
|
169
|
+
|
170
|
+
**8. Configure Environment Variables**
|
171
|
+
In the AWS Lambda Configuration:
|
172
|
+
- Go to **Environment Variables** > **Edit**.
|
173
|
+
- Add the following:
|
174
|
+
- `API_ENDPOINT`: `<your-url>/page-status/refresh`
|
175
|
+
- `BEARER_TOKEN`: `<your bearer token>`
|
176
|
+
|
177
|
+
**9. Set Up EventBridge Trigger**
|
178
|
+
- In **Configuration Settings > Triggers**, create a **new EventBridge Trigger**.
|
179
|
+
- Set the **Schedule** to match your desired **page status refresh frequency**.
|
180
|
+
|
181
|
+
Your setup is now complete, and **Scheduled Pages** will automatically update their status via the AWS Lambda and EventBridge integration.
|
182
|
+
|
183
|
+
### Contributing to TrustyCMS
|
184
|
+
|
81
185
|
When you're ready to make a change:
|
82
186
|
|
83
|
-
1. Add the pgharts fork as a git remote called "upstream":
|
187
|
+
1. Add the pgharts fork as a git remote called "upstream":
|
188
|
+
`git remote add upstream https://github.com/pgharts/trusty-cms.git` so that you can keep up with changes that other
|
189
|
+
people make.
|
84
190
|
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 "
|
191
|
+
1. Start a new branch for the change you're going to make. Name it something having to do with the changes, like "
|
192
|
+
fix-queries" if you are going to try to fix some queries. Base this branch on `upstream/master` by running
|
193
|
+
`git checkout -b fix-queries upstream/master`.
|
86
194
|
1. Make your changes and commit them. Please include tests!
|
87
195
|
1. Run the tests and make sure they pass.
|
88
196
|
1. Push your changes to your github fork: `git push origin fix-queries`.
|