trusty-cms 5.6.0 → 5.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +69 -63
- data/app/controllers/application_controller.rb +0 -1
- data/app/controllers/site_controller.rb +5 -0
- data/app/models/site.rb +1 -0
- data/app/models/trusty_cms/config.rb +2 -1
- data/config/application.rb +2 -4
- data/config/initializers/trusty_cms_config.rb +12 -13
- data/lib/configuration_extensions/configuration_extensions.rb +10 -9
- data/lib/generators/extension/templates/extension.rb +0 -1
- data/lib/generators/language_extension/templates/extension.rb +0 -1
- data/lib/generators/trusty_cms/templates/application.rb.erb +4 -7
- data/lib/trusty_cms/extension_loader.rb +12 -4
- data/lib/trusty_cms/initializer.rb +1 -1
- data/lib/trusty_cms.rb +2 -1
- data/spec/dummy/config/application.rb +8 -8
- data/spec/dummy/config/initializers/trusty_cms_config.rb +20 -17
- data/spec/dummy/db/schema.rb +73 -44
- data/trusty_cms.gemspec +16 -16
- data/vendor/extensions/multi-site-extension/multi_site_extension.rb +1 -5
- data/yarn.lock +61 -15
- metadata +38 -38
- /data/vendor/extensions/clipped-extension/lib/{trusty-clipped-extension.rb → trusty_cms_clipped_extension.rb} +0 -0
- /data/vendor/extensions/layouts-extension/lib/{trusty-layouts-extension.rb → trusty_cms_layouts_extension.rb} +0 -0
- /data/vendor/extensions/multi-site-extension/lib/{trusty-multi-site-extension.rb → trusty_cms_multi_site_extension.rb} +0 -0
- /data/vendor/extensions/snippets-extension/lib/{trusty-snippets-extension.rb → trusty_cms_snippets_extension.rb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8335ccbe0b9f13c382765aea13eab9c77b06a6a6284610a0353753bd3ad04cf8
|
4
|
+
data.tar.gz: ac210d21758eb07bb95ceddd8bf693cde011a37516e55a1e4953009559b84d5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4aa825126e6e9eff94a59d842a7c13d9b7a74cdc3995b390a9f18ad8bf28c664eb3cd206c696c608d9baaa3036caa5eb5f648f620d956cfee41f423d11b94afd
|
7
|
+
data.tar.gz: 3db3a0a1dfbfc251d40ff2f094c4877f5e70d5f610bfe0d6fa2a26be4d22108a60e9b84fe843b6f88ada69ddee977e7fd13a3c85758ca31f947e939562927b3d
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
trusty-cms (5.6.
|
4
|
+
trusty-cms (5.6.1)
|
5
5
|
RedCloth (= 4.3.2)
|
6
6
|
activestorage-validator
|
7
7
|
acts_as_list (>= 0.9.5, < 1.2.0)
|
@@ -35,67 +35,73 @@ GEM
|
|
35
35
|
remote: https://rubygems.org/
|
36
36
|
specs:
|
37
37
|
RedCloth (4.3.2)
|
38
|
-
actioncable (
|
39
|
-
actionpack (=
|
40
|
-
activesupport (=
|
38
|
+
actioncable (7.0.8)
|
39
|
+
actionpack (= 7.0.8)
|
40
|
+
activesupport (= 7.0.8)
|
41
41
|
nio4r (~> 2.0)
|
42
42
|
websocket-driver (>= 0.6.1)
|
43
|
-
actionmailbox (
|
44
|
-
actionpack (=
|
45
|
-
activejob (=
|
46
|
-
activerecord (=
|
47
|
-
activestorage (=
|
48
|
-
activesupport (=
|
43
|
+
actionmailbox (7.0.8)
|
44
|
+
actionpack (= 7.0.8)
|
45
|
+
activejob (= 7.0.8)
|
46
|
+
activerecord (= 7.0.8)
|
47
|
+
activestorage (= 7.0.8)
|
48
|
+
activesupport (= 7.0.8)
|
49
49
|
mail (>= 2.7.1)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
50
|
+
net-imap
|
51
|
+
net-pop
|
52
|
+
net-smtp
|
53
|
+
actionmailer (7.0.8)
|
54
|
+
actionpack (= 7.0.8)
|
55
|
+
actionview (= 7.0.8)
|
56
|
+
activejob (= 7.0.8)
|
57
|
+
activesupport (= 7.0.8)
|
55
58
|
mail (~> 2.5, >= 2.5.4)
|
59
|
+
net-imap
|
60
|
+
net-pop
|
61
|
+
net-smtp
|
56
62
|
rails-dom-testing (~> 2.0)
|
57
|
-
actionpack (
|
58
|
-
actionview (=
|
59
|
-
activesupport (=
|
60
|
-
rack (~> 2.0, >= 2.
|
63
|
+
actionpack (7.0.8)
|
64
|
+
actionview (= 7.0.8)
|
65
|
+
activesupport (= 7.0.8)
|
66
|
+
rack (~> 2.0, >= 2.2.4)
|
61
67
|
rack-test (>= 0.6.3)
|
62
68
|
rails-dom-testing (~> 2.0)
|
63
69
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
64
|
-
actiontext (
|
65
|
-
actionpack (=
|
66
|
-
activerecord (=
|
67
|
-
activestorage (=
|
68
|
-
activesupport (=
|
70
|
+
actiontext (7.0.8)
|
71
|
+
actionpack (= 7.0.8)
|
72
|
+
activerecord (= 7.0.8)
|
73
|
+
activestorage (= 7.0.8)
|
74
|
+
activesupport (= 7.0.8)
|
75
|
+
globalid (>= 0.6.0)
|
69
76
|
nokogiri (>= 1.8.5)
|
70
|
-
actionview (
|
71
|
-
activesupport (=
|
77
|
+
actionview (7.0.8)
|
78
|
+
activesupport (= 7.0.8)
|
72
79
|
builder (~> 3.1)
|
73
80
|
erubi (~> 1.4)
|
74
81
|
rails-dom-testing (~> 2.0)
|
75
82
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
76
|
-
activejob (
|
77
|
-
activesupport (=
|
83
|
+
activejob (7.0.8)
|
84
|
+
activesupport (= 7.0.8)
|
78
85
|
globalid (>= 0.3.6)
|
79
|
-
activemodel (
|
80
|
-
activesupport (=
|
81
|
-
activerecord (
|
82
|
-
activemodel (=
|
83
|
-
activesupport (=
|
84
|
-
activestorage (
|
85
|
-
actionpack (=
|
86
|
-
activejob (=
|
87
|
-
activerecord (=
|
88
|
-
activesupport (=
|
86
|
+
activemodel (7.0.8)
|
87
|
+
activesupport (= 7.0.8)
|
88
|
+
activerecord (7.0.8)
|
89
|
+
activemodel (= 7.0.8)
|
90
|
+
activesupport (= 7.0.8)
|
91
|
+
activestorage (7.0.8)
|
92
|
+
actionpack (= 7.0.8)
|
93
|
+
activejob (= 7.0.8)
|
94
|
+
activerecord (= 7.0.8)
|
95
|
+
activesupport (= 7.0.8)
|
89
96
|
marcel (~> 1.0)
|
90
97
|
mini_mime (>= 1.1.0)
|
91
98
|
activestorage-validator (0.3.0)
|
92
99
|
rails (>= 6.1.0)
|
93
|
-
activesupport (
|
100
|
+
activesupport (7.0.8)
|
94
101
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
95
102
|
i18n (>= 1.6, < 2)
|
96
103
|
minitest (>= 5.1)
|
97
104
|
tzinfo (~> 2.0)
|
98
|
-
zeitwerk (~> 2.3)
|
99
105
|
acts_as_list (1.1.0)
|
100
106
|
activerecord (>= 4.2)
|
101
107
|
acts_as_tree (2.9.1)
|
@@ -141,7 +147,7 @@ GEM
|
|
141
147
|
diff-lcs (1.5.0)
|
142
148
|
docile (1.4.0)
|
143
149
|
erubi (1.12.0)
|
144
|
-
execjs (2.
|
150
|
+
execjs (2.9.1)
|
145
151
|
factory_bot (6.2.1)
|
146
152
|
activesupport (>= 5.0.0)
|
147
153
|
factory_bot_rails (6.2.0)
|
@@ -180,7 +186,7 @@ GEM
|
|
180
186
|
addressable (~> 2.8)
|
181
187
|
libv8-node (16.10.0.0-x86_64-darwin)
|
182
188
|
libv8-node (16.10.0.0-x86_64-linux)
|
183
|
-
loofah (2.21.
|
189
|
+
loofah (2.21.4)
|
184
190
|
crass (~> 1.0.2)
|
185
191
|
nokogiri (>= 1.12.0)
|
186
192
|
mail (2.8.1)
|
@@ -201,14 +207,14 @@ GEM
|
|
201
207
|
multi_xml (0.6.0)
|
202
208
|
multipart-post (2.2.3)
|
203
209
|
mysql2 (0.5.5)
|
204
|
-
net-imap (0.
|
210
|
+
net-imap (0.4.1)
|
205
211
|
date
|
206
212
|
net-protocol
|
207
213
|
net-pop (0.1.2)
|
208
214
|
net-protocol
|
209
215
|
net-protocol (0.2.1)
|
210
216
|
timeout
|
211
|
-
net-smtp (0.
|
217
|
+
net-smtp (0.4.0)
|
212
218
|
net-protocol
|
213
219
|
nio4r (2.5.9)
|
214
220
|
nokogiri (1.15.4-x86_64-darwin)
|
@@ -236,21 +242,20 @@ GEM
|
|
236
242
|
rack-test (2.1.0)
|
237
243
|
rack (>= 1.3)
|
238
244
|
radius (0.7.5)
|
239
|
-
rails (
|
240
|
-
actioncable (=
|
241
|
-
actionmailbox (=
|
242
|
-
actionmailer (=
|
243
|
-
actionpack (=
|
244
|
-
actiontext (=
|
245
|
-
actionview (=
|
246
|
-
activejob (=
|
247
|
-
activemodel (=
|
248
|
-
activerecord (=
|
249
|
-
activestorage (=
|
250
|
-
activesupport (=
|
245
|
+
rails (7.0.8)
|
246
|
+
actioncable (= 7.0.8)
|
247
|
+
actionmailbox (= 7.0.8)
|
248
|
+
actionmailer (= 7.0.8)
|
249
|
+
actionpack (= 7.0.8)
|
250
|
+
actiontext (= 7.0.8)
|
251
|
+
actionview (= 7.0.8)
|
252
|
+
activejob (= 7.0.8)
|
253
|
+
activemodel (= 7.0.8)
|
254
|
+
activerecord (= 7.0.8)
|
255
|
+
activestorage (= 7.0.8)
|
256
|
+
activesupport (= 7.0.8)
|
251
257
|
bundler (>= 1.15.0)
|
252
|
-
railties (=
|
253
|
-
sprockets-rails (>= 2.0.0)
|
258
|
+
railties (= 7.0.8)
|
254
259
|
rails-dom-testing (2.2.0)
|
255
260
|
activesupport (>= 5.0.0)
|
256
261
|
minitest
|
@@ -260,12 +265,13 @@ GEM
|
|
260
265
|
nokogiri (~> 1.14)
|
261
266
|
rails-observers (0.1.5)
|
262
267
|
activemodel (>= 4.0)
|
263
|
-
railties (
|
264
|
-
actionpack (=
|
265
|
-
activesupport (=
|
268
|
+
railties (7.0.8)
|
269
|
+
actionpack (= 7.0.8)
|
270
|
+
activesupport (= 7.0.8)
|
266
271
|
method_source
|
267
272
|
rake (>= 12.2)
|
268
273
|
thor (~> 1.0)
|
274
|
+
zeitwerk (~> 2.5)
|
269
275
|
rake (13.0.6)
|
270
276
|
rdoc (6.5.0)
|
271
277
|
psych (>= 4.0.0)
|
@@ -344,7 +350,7 @@ GEM
|
|
344
350
|
will_paginate (4.0.0)
|
345
351
|
xpath (3.2.0)
|
346
352
|
nokogiri (~> 1.8)
|
347
|
-
zeitwerk (2.6.
|
353
|
+
zeitwerk (2.6.12)
|
348
354
|
|
349
355
|
PLATFORMS
|
350
356
|
x86_64-darwin-18
|
@@ -371,4 +377,4 @@ DEPENDENCIES
|
|
371
377
|
trustygems (~> 0.2.0)
|
372
378
|
|
373
379
|
BUNDLED WITH
|
374
|
-
2.4.
|
380
|
+
2.4.13
|
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'trusty_cms/pagination/controller'
|
2
|
+
require 'will_paginate/array'
|
3
|
+
|
2
4
|
class SiteController < ApplicationController
|
3
5
|
include TrustyCms::Pagination::Controller
|
4
6
|
|
@@ -42,16 +44,19 @@ class SiteController < ApplicationController
|
|
42
44
|
def cacheable_request?
|
43
45
|
(request.head? || request.get?) && live?
|
44
46
|
end
|
47
|
+
|
45
48
|
# hide_action :cacheable_request?
|
46
49
|
|
47
50
|
def set_expiry(time, options = {})
|
48
51
|
expires_in time, options
|
49
52
|
end
|
53
|
+
|
50
54
|
# hide_action :set_expiry
|
51
55
|
|
52
56
|
def set_etag(val)
|
53
57
|
headers['ETag'] = val
|
54
58
|
end
|
59
|
+
|
55
60
|
# hide_action :set_expiry
|
56
61
|
|
57
62
|
private
|
data/app/models/site.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# The site class includes - in find_for_host - some key retrieval and creation logic that is called from ApplicationController to set the current site context.
|
2
2
|
# Otherwise it's just another Trusty data model.
|
3
|
+
require 'acts_as_list'
|
3
4
|
|
4
5
|
class Site < ActiveRecord::Base
|
5
6
|
acts_as_list
|
@@ -81,7 +81,8 @@ module TrustyCms
|
|
81
81
|
TrustyCms::Config.initialize_cache
|
82
82
|
end
|
83
83
|
TrustyCms::Config.initialize_cache if TrustyCms::Config.stale_cache?
|
84
|
-
Rails.cache.read('TrustyCms::Config')[key]
|
84
|
+
# Rails.cache.read('TrustyCms::Config')[key]
|
85
|
+
# TODO: Do we need this line?
|
85
86
|
end
|
86
87
|
end
|
87
88
|
end
|
data/config/application.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require_relative 'boot'
|
2
2
|
|
3
3
|
require 'rails/all'
|
4
4
|
require 'acts_as_tree'
|
@@ -18,8 +18,6 @@ module TrustyCms
|
|
18
18
|
class Application < Rails::Application
|
19
19
|
include TrustyCms::Initializer
|
20
20
|
config.active_record.whitelist_attributes = true
|
21
|
-
config.autoload_paths += %W(#{config.root}/lib)
|
22
|
-
config.eager_load_paths << Rails.root.join('lib')
|
23
21
|
|
24
22
|
# Enable the asset pipeline
|
25
23
|
config.assets.enabled = true
|
@@ -80,7 +78,7 @@ module TrustyCms
|
|
80
78
|
end
|
81
79
|
config.after_initialize do
|
82
80
|
extension_loader.load_extensions
|
83
|
-
extension_loader.
|
81
|
+
extension_loader.load_extension_initializers
|
84
82
|
|
85
83
|
extension_loader.activate_extensions # also calls initialize_views
|
86
84
|
# config.add_controller_paths(extension_loader.paths(:controller))
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'multi_site/engine'
|
2
|
-
require 'clipped/engine'
|
3
1
|
Rails.application.reloader.to_prepare do
|
4
2
|
TrustyCms.config do |config|
|
5
3
|
config.define 'admin.title', default: 'TrustyCms CMS'
|
@@ -22,18 +20,18 @@ Rails.application.reloader.to_prepare do
|
|
22
20
|
|
23
21
|
TrustyCms.config do |config|
|
24
22
|
config.namespace 'paperclip' do |pc|
|
25
|
-
pc.define 'url',
|
26
|
-
pc.define 'path',
|
23
|
+
pc.define 'url', default: '/system/:attachment/:id/:style/:basename:no_original_style.:extension', allow_change: true
|
24
|
+
pc.define 'path', default: ':rails_root/public/system/:attachment/:id/:style/:basename:no_original_style.:extension', allow_change: true
|
27
25
|
pc.define 'skip_filetype_validation', default: true, type: :boolean
|
28
26
|
pc.define 'storage', default: 'filesystem',
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
27
|
+
select_from: {
|
28
|
+
'File System' => 'filesystem',
|
29
|
+
'Amazon S3' => 'fog',
|
30
|
+
'Google Storage' => 'fog',
|
31
|
+
'Rackspace Cloud Files' => 'fog',
|
32
|
+
},
|
33
|
+
allow_blank: false,
|
34
|
+
allow_display: false
|
37
35
|
|
38
36
|
pc.namespace 'fog' do |fog|
|
39
37
|
fog.define 'provider', select_from: {
|
@@ -74,7 +72,8 @@ Rails.application.reloader.to_prepare do
|
|
74
72
|
assets.define 'create_video_thumbnails?', default: 'true'
|
75
73
|
assets.define 'create_pdf_thumbnails?', default: 'true'
|
76
74
|
|
77
|
-
assets.namespace 'thumbnails' do |thumbs|
|
75
|
+
assets.namespace 'thumbnails' do |thumbs|
|
76
|
+
# NB :icon and :thumbnail are already defined as fixed formats for use in the admin interface and can't be changed
|
78
77
|
thumbs.define 'image', default: 'normal:size=640x640>|small:size=320x320>'
|
79
78
|
thumbs.define 'video', default: 'normal:size=640x640>,format=jpg|small:size=320x320>,format=jpg'
|
80
79
|
thumbs.define 'pdf', default: 'normal:size=640x640>,format=jpg|small:size=320x320>,format=jpg'
|
@@ -14,7 +14,7 @@ module TrustyCms
|
|
14
14
|
# config['other.thing'] = 'nothing'
|
15
15
|
# end
|
16
16
|
#
|
17
|
-
def config
|
17
|
+
def config # method must be defined before any initializers run
|
18
18
|
yield TrustyCms::Config if block_given?
|
19
19
|
TrustyCms::Config
|
20
20
|
end
|
@@ -33,6 +33,7 @@ module TrustyCms
|
|
33
33
|
def root
|
34
34
|
Pathname.new(TRUSTY_CMS_ROOT) if defined?(TRUSTY_CMS_ROOT)
|
35
35
|
end
|
36
|
+
|
36
37
|
def boot!
|
37
38
|
unless booted?
|
38
39
|
preinitialize
|
@@ -46,12 +47,12 @@ module TrustyCms
|
|
46
47
|
|
47
48
|
def pick_boot
|
48
49
|
case
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
50
|
+
when app?
|
51
|
+
AppBoot.new
|
52
|
+
when vendor?
|
53
|
+
VendorBoot.new
|
54
|
+
else
|
55
|
+
GemBoot.new
|
55
56
|
end
|
56
57
|
end
|
57
58
|
|
@@ -77,7 +78,6 @@ module TrustyCms
|
|
77
78
|
end
|
78
79
|
end
|
79
80
|
|
80
|
-
|
81
81
|
class Rails::Application::Configuration
|
82
82
|
|
83
83
|
# The TrustyCms::Configuration class extends Rails::Configuration with three purposes:
|
@@ -132,7 +132,8 @@ class Rails::Application::Configuration
|
|
132
132
|
@extension_list ||= extensions ? expand_and_check(extensions) : available_extensions
|
133
133
|
end
|
134
134
|
|
135
|
-
def expand_and_check(extension_list)
|
135
|
+
def expand_and_check(extension_list)
|
136
|
+
#:nodoc
|
136
137
|
missing_extensions = extension_list - [:all] - available_extensions
|
137
138
|
raise LoadError, "These configured extensions have not been found: #{missing_extensions.to_sentence}" if missing_extensions.any?
|
138
139
|
if m = extension_list.index(:all)
|
@@ -30,7 +30,7 @@ module TrustyCms
|
|
30
30
|
|
31
31
|
# Initialize extension paths
|
32
32
|
config.initialize_extension_paths
|
33
|
-
extension_loader = ExtensionLoader.instance {|l| l.initializer = self }
|
33
|
+
extension_loader = ExtensionLoader.instance { |l| l.initializer = self }
|
34
34
|
extension_loader.paths(:load).reverse_each do |path, value|
|
35
35
|
config.autoload_paths.unshift path
|
36
36
|
$LOAD_PATH.unshift path
|
@@ -51,7 +51,7 @@ module TrustyCms
|
|
51
51
|
# An example of how to add extensions:
|
52
52
|
# config.extensions = [ :snippets, :clipped, :layouts, :reorder, :multi_site, :rad_social]
|
53
53
|
|
54
|
-
config.extensions = [
|
54
|
+
config.extensions = []
|
55
55
|
|
56
56
|
# By default, only English translations are loaded. Remove any of these from
|
57
57
|
# the list below if you'd like to provide any of the additional options
|
@@ -85,7 +85,6 @@ module TrustyCms
|
|
85
85
|
# Sets the meta store type and storage location. We recommend you use
|
86
86
|
# radiant: since this will enable manual expiration and acceleration headers.
|
87
87
|
|
88
|
-
|
89
88
|
config.middleware.use Rack::Cache,
|
90
89
|
:private_headers => ['Authorization'],
|
91
90
|
:entitystore => "radiant:tmp/cache/entity",
|
@@ -97,8 +96,6 @@ module TrustyCms
|
|
97
96
|
config.middleware.insert_before(Rack::ConditionalGet, Rack::Cache)
|
98
97
|
config.assets.enabled = true
|
99
98
|
|
100
|
-
|
101
|
-
|
102
99
|
config.filter_parameters += [:password, :password_confirmation]
|
103
100
|
|
104
101
|
# Use the database for sessions instead of the cookie-based default,
|
@@ -128,13 +125,13 @@ module TrustyCms
|
|
128
125
|
|
129
126
|
config.after_initialize do
|
130
127
|
extension_loader.load_extensions
|
131
|
-
extension_loader.
|
128
|
+
extension_loader.load_extension_initializers
|
132
129
|
|
133
130
|
#Dir["#{TRUSTY_CMS_ROOT}/config/initializers/**/*.rb"].sort.each do |initializer|
|
134
131
|
# load(initializer)
|
135
132
|
#end
|
136
133
|
|
137
|
-
extension_loader.activate_extensions
|
134
|
+
extension_loader.activate_extensions # also calls initialize_views
|
138
135
|
#config.add_controller_paths(extension_loader.paths(:controller))
|
139
136
|
#config.add_eager_load_paths(extension_loader.paths(:eager_load))
|
140
137
|
|
@@ -13,15 +13,18 @@ module TrustyCms
|
|
13
13
|
|
14
14
|
attr_accessor :config
|
15
15
|
|
16
|
-
def initialize(rails_config)
|
16
|
+
def initialize(rails_config)
|
17
|
+
#:nodoc
|
17
18
|
@config = rails_config
|
18
19
|
end
|
19
20
|
|
20
|
-
def before_clear(*_args)
|
21
|
+
def before_clear(*_args)
|
22
|
+
#:nodoc
|
21
23
|
ExtensionLoader.deactivate_extensions
|
22
24
|
end
|
23
25
|
|
24
|
-
def after_clear(*_args)
|
26
|
+
def after_clear(*_args)
|
27
|
+
#:nodoc
|
25
28
|
ExtensionLoader.load_extensions
|
26
29
|
ExtensionLoader.activate_extensions
|
27
30
|
end
|
@@ -73,7 +76,6 @@ module TrustyCms
|
|
73
76
|
begin
|
74
77
|
constant = "#{name}_extension".camelize
|
75
78
|
extension = constant.constantize
|
76
|
-
extension.unloadable
|
77
79
|
extension.path = extension_path
|
78
80
|
extension
|
79
81
|
rescue LoadError, NameError => e
|
@@ -88,6 +90,10 @@ module TrustyCms
|
|
88
90
|
extensions.each(&:load_initializers)
|
89
91
|
end
|
90
92
|
|
93
|
+
def load_extension_initializers
|
94
|
+
load_extension_initalizers
|
95
|
+
end
|
96
|
+
|
91
97
|
# Deactivates all enabled extensions.
|
92
98
|
#
|
93
99
|
def deactivate_extensions
|
@@ -138,5 +144,7 @@ module TrustyCms
|
|
138
144
|
end
|
139
145
|
end
|
140
146
|
end
|
147
|
+
|
148
|
+
alias_method :load_extension_initializers, :load_extension_initalizers
|
141
149
|
end
|
142
150
|
end
|
@@ -97,7 +97,7 @@ module TrustyCms
|
|
97
97
|
def load_application_initializers
|
98
98
|
load_trusty_initializers unless deployed_as_app?
|
99
99
|
super
|
100
|
-
extension_loader.
|
100
|
+
extension_loader.load_extension_initializers
|
101
101
|
end
|
102
102
|
|
103
103
|
# Loads initializers found in TRUSTY_CMS_ROOT/config/initializers.
|
data/lib/trusty_cms.rb
CHANGED
@@ -31,7 +31,7 @@ module TrustyCms
|
|
31
31
|
|
32
32
|
# Initialize extension paths
|
33
33
|
config.initialize_extension_paths
|
34
|
-
extension_loader = ExtensionLoader.instance {|l| l.initializer = self }
|
34
|
+
extension_loader = ExtensionLoader.instance { |l| l.initializer = self }
|
35
35
|
extension_loader.paths(:load).reverse_each do |path, value|
|
36
36
|
config.autoload_paths.unshift path
|
37
37
|
$LOAD_PATH.unshift path
|
@@ -101,7 +101,7 @@ module TrustyCms
|
|
101
101
|
# config.action_controller.session_store = :cookie_store DEPRECATED
|
102
102
|
|
103
103
|
# Activate observers that should always be running
|
104
|
-
#config.active_record.observers = :user_action_observer
|
104
|
+
# config.active_record.observers = :user_action_observer
|
105
105
|
|
106
106
|
# The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
|
107
107
|
# All files from config/locales/*.rb,yml are added automatically.
|
@@ -122,15 +122,15 @@ module TrustyCms
|
|
122
122
|
|
123
123
|
config.after_initialize do
|
124
124
|
extension_loader.load_extensions
|
125
|
-
extension_loader.
|
125
|
+
extension_loader.load_extension_initializers
|
126
126
|
|
127
|
-
#Dir["#{TRUSTY_CMS_ROOT}/config/initializers/**/*.rb"].sort.each do |initializer|
|
127
|
+
# Dir["#{TRUSTY_CMS_ROOT}/config/initializers/**/*.rb"].sort.each do |initializer|
|
128
128
|
# load(initializer)
|
129
|
-
#end
|
129
|
+
# end
|
130
130
|
|
131
|
-
extension_loader.activate_extensions
|
132
|
-
#config.add_controller_paths(extension_loader.paths(:controller))
|
133
|
-
#config.add_eager_load_paths(extension_loader.paths(:eager_load))
|
131
|
+
extension_loader.activate_extensions # also calls initialize_views
|
132
|
+
# config.add_controller_paths(extension_loader.paths(:controller))
|
133
|
+
# config.add_eager_load_paths(extension_loader.paths(:eager_load))
|
134
134
|
|
135
135
|
# Add new inflection rules using the following format:
|
136
136
|
ActiveSupport::Inflector.inflections do |inflect|
|
@@ -1,20 +1,23 @@
|
|
1
|
-
|
2
|
-
config
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
Rails.application.reloader.to_prepare do
|
2
|
+
TrustyCms.config do |config|
|
3
|
+
config.define 'admin.title', :default => "TrustyCms CMS"
|
4
|
+
config.define 'dev.host'
|
5
|
+
config.define 'local.timezone', :allow_change => true, :select_from => lambda { ActiveSupport::TimeZone::MAPPING.keys.sort }
|
6
|
+
config.define 'defaults.locale', :select_from => lambda { TrustyCms::AvailableLocales.locales }, :allow_blank => true
|
7
|
+
config.define 'defaults.page.parts', :default => "Body,Extended"
|
8
|
+
config.define 'defaults.page.status', :select_from => lambda { Status.selectable_values }, :allow_blank => false, :default => "Draft"
|
9
|
+
config.define 'defaults.page.filter', :select_from => lambda { TextFilter.descendants.map { |s| s.filter_name }.sort }, :allow_blank => true
|
10
|
+
config.define 'defaults.page.fields'
|
11
|
+
config.define 'pagination.param_name', :default => 'page'
|
12
|
+
config.define 'pagination.per_page_param_name', :default => 'per_page'
|
13
|
+
config.define 'admin.pagination.per_page', :type => :integer, :default => 50
|
14
|
+
config.define 'site.title', :default => "Your site title", :allow_blank => false
|
15
|
+
config.define 'site.host', :default => "www.example.com", :allow_blank => false
|
16
|
+
config.define 'user.allow_password_reset?', :default => true
|
17
|
+
end
|
18
|
+
|
19
|
+
TrustyCms::Application.config do |config|
|
17
20
|
|
18
|
-
|
21
|
+
end
|
19
22
|
|
20
23
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -2,34 +2,61 @@
|
|
2
2
|
# of editing this file, please use the migrations feature of Active Record to
|
3
3
|
# incrementally modify your database, and then regenerate this schema definition.
|
4
4
|
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
# from scratch.
|
9
|
-
#
|
5
|
+
# This file is the source Rails uses to define your schema when running `bin/rails
|
6
|
+
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
7
|
+
# be faster and is potentially less error prone than running all of your
|
8
|
+
# migrations from scratch. Old migrations may fail to apply correctly if those
|
9
|
+
# migrations use external dependencies or application code.
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema[7.0].define(version: 2023_10_19_192097) do
|
14
|
+
create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
15
|
+
t.string "name", null: false
|
16
|
+
t.string "record_type", null: false
|
17
|
+
t.bigint "record_id", null: false
|
18
|
+
t.bigint "blob_id", null: false
|
19
|
+
t.datetime "created_at", precision: nil, null: false
|
20
|
+
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
|
21
|
+
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
|
22
|
+
end
|
23
|
+
|
24
|
+
create_table "active_storage_blobs", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
25
|
+
t.string "key", null: false
|
26
|
+
t.string "filename", null: false
|
27
|
+
t.string "content_type"
|
28
|
+
t.text "metadata"
|
29
|
+
t.string "service_name", null: false
|
30
|
+
t.bigint "byte_size", null: false
|
31
|
+
t.string "checksum", null: false
|
32
|
+
t.datetime "created_at", precision: nil, null: false
|
33
|
+
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
|
34
|
+
end
|
35
|
+
|
36
|
+
create_table "active_storage_variant_records", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
37
|
+
t.bigint "blob_id", null: false
|
38
|
+
t.string "variation_digest", null: false
|
39
|
+
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
|
40
|
+
end
|
14
41
|
|
15
|
-
create_table "admins",
|
42
|
+
create_table "admins", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
16
43
|
t.string "email", default: "", null: false
|
17
44
|
t.string "encrypted_password", default: "", null: false
|
18
45
|
t.string "reset_password_token"
|
19
|
-
t.datetime "reset_password_sent_at"
|
20
|
-
t.datetime "remember_created_at"
|
46
|
+
t.datetime "reset_password_sent_at", precision: nil
|
47
|
+
t.datetime "remember_created_at", precision: nil
|
21
48
|
t.integer "sign_in_count", default: 0, null: false
|
22
|
-
t.datetime "current_sign_in_at"
|
23
|
-
t.datetime "last_sign_in_at"
|
49
|
+
t.datetime "current_sign_in_at", precision: nil
|
50
|
+
t.datetime "last_sign_in_at", precision: nil
|
24
51
|
t.string "current_sign_in_ip"
|
25
52
|
t.string "last_sign_in_ip"
|
26
53
|
t.string "confirmation_token"
|
27
|
-
t.datetime "confirmed_at"
|
28
|
-
t.datetime "confirmation_sent_at"
|
54
|
+
t.datetime "confirmed_at", precision: nil
|
55
|
+
t.datetime "confirmation_sent_at", precision: nil
|
29
56
|
t.string "unconfirmed_email"
|
30
57
|
t.integer "failed_attempts", default: 0, null: false
|
31
58
|
t.string "unlock_token"
|
32
|
-
t.datetime "locked_at"
|
59
|
+
t.datetime "locked_at", precision: nil
|
33
60
|
t.string "first_name"
|
34
61
|
t.string "last_name"
|
35
62
|
t.boolean "admin"
|
@@ -38,11 +65,11 @@ ActiveRecord::Schema.define(version: 2016_10_27_141250) do
|
|
38
65
|
t.integer "site_id"
|
39
66
|
t.integer "updated_by_id"
|
40
67
|
t.text "notes"
|
41
|
-
t.datetime "created_at", null: false
|
42
|
-
t.datetime "updated_at", null: false
|
68
|
+
t.datetime "created_at", precision: nil, null: false
|
69
|
+
t.datetime "updated_at", precision: nil, null: false
|
43
70
|
end
|
44
71
|
|
45
|
-
create_table "assets",
|
72
|
+
create_table "assets", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
46
73
|
t.string "caption"
|
47
74
|
t.string "title"
|
48
75
|
t.string "asset_file_name"
|
@@ -50,31 +77,31 @@ ActiveRecord::Schema.define(version: 2016_10_27_141250) do
|
|
50
77
|
t.integer "asset_file_size"
|
51
78
|
t.integer "created_by_id"
|
52
79
|
t.integer "updated_by_id"
|
53
|
-
t.datetime "created_at"
|
54
|
-
t.datetime "updated_at"
|
80
|
+
t.datetime "created_at", precision: nil
|
81
|
+
t.datetime "updated_at", precision: nil
|
55
82
|
t.string "uuid"
|
56
83
|
t.integer "original_width"
|
57
84
|
t.integer "original_height"
|
58
85
|
t.string "original_extension"
|
59
86
|
end
|
60
87
|
|
61
|
-
create_table "config",
|
88
|
+
create_table "config", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
62
89
|
t.string "key", limit: 40, default: "", null: false
|
63
90
|
t.string "value", default: ""
|
64
91
|
t.index ["key"], name: "key", unique: true
|
65
92
|
end
|
66
93
|
|
67
|
-
create_table "extension_meta",
|
94
|
+
create_table "extension_meta", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
68
95
|
t.string "name"
|
69
96
|
t.integer "schema_version", default: 0
|
70
97
|
t.boolean "enabled", default: true
|
71
98
|
end
|
72
99
|
|
73
|
-
create_table "layouts",
|
100
|
+
create_table "layouts", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
74
101
|
t.string "name", limit: 100
|
75
102
|
t.text "content"
|
76
|
-
t.datetime "created_at"
|
77
|
-
t.datetime "updated_at"
|
103
|
+
t.datetime "created_at", precision: nil
|
104
|
+
t.datetime "updated_at", precision: nil
|
78
105
|
t.integer "created_by_id"
|
79
106
|
t.integer "updated_by_id"
|
80
107
|
t.string "content_type", limit: 40
|
@@ -82,28 +109,28 @@ ActiveRecord::Schema.define(version: 2016_10_27_141250) do
|
|
82
109
|
t.integer "site_id"
|
83
110
|
end
|
84
111
|
|
85
|
-
create_table "page_attachments",
|
112
|
+
create_table "page_attachments", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
86
113
|
t.integer "asset_id"
|
87
114
|
t.integer "page_id"
|
88
115
|
t.integer "position"
|
89
116
|
end
|
90
117
|
|
91
|
-
create_table "page_fields",
|
118
|
+
create_table "page_fields", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
92
119
|
t.integer "page_id"
|
93
120
|
t.string "name"
|
94
121
|
t.string "content"
|
95
122
|
t.index ["page_id", "name", "content"], name: "index_page_fields_on_page_id_and_name_and_content"
|
96
123
|
end
|
97
124
|
|
98
|
-
create_table "page_parts",
|
125
|
+
create_table "page_parts", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
99
126
|
t.string "name", limit: 100
|
100
127
|
t.string "filter_id", limit: 25
|
101
|
-
t.text "content",
|
128
|
+
t.text "content", size: :medium
|
102
129
|
t.integer "page_id"
|
103
130
|
t.index ["page_id", "name"], name: "parts_by_page"
|
104
131
|
end
|
105
132
|
|
106
|
-
create_table "pages",
|
133
|
+
create_table "pages", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
107
134
|
t.string "title"
|
108
135
|
t.string "slug", limit: 100
|
109
136
|
t.string "breadcrumb", limit: 160
|
@@ -111,9 +138,9 @@ ActiveRecord::Schema.define(version: 2016_10_27_141250) do
|
|
111
138
|
t.integer "status_id", default: 1, null: false
|
112
139
|
t.integer "parent_id"
|
113
140
|
t.integer "layout_id"
|
114
|
-
t.datetime "created_at"
|
115
|
-
t.datetime "updated_at"
|
116
|
-
t.datetime "published_at"
|
141
|
+
t.datetime "created_at", precision: nil
|
142
|
+
t.datetime "updated_at", precision: nil
|
143
|
+
t.datetime "published_at", precision: nil
|
117
144
|
t.integer "created_by_id"
|
118
145
|
t.integer "updated_by_id"
|
119
146
|
t.boolean "virtual", default: false, null: false
|
@@ -128,34 +155,34 @@ ActiveRecord::Schema.define(version: 2016_10_27_141250) do
|
|
128
155
|
t.index ["virtual", "status_id"], name: "pages_published"
|
129
156
|
end
|
130
157
|
|
131
|
-
create_table "sessions",
|
158
|
+
create_table "sessions", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
132
159
|
t.string "session_id"
|
133
160
|
t.text "data"
|
134
|
-
t.datetime "updated_at"
|
161
|
+
t.datetime "updated_at", precision: nil
|
135
162
|
t.index ["session_id"], name: "index_sessions_on_session_id"
|
136
163
|
t.index ["updated_at"], name: "index_sessions_on_updated_at"
|
137
164
|
end
|
138
165
|
|
139
|
-
create_table "sites",
|
166
|
+
create_table "sites", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
140
167
|
t.string "name"
|
141
168
|
t.string "domain"
|
142
169
|
t.integer "homepage_id"
|
143
170
|
t.integer "position", default: 0
|
144
171
|
t.integer "created_by_id"
|
145
|
-
t.datetime "created_at"
|
172
|
+
t.datetime "created_at", precision: nil
|
146
173
|
t.integer "updated_by_id"
|
147
|
-
t.datetime "updated_at"
|
174
|
+
t.datetime "updated_at", precision: nil
|
148
175
|
t.string "subtitle"
|
149
176
|
t.string "abbreviation"
|
150
177
|
t.string "base_domain"
|
151
178
|
end
|
152
179
|
|
153
|
-
create_table "snippets",
|
180
|
+
create_table "snippets", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
154
181
|
t.string "name", limit: 100, default: "", null: false
|
155
182
|
t.string "filter_id", limit: 25
|
156
183
|
t.text "content"
|
157
|
-
t.datetime "created_at"
|
158
|
-
t.datetime "updated_at"
|
184
|
+
t.datetime "created_at", precision: nil
|
185
|
+
t.datetime "updated_at", precision: nil
|
159
186
|
t.integer "created_by_id"
|
160
187
|
t.integer "updated_by_id"
|
161
188
|
t.integer "lock_version", default: 0
|
@@ -163,15 +190,15 @@ ActiveRecord::Schema.define(version: 2016_10_27_141250) do
|
|
163
190
|
t.index ["name", "site_id"], name: "name_site_id", unique: true
|
164
191
|
end
|
165
192
|
|
166
|
-
create_table "users",
|
193
|
+
create_table "users", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
167
194
|
t.string "name", limit: 100
|
168
195
|
t.string "email"
|
169
196
|
t.string "login", limit: 40, default: "", null: false
|
170
197
|
t.string "password", limit: 40
|
171
198
|
t.boolean "admin", default: false, null: false
|
172
199
|
t.boolean "designer", default: false, null: false
|
173
|
-
t.datetime "created_at"
|
174
|
-
t.datetime "updated_at"
|
200
|
+
t.datetime "created_at", precision: nil
|
201
|
+
t.datetime "updated_at", precision: nil
|
175
202
|
t.integer "created_by_id"
|
176
203
|
t.integer "updated_by_id"
|
177
204
|
t.string "salt"
|
@@ -181,7 +208,9 @@ ActiveRecord::Schema.define(version: 2016_10_27_141250) do
|
|
181
208
|
t.integer "site_id"
|
182
209
|
t.string "locale"
|
183
210
|
t.string "password_reset_token"
|
184
|
-
t.datetime "password_reset_sent_at"
|
211
|
+
t.datetime "password_reset_sent_at", precision: nil
|
185
212
|
end
|
186
213
|
|
214
|
+
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
|
215
|
+
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
|
187
216
|
end
|
data/trusty_cms.gemspec
CHANGED
@@ -25,31 +25,31 @@ a general purpose content management system--not merely a blogging engine.'
|
|
25
25
|
s.license = 'MIT'
|
26
26
|
s.test_files = Dir['spec/**/*']
|
27
27
|
s.add_dependency 'activestorage-validator'
|
28
|
-
s.add_dependency 'acts_as_list',
|
29
|
-
s.add_dependency 'acts_as_tree',
|
30
|
-
s.add_dependency 'ckeditor',
|
31
|
-
s.add_dependency 'delocalize',
|
28
|
+
s.add_dependency 'acts_as_list', '>= 0.9.5', '< 1.2.0'
|
29
|
+
s.add_dependency 'acts_as_tree', '~> 2.9.1'
|
30
|
+
s.add_dependency 'ckeditor', '>= 4.2.2', '< 4.4.0'
|
31
|
+
s.add_dependency 'delocalize', '>= 0.2', '< 2.0'
|
32
32
|
s.add_dependency 'devise'
|
33
|
-
s.add_dependency 'execjs',
|
34
|
-
s.add_dependency 'haml',
|
33
|
+
s.add_dependency 'execjs', '~> 2.7'
|
34
|
+
s.add_dependency 'haml', '>= 5.0', '< 6.0'
|
35
35
|
s.add_dependency 'haml-rails'
|
36
|
-
s.add_dependency 'highline',
|
36
|
+
s.add_dependency 'highline', '>= 1.7.8', '< 2.2.0'
|
37
37
|
s.add_dependency 'image_processing'
|
38
38
|
s.add_dependency 'kraken-io'
|
39
39
|
s.add_dependency 'mini_racer'
|
40
40
|
s.add_dependency 'mysql2'
|
41
|
-
s.add_dependency 'rack',
|
42
|
-
s.add_dependency 'rack-cache',
|
43
|
-
s.add_dependency 'radius',
|
41
|
+
s.add_dependency 'rack', '>= 2.0.1', '< 3.1.0'
|
42
|
+
s.add_dependency 'rack-cache', '~> 1.7'
|
43
|
+
s.add_dependency 'radius', '~> 0.7'
|
44
44
|
s.add_dependency 'rails'
|
45
|
-
s.add_dependency 'rake',
|
46
|
-
s.add_dependency 'rdoc',
|
47
|
-
s.add_dependency 'RedCloth',
|
45
|
+
s.add_dependency 'rake', '< 14.0'
|
46
|
+
s.add_dependency 'rdoc', '>= 5.1', '< 7.0'
|
47
|
+
s.add_dependency 'RedCloth', '4.3.2'
|
48
48
|
s.add_dependency 'roadie-rails'
|
49
49
|
s.add_dependency 'sass-rails'
|
50
|
-
s.add_dependency 'stringex',
|
51
|
-
s.add_dependency 'tzinfo',
|
52
|
-
s.add_dependency 'uglifier',
|
50
|
+
s.add_dependency 'stringex', '>= 2.7.1', '< 2.9.0'
|
51
|
+
s.add_dependency 'tzinfo', '>= 1.2.3', '< 2.1.0'
|
52
|
+
s.add_dependency 'uglifier', '>= 3.2', '< 5.0'
|
53
53
|
s.add_dependency 'uuidtools', '>= 2.1.5', '< 2.3.0'
|
54
54
|
s.add_dependency 'will_paginate', '>= 3', '< 5'
|
55
55
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require_dependency 'application_controller'
|
2
|
-
|
3
1
|
class MultiSiteExtension < TrustyCms::Extension
|
4
2
|
version "3.0.2"
|
5
3
|
description %{ Enables virtual sites to be created with associated domain names.
|
@@ -7,7 +5,6 @@ class MultiSiteExtension < TrustyCms::Extension
|
|
7
5
|
individual site) and allows model classes to be scoped by site. }
|
8
6
|
url "http://trustarts.org/"
|
9
7
|
|
10
|
-
|
11
8
|
def activate
|
12
9
|
|
13
10
|
# Model extensions
|
@@ -19,7 +16,7 @@ class MultiSiteExtension < TrustyCms::Extension
|
|
19
16
|
Admin::ResourceController.send :include, MultiSite::ApplicationControllerExtensions
|
20
17
|
ApplicationController.send :include, MultiSite::ApplicationControllerFilterExtensions
|
21
18
|
|
22
|
-
#ActionController::Base.send :include, MultiSite::ApplicationControllerExtensions
|
19
|
+
# ActionController::Base.send :include, MultiSite::ApplicationControllerExtensions
|
23
20
|
SiteController.send :include, MultiSite::SiteControllerExtensions
|
24
21
|
Admin::ResourceController.send :include, MultiSite::ResourceControllerExtensions
|
25
22
|
Admin::PagesController.send :include, MultiSite::PagesControllerExtensions
|
@@ -39,7 +36,6 @@ class MultiSiteExtension < TrustyCms::Extension
|
|
39
36
|
admin.snippets.edit.add :form, "choose_site", :before => "edit_filter" unless admin.snippets.edit.form.include?("choose_site")
|
40
37
|
end
|
41
38
|
|
42
|
-
|
43
39
|
unless defined? admin.site
|
44
40
|
TrustyCms::AdminUI.send :include, MultiSite::AdminUI
|
45
41
|
admin.site = TrustyCms::AdminUI.load_default_site_regions
|
data/yarn.lock
CHANGED
@@ -54,6 +54,16 @@
|
|
54
54
|
"@jridgewell/trace-mapping" "^0.3.17"
|
55
55
|
jsesc "^2.5.1"
|
56
56
|
|
57
|
+
"@babel/generator@^7.23.0":
|
58
|
+
version "7.23.0"
|
59
|
+
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420"
|
60
|
+
integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==
|
61
|
+
dependencies:
|
62
|
+
"@babel/types" "^7.23.0"
|
63
|
+
"@jridgewell/gen-mapping" "^0.3.2"
|
64
|
+
"@jridgewell/trace-mapping" "^0.3.17"
|
65
|
+
jsesc "^2.5.1"
|
66
|
+
|
57
67
|
"@babel/helper-compilation-targets@^7.22.15":
|
58
68
|
version "7.22.15"
|
59
69
|
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz#0698fc44551a26cf29f18d4662d5bf545a6cfc52"
|
@@ -65,18 +75,23 @@
|
|
65
75
|
lru-cache "^5.1.1"
|
66
76
|
semver "^6.3.1"
|
67
77
|
|
78
|
+
"@babel/helper-environment-visitor@^7.22.20":
|
79
|
+
version "7.22.20"
|
80
|
+
resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167"
|
81
|
+
integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==
|
82
|
+
|
68
83
|
"@babel/helper-environment-visitor@^7.22.5":
|
69
84
|
version "7.22.5"
|
70
85
|
resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz#f06dd41b7c1f44e1f8da6c4055b41ab3a09a7e98"
|
71
86
|
integrity sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==
|
72
87
|
|
73
|
-
"@babel/helper-function-name@^7.
|
74
|
-
version "7.
|
75
|
-
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.
|
76
|
-
integrity sha512-
|
88
|
+
"@babel/helper-function-name@^7.23.0":
|
89
|
+
version "7.23.0"
|
90
|
+
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759"
|
91
|
+
integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==
|
77
92
|
dependencies:
|
78
|
-
"@babel/template" "^7.22.
|
79
|
-
"@babel/types" "^7.
|
93
|
+
"@babel/template" "^7.22.15"
|
94
|
+
"@babel/types" "^7.23.0"
|
80
95
|
|
81
96
|
"@babel/helper-hoist-variables@^7.22.5":
|
82
97
|
version "7.22.5"
|
@@ -127,6 +142,11 @@
|
|
127
142
|
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.15.tgz#601fa28e4cc06786c18912dca138cec73b882044"
|
128
143
|
integrity sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==
|
129
144
|
|
145
|
+
"@babel/helper-validator-identifier@^7.22.20":
|
146
|
+
version "7.22.20"
|
147
|
+
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0"
|
148
|
+
integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==
|
149
|
+
|
130
150
|
"@babel/helper-validator-option@^7.22.15":
|
131
151
|
version "7.22.15"
|
132
152
|
resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz#694c30dfa1d09a6534cdfcafbe56789d36aba040"
|
@@ -155,7 +175,12 @@
|
|
155
175
|
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.16.tgz#180aead7f247305cce6551bea2720934e2fa2c95"
|
156
176
|
integrity sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==
|
157
177
|
|
158
|
-
"@babel/
|
178
|
+
"@babel/parser@^7.23.0":
|
179
|
+
version "7.23.0"
|
180
|
+
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719"
|
181
|
+
integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==
|
182
|
+
|
183
|
+
"@babel/template@^7.22.15":
|
159
184
|
version "7.22.15"
|
160
185
|
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38"
|
161
186
|
integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==
|
@@ -165,18 +190,18 @@
|
|
165
190
|
"@babel/types" "^7.22.15"
|
166
191
|
|
167
192
|
"@babel/traverse@^7.22.15", "@babel/traverse@^7.22.17":
|
168
|
-
version "7.
|
169
|
-
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.
|
170
|
-
integrity sha512-
|
193
|
+
version "7.23.2"
|
194
|
+
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8"
|
195
|
+
integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==
|
171
196
|
dependencies:
|
172
197
|
"@babel/code-frame" "^7.22.13"
|
173
|
-
"@babel/generator" "^7.
|
174
|
-
"@babel/helper-environment-visitor" "^7.22.
|
175
|
-
"@babel/helper-function-name" "^7.
|
198
|
+
"@babel/generator" "^7.23.0"
|
199
|
+
"@babel/helper-environment-visitor" "^7.22.20"
|
200
|
+
"@babel/helper-function-name" "^7.23.0"
|
176
201
|
"@babel/helper-hoist-variables" "^7.22.5"
|
177
202
|
"@babel/helper-split-export-declaration" "^7.22.6"
|
178
|
-
"@babel/parser" "^7.
|
179
|
-
"@babel/types" "^7.
|
203
|
+
"@babel/parser" "^7.23.0"
|
204
|
+
"@babel/types" "^7.23.0"
|
180
205
|
debug "^4.1.0"
|
181
206
|
globals "^11.1.0"
|
182
207
|
|
@@ -189,6 +214,15 @@
|
|
189
214
|
"@babel/helper-validator-identifier" "^7.22.15"
|
190
215
|
to-fast-properties "^2.0.0"
|
191
216
|
|
217
|
+
"@babel/types@^7.23.0":
|
218
|
+
version "7.23.0"
|
219
|
+
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb"
|
220
|
+
integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==
|
221
|
+
dependencies:
|
222
|
+
"@babel/helper-string-parser" "^7.22.5"
|
223
|
+
"@babel/helper-validator-identifier" "^7.22.20"
|
224
|
+
to-fast-properties "^2.0.0"
|
225
|
+
|
192
226
|
"@fortawesome/fontawesome-free@^5.15.4":
|
193
227
|
version "5.15.4"
|
194
228
|
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz#ecda5712b61ac852c760d8b3c79c96adca5554e5"
|
@@ -1585,6 +1619,18 @@ safe-buffer@~5.2.0:
|
|
1585
1619
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
|
1586
1620
|
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==
|
1587
1621
|
|
1622
|
+
semver@^6.3.1:
|
1623
|
+
version "6.3.1"
|
1624
|
+
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
|
1625
|
+
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
|
1626
|
+
|
1627
|
+
semver@^7.3.4:
|
1628
|
+
version "7.5.4"
|
1629
|
+
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
|
1630
|
+
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
|
1631
|
+
dependencies:
|
1632
|
+
lru-cache "^6.0.0"
|
1633
|
+
|
1588
1634
|
shoestring@^2.0.0:
|
1589
1635
|
version "2.0.1"
|
1590
1636
|
resolved "https://registry.yarnpkg.com/shoestring/-/shoestring-2.0.1.tgz#7dd35a600b7e5826788124452c4a8acf64648b06"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trusty-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.6.
|
4
|
+
version: 5.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TrustyCms CMS dev team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activestorage-validator
|
@@ -1063,7 +1063,7 @@ files:
|
|
1063
1063
|
- vendor/extensions/clipped-extension/lib/paperclip/geometry_transformation.rb
|
1064
1064
|
- vendor/extensions/clipped-extension/lib/tasks/clipped_extension_tasks.rake
|
1065
1065
|
- vendor/extensions/clipped-extension/lib/tasks/paperclip_tasks.rake
|
1066
|
-
- vendor/extensions/clipped-extension/lib/
|
1066
|
+
- vendor/extensions/clipped-extension/lib/trusty_cms_clipped_extension.rb
|
1067
1067
|
- vendor/extensions/clipped-extension/lib/trusty_cms_clipped_extension/cloud.rb
|
1068
1068
|
- vendor/extensions/layouts-extension/layouts_extension.rb
|
1069
1069
|
- vendor/extensions/layouts-extension/lib/haml_layouts/models/layout.rb
|
@@ -1073,7 +1073,7 @@ files:
|
|
1073
1073
|
- vendor/extensions/layouts-extension/lib/share_layouts/controllers/action_controller.rb
|
1074
1074
|
- vendor/extensions/layouts-extension/lib/share_layouts/helpers/action_view.rb
|
1075
1075
|
- vendor/extensions/layouts-extension/lib/tasks/layouts_extension_tasks.rake
|
1076
|
-
- vendor/extensions/layouts-extension/lib/
|
1076
|
+
- vendor/extensions/layouts-extension/lib/trusty_cms_layouts_extension.rb
|
1077
1077
|
- vendor/extensions/multi-site-extension/lib/multi_site/admin_ui.rb
|
1078
1078
|
- vendor/extensions/multi-site-extension/lib/multi_site/application_controller_extensions.rb
|
1079
1079
|
- vendor/extensions/multi-site-extension/lib/multi_site/application_controller_filter_extensions.rb
|
@@ -1089,9 +1089,9 @@ files:
|
|
1089
1089
|
- vendor/extensions/multi-site-extension/lib/multi_site/site_controller_extensions.rb
|
1090
1090
|
- vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
|
1091
1091
|
- vendor/extensions/multi-site-extension/lib/tasks/scoped_admin_extension_tasks.rake
|
1092
|
-
- vendor/extensions/multi-site-extension/lib/
|
1092
|
+
- vendor/extensions/multi-site-extension/lib/trusty_cms_multi_site_extension.rb
|
1093
1093
|
- vendor/extensions/multi-site-extension/multi_site_extension.rb
|
1094
|
-
- vendor/extensions/snippets-extension/lib/
|
1094
|
+
- vendor/extensions/snippets-extension/lib/trusty_cms_snippets_extension.rb
|
1095
1095
|
- vendor/extensions/snippets-extension/snippets_extension.rb
|
1096
1096
|
- yarn.lock
|
1097
1097
|
homepage: https://github.com/pgharts/trusty-cms
|
@@ -1151,52 +1151,52 @@ signing_key:
|
|
1151
1151
|
specification_version: 4
|
1152
1152
|
summary: A no-fluff content management system designed for small teams.
|
1153
1153
|
test_files:
|
1154
|
-
- spec/fixtures/users.yml
|
1155
|
-
- spec/factories/page.rb
|
1156
|
-
- spec/factories/user.rb
|
1157
|
-
- spec/factories/page_part.rb
|
1158
|
-
- spec/factories/layout.rb
|
1159
|
-
- spec/models/layout_spec.rb
|
1160
|
-
- spec/support/custom_actions.rb
|
1161
|
-
- spec/ci/database.mysql.yml
|
1162
|
-
- spec/features/pages_spec.rb
|
1163
|
-
- spec/features/config_spec.rb
|
1164
|
-
- spec/features/layouts_spec.rb
|
1165
1154
|
- spec/controllers/users_controller_spec.rb
|
1166
1155
|
- spec/controllers/application_controller_spec.rb
|
1167
|
-
- spec/
|
1168
|
-
- spec/
|
1169
|
-
- spec/dummy/bin/rails
|
1170
|
-
- spec/dummy/bin/setup
|
1171
|
-
- spec/dummy/Rakefile
|
1172
|
-
- spec/dummy/README.rdoc
|
1173
|
-
- spec/dummy/public/favicon.ico
|
1156
|
+
- spec/fixtures/users.yml
|
1157
|
+
- spec/ci/database.mysql.yml
|
1174
1158
|
- spec/dummy/public/404.html
|
1175
1159
|
- spec/dummy/public/500.html
|
1160
|
+
- spec/dummy/public/favicon.ico
|
1176
1161
|
- spec/dummy/public/422.html
|
1177
|
-
- spec/dummy/
|
1162
|
+
- spec/dummy/bin/rails
|
1163
|
+
- spec/dummy/bin/setup
|
1164
|
+
- spec/dummy/bin/rake
|
1165
|
+
- spec/dummy/bin/bundle
|
1178
1166
|
- spec/dummy/config/locales/en.yml
|
1179
|
-
- spec/dummy/config/environment.rb
|
1180
|
-
- spec/dummy/config/boot.rb
|
1181
1167
|
- spec/dummy/config/routes.rb
|
1182
|
-
- spec/dummy/config/environments/test.rb
|
1183
|
-
- spec/dummy/config/environments/development.rb
|
1184
|
-
- spec/dummy/config/environments/production.rb
|
1185
1168
|
- spec/dummy/config/application.rb
|
1186
|
-
- spec/dummy/config/
|
1187
|
-
- spec/dummy/config/
|
1169
|
+
- spec/dummy/config/environment.rb
|
1170
|
+
- spec/dummy/config/database.yml
|
1171
|
+
- spec/dummy/config/environments/production.rb
|
1172
|
+
- spec/dummy/config/environments/development.rb
|
1173
|
+
- spec/dummy/config/environments/test.rb
|
1188
1174
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
1189
|
-
- spec/dummy/config/initializers/assets.rb
|
1190
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
1191
|
-
- spec/dummy/config/initializers/inflections.rb
|
1192
|
-
- spec/dummy/config/initializers/trusty_cms_config.rb
|
1193
1175
|
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
1176
|
+
- spec/dummy/config/initializers/trusty_cms_config.rb
|
1194
1177
|
- spec/dummy/config/initializers/session_store.rb
|
1178
|
+
- spec/dummy/config/initializers/mime_types.rb
|
1195
1179
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
1196
|
-
- spec/dummy/config/
|
1197
|
-
- spec/dummy/
|
1180
|
+
- spec/dummy/config/initializers/inflections.rb
|
1181
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
1182
|
+
- spec/dummy/config/initializers/assets.rb
|
1183
|
+
- spec/dummy/config/secrets.yml
|
1184
|
+
- spec/dummy/config/boot.rb
|
1185
|
+
- spec/dummy/Rakefile
|
1198
1186
|
- spec/dummy/app/assets/config/manifest.js
|
1187
|
+
- spec/dummy/package.json
|
1188
|
+
- spec/dummy/yarn.lock
|
1189
|
+
- spec/dummy/README.rdoc
|
1199
1190
|
- spec/dummy/db/schema.rb
|
1200
1191
|
- spec/dummy/config.ru
|
1201
1192
|
- spec/spec_helper.rb
|
1202
1193
|
- spec/rails_helper.rb
|
1194
|
+
- spec/models/layout_spec.rb
|
1195
|
+
- spec/factories/page.rb
|
1196
|
+
- spec/factories/page_part.rb
|
1197
|
+
- spec/factories/user.rb
|
1198
|
+
- spec/factories/layout.rb
|
1199
|
+
- spec/support/custom_actions.rb
|
1200
|
+
- spec/features/config_spec.rb
|
1201
|
+
- spec/features/layouts_spec.rb
|
1202
|
+
- spec/features/pages_spec.rb
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|