trusty-cms 6.2.1 → 6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +13 -3
- data/config/application.rb +4 -3
- data/lib/active_record_extensions/active_record_extensions.rb +0 -2
- data/lib/trusty_cms/extension_loader.rb +1 -1
- data/lib/trusty_cms/initializer.rb +0 -9
- data/lib/trusty_cms/version.rb +1 -1
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/config/storage.yml +0 -0
- data/trusty_cms.gemspec +1 -1
- data/vendor/extensions/layouts-extension/layouts_extension.rb +3 -3
- data/vendor/extensions/multi-site-extension/lib/multi_site/scoped_validation.rb +25 -35
- data/vendor/extensions/multi-site-extension/multi_site_extension.rb +0 -1
- data/vendor/extensions/snippets-extension/snippets_extension.rb +1 -1
- data/yarn.lock +13 -13
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c4f73e3a3abf514d52886a6eb71386cbb3786ad3a3b0848f9e34ccd931f2425
|
4
|
+
data.tar.gz: 4d9e6b0b2b561ed0f95f7efc887647d7fc28562ece114e0acc2efb920d361346
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b482105054e3aa23a9fad042d75a1449d0a27ae91d3109e34ad1b279befb8197e56e4dba3a8d8144b2049652678190b4ad015b9ac1ed78165c3c284075b4ced3
|
7
|
+
data.tar.gz: 880494f40cb2ae15cc08b31122e372007aec9f23a81dc0fc2eb950beb05571741e53870a8d8d977b943d0b9701de4d3d44428295676e921d14ca13295a02af6e
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
trusty-cms (6.
|
4
|
+
trusty-cms (6.3)
|
5
5
|
RedCloth (= 4.3.3)
|
6
6
|
activestorage-validator
|
7
7
|
acts_as_list (>= 0.9.5, < 1.3.0)
|
@@ -12,7 +12,7 @@ PATH
|
|
12
12
|
execjs (~> 2.7)
|
13
13
|
haml (>= 5.0, < 6.0)
|
14
14
|
haml-rails
|
15
|
-
highline (>= 1.7.8, < 3.
|
15
|
+
highline (>= 1.7.8, < 3.2.0)
|
16
16
|
image_processing
|
17
17
|
kraken-io
|
18
18
|
mini_racer
|
@@ -153,6 +153,7 @@ GEM
|
|
153
153
|
factory_bot (~> 6.4)
|
154
154
|
railties (>= 5.0.0)
|
155
155
|
ffi (1.17.0-x86_64-darwin)
|
156
|
+
ffi (1.17.0-x86_64-linux-gnu)
|
156
157
|
file_validators (3.0.0)
|
157
158
|
activemodel (>= 3.2)
|
158
159
|
mime-types (>= 1.0)
|
@@ -166,7 +167,8 @@ GEM
|
|
166
167
|
activesupport (>= 5.1)
|
167
168
|
haml (>= 4.0.6)
|
168
169
|
railties (>= 5.1)
|
169
|
-
highline (3.
|
170
|
+
highline (3.1.1)
|
171
|
+
reline
|
170
172
|
httparty (0.22.0)
|
171
173
|
csv
|
172
174
|
mini_mime (>= 1.0.0)
|
@@ -176,6 +178,7 @@ GEM
|
|
176
178
|
image_processing (1.13.0)
|
177
179
|
mini_magick (>= 4.9.5, < 5)
|
178
180
|
ruby-vips (>= 2.0.17, < 3)
|
181
|
+
io-console (0.7.2)
|
179
182
|
json (2.7.2)
|
180
183
|
kraken-io (0.1.3)
|
181
184
|
activesupport
|
@@ -186,6 +189,7 @@ GEM
|
|
186
189
|
addressable (~> 2.8)
|
187
190
|
childprocess (~> 5.0)
|
188
191
|
libv8-node (18.19.0.0-x86_64-darwin)
|
192
|
+
libv8-node (18.19.0.0-x86_64-linux)
|
189
193
|
logger (1.6.1)
|
190
194
|
loofah (2.22.0)
|
191
195
|
crass (~> 1.0.2)
|
@@ -221,6 +225,8 @@ GEM
|
|
221
225
|
nio4r (2.7.3)
|
222
226
|
nokogiri (1.16.7-x86_64-darwin)
|
223
227
|
racc (~> 1.4)
|
228
|
+
nokogiri (1.16.7-x86_64-linux)
|
229
|
+
racc (~> 1.4)
|
224
230
|
orm_adapter (0.5.0)
|
225
231
|
poltergeist (1.18.1)
|
226
232
|
capybara (>= 2.1, < 4)
|
@@ -280,6 +286,8 @@ GEM
|
|
280
286
|
rdoc (6.7.0)
|
281
287
|
psych (>= 4.0.0)
|
282
288
|
regexp_parser (2.9.2)
|
289
|
+
reline (0.5.10)
|
290
|
+
io-console (~> 0.5)
|
283
291
|
responders (3.1.1)
|
284
292
|
actionpack (>= 5.2)
|
285
293
|
railties (>= 5.2)
|
@@ -358,6 +366,8 @@ GEM
|
|
358
366
|
|
359
367
|
PLATFORMS
|
360
368
|
x86_64-darwin-21
|
369
|
+
x86_64-darwin-23
|
370
|
+
x86_64-linux
|
361
371
|
|
362
372
|
DEPENDENCIES
|
363
373
|
activestorage-validator
|
data/config/application.rb
CHANGED
@@ -76,9 +76,10 @@ module TrustyCms
|
|
76
76
|
html
|
77
77
|
end
|
78
78
|
end
|
79
|
-
config.
|
80
|
-
|
81
|
-
|
79
|
+
config.to_prepare do
|
80
|
+
extension_loader.deactivate_extensions
|
81
|
+
extension_loader.load_extensions
|
82
|
+
extension_loader.load_extension_initializers
|
82
83
|
|
83
84
|
extension_loader.activate_extensions # also calls initialize_views
|
84
85
|
# config.add_controller_paths(extension_loader.paths(:controller))
|
@@ -65,7 +65,7 @@ module TrustyCms
|
|
65
65
|
#
|
66
66
|
def load_extensions
|
67
67
|
configuration = TrustyCms::Application.config
|
68
|
-
@observer ||= DependenciesObserver.new(configuration).observe(::ActiveSupport::Dependencies)
|
68
|
+
# @observer ||= DependenciesObserver.new(configuration).observe(::ActiveSupport::Dependencies)
|
69
69
|
self.extensions = configuration.enabled_extensions.map { |ext| load_extension(ext) }.compact
|
70
70
|
end
|
71
71
|
|
@@ -9,15 +9,6 @@ require 'trusty_cms/extension_loader'
|
|
9
9
|
require 'string_extensions/string_extensions'
|
10
10
|
require 'trusty_cms/engine'
|
11
11
|
|
12
|
-
# This is a wild and probably terrible hack built to initialize extension engines.
|
13
|
-
# I have no idea what the repercussions will be. Revisit later.
|
14
|
-
Gem.loaded_specs.each_with_object([]) do |(gemname, gemspec), _found|
|
15
|
-
if gemname =~ /trusty-.*-extension$/
|
16
|
-
ep = TrustyCms::ExtensionLoader.record_path(gemspec.full_gem_path, gemname)
|
17
|
-
require "#{ep.name}/engine"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
12
|
module TrustyCms
|
22
13
|
module Initializer
|
23
14
|
# Rails::Initializer is essentially a list of startup steps and we extend it here by:
|
data/lib/trusty_cms/version.rb
CHANGED
File without changes
|
data/trusty_cms.gemspec
CHANGED
@@ -34,7 +34,7 @@ a general purpose content management system--not merely a blogging engine.'
|
|
34
34
|
s.add_dependency 'execjs', '~> 2.7'
|
35
35
|
s.add_dependency 'haml', '>= 5.0', '< 6.0'
|
36
36
|
s.add_dependency 'haml-rails'
|
37
|
-
s.add_dependency 'highline', '>= 1.7.8', '< 3.
|
37
|
+
s.add_dependency 'highline', '>= 1.7.8', '< 3.2.0'
|
38
38
|
s.add_dependency 'image_processing'
|
39
39
|
s.add_dependency 'kraken-io'
|
40
40
|
s.add_dependency 'mini_racer'
|
@@ -8,11 +8,11 @@ class LayoutsExtension < TrustyCms::Extension
|
|
8
8
|
ActionView::Base.send :include, ShareLayouts::Helpers::ActionView
|
9
9
|
|
10
10
|
# Nested Layouts
|
11
|
-
Page.send
|
11
|
+
Page.send :include, NestedLayouts::Tags::Core
|
12
12
|
|
13
13
|
# HAML Layouts
|
14
|
-
Layout.send
|
15
|
-
Page.send
|
14
|
+
Layout.send :include, HamlLayouts::Models::Layout
|
15
|
+
Page.send :include, HamlLayouts::Models::Page
|
16
16
|
HamlFilter
|
17
17
|
end
|
18
18
|
|
@@ -1,43 +1,33 @@
|
|
1
1
|
module MultiSite::ScopedValidation
|
2
|
+
# scoping validations to the site should be very simple
|
3
|
+
# all you would normally need is something like this:
|
4
|
+
#
|
5
|
+
# validates_uniqueness_of :email, :scope => :site_id
|
6
|
+
#
|
7
|
+
# but if you want to scope core trusty classes, you have a problem:
|
8
|
+
# their uniqueness validations have already been declared
|
9
|
+
# The only answer is to reach right back and change the validates_uniqueness_of method
|
10
|
+
# and to make it more awkward, that has to happen so early that we can't reflect on the site association.
|
11
|
+
# Hence the check for a site_id column. It's a hack, but a fairly harmless one.
|
2
12
|
|
3
|
-
def
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
# validates_uniqueness_of :email, :scope => :site_id
|
10
|
-
#
|
11
|
-
# but if you want to scope core trusty classes, you have a problem:
|
12
|
-
# their uniqueness validations have already been declared
|
13
|
-
# The only answer is to reach right back and change the validates_uniqueness_of method
|
14
|
-
# and to make it more awkward, that has to happen so early that we can't reflect on the site association.
|
15
|
-
# Hence the check for a site_id column. It's a hack, but a fairly harmless one.
|
16
|
-
|
17
|
-
def validates_uniqueness_of_with_site(*attr)
|
18
|
-
if database_exists?
|
19
|
-
if table_exists? && column_names.include?('site_id')
|
20
|
-
configuration = attr.extract_options!
|
21
|
-
configuration[:scope] ||= :site_id
|
22
|
-
attr.push(configuration)
|
23
|
-
end
|
24
|
-
validates_uniqueness_of_without_site(*attr)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
alias_method :validates_uniqueness_of_without_site, :validates_uniqueness_of
|
29
|
-
alias_method :validates_uniqueness_of, :validates_uniqueness_of_with_site
|
30
|
-
|
31
|
-
def database_exists?
|
32
|
-
ActiveRecord::Base.connection
|
33
|
-
rescue ActiveRecord::NoDatabaseError
|
34
|
-
false
|
35
|
-
else
|
36
|
-
true
|
13
|
+
def validates_uniqueness_of(*attr)
|
14
|
+
if database_exists?
|
15
|
+
if table_exists? && column_names.include?('site_id')
|
16
|
+
configuration = attr.extract_options!
|
17
|
+
configuration[:scope] ||= :site_id
|
18
|
+
attr.push(configuration)
|
37
19
|
end
|
20
|
+
super(*attr)
|
38
21
|
end
|
22
|
+
end
|
39
23
|
|
24
|
+
def database_exists?
|
25
|
+
ActiveRecord::Base.connection
|
26
|
+
rescue ActiveRecord::NoDatabaseError
|
27
|
+
false
|
28
|
+
else
|
29
|
+
true
|
40
30
|
end
|
41
31
|
end
|
42
32
|
|
43
|
-
ActiveRecord::Validations::ClassMethods.
|
33
|
+
ActiveRecord::Validations::ClassMethods.prepend MultiSite::ScopedValidation
|
@@ -34,7 +34,7 @@ class SnippetsExtension < TrustyCms::Extension
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
admin.snippet
|
37
|
+
admin.snippet ||= TrustyCms::AdminUI.load_default_snippet_regions
|
38
38
|
|
39
39
|
tab 'Design' do
|
40
40
|
add_item "Snippets", "/admin/snippets"
|
data/yarn.lock
CHANGED
@@ -427,12 +427,12 @@ brace-expansion@^1.1.7:
|
|
427
427
|
balanced-match "^1.0.0"
|
428
428
|
concat-map "0.0.1"
|
429
429
|
|
430
|
-
braces@^3.0.
|
431
|
-
version "3.0.
|
432
|
-
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.
|
433
|
-
integrity sha512-
|
430
|
+
braces@^3.0.3:
|
431
|
+
version "3.0.3"
|
432
|
+
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
|
433
|
+
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
|
434
434
|
dependencies:
|
435
|
-
fill-range "^7.
|
435
|
+
fill-range "^7.1.1"
|
436
436
|
|
437
437
|
browserslist@^4.12.0, browserslist@^4.21.9:
|
438
438
|
version "4.21.10"
|
@@ -701,10 +701,10 @@ file-entry-cache@^6.0.1:
|
|
701
701
|
dependencies:
|
702
702
|
flat-cache "^3.0.4"
|
703
703
|
|
704
|
-
fill-range@^7.
|
705
|
-
version "7.
|
706
|
-
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.
|
707
|
-
integrity sha512-
|
704
|
+
fill-range@^7.1.1:
|
705
|
+
version "7.1.1"
|
706
|
+
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
|
707
|
+
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
|
708
708
|
dependencies:
|
709
709
|
to-regex-range "^5.0.1"
|
710
710
|
|
@@ -1225,11 +1225,11 @@ micromark@~2.11.0:
|
|
1225
1225
|
parse-entities "^2.0.0"
|
1226
1226
|
|
1227
1227
|
micromatch@^4.0.4:
|
1228
|
-
version "4.0.
|
1229
|
-
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.
|
1230
|
-
integrity sha512-
|
1228
|
+
version "4.0.8"
|
1229
|
+
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
|
1230
|
+
integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
|
1231
1231
|
dependencies:
|
1232
|
-
braces "^3.0.
|
1232
|
+
braces "^3.0.3"
|
1233
1233
|
picomatch "^2.3.1"
|
1234
1234
|
|
1235
1235
|
min-indent@^1.0.0:
|
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: 6.
|
4
|
+
version: '6.3'
|
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: 2024-
|
11
|
+
date: 2024-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activestorage-validator
|
@@ -169,7 +169,7 @@ dependencies:
|
|
169
169
|
version: 1.7.8
|
170
170
|
- - "<"
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
version: 3.
|
172
|
+
version: 3.2.0
|
173
173
|
type: :runtime
|
174
174
|
prerelease: false
|
175
175
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -179,7 +179,7 @@ dependencies:
|
|
179
179
|
version: 1.7.8
|
180
180
|
- - "<"
|
181
181
|
- !ruby/object:Gem::Version
|
182
|
-
version: 3.
|
182
|
+
version: 3.2.0
|
183
183
|
- !ruby/object:Gem::Dependency
|
184
184
|
name: image_processing
|
185
185
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1030,6 +1030,7 @@ files:
|
|
1030
1030
|
- spec/dummy/config/locales/en.yml
|
1031
1031
|
- spec/dummy/config/routes.rb
|
1032
1032
|
- spec/dummy/config/secrets.yml
|
1033
|
+
- spec/dummy/config/storage.yml
|
1033
1034
|
- spec/dummy/db/schema.rb
|
1034
1035
|
- spec/dummy/package.json
|
1035
1036
|
- spec/dummy/public/404.html
|
@@ -1179,6 +1180,7 @@ test_files:
|
|
1179
1180
|
- spec/dummy/config/locales/en.yml
|
1180
1181
|
- spec/dummy/config/routes.rb
|
1181
1182
|
- spec/dummy/config/secrets.yml
|
1183
|
+
- spec/dummy/config/storage.yml
|
1182
1184
|
- spec/dummy/config.ru
|
1183
1185
|
- spec/dummy/db/schema.rb
|
1184
1186
|
- spec/dummy/package.json
|