trusty-cms 6.1.2 → 6.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 317a11bc953c6892d860b8c0e13b7d71ca9feffd3e9c6251c52606928fc1ada3
4
- data.tar.gz: aef8f45d869c2b2ec31df22d23002ba14c4b1399e1bf82b06a4a6bc5ca8d707e
3
+ metadata.gz: 2697be62c66372fd8436f662bee38a5792c95936b8111035ce844d670cea2dd8
4
+ data.tar.gz: ae60a31bc2fd2b1c8a245160bb545e68b9a3f44487ef7158ff231953c4f6b8ed
5
5
  SHA512:
6
- metadata.gz: 7c6011cc75d010d0a669e5105820b8ab4d498c081220a5584e654dd8e9c8002fa748175b06cce6145c8011b3f1ab0823052c231bd2107946b725afcfcc94b5ea
7
- data.tar.gz: 9b9460d709ae5504c298d03a3a5b170db440fc9db7b7998531ac856f7635dfee5f99dfe3d66d25bf4ce54494c4a687523355b84ff73d8f887f81bfef38fc5f25
6
+ metadata.gz: e35fdb83d9aed2a32ccb54da1bd94db1bc9838358a9b2d2aca92acf0256a94905e195365c0694bd91155598aa7330d502f2d8a950feaf7d8336efd7197b6cf32
7
+ data.tar.gz: '0925e0cd632719177be0ceb2deb5e17e7fb2c7cc502189d9fe11acb2bca3d05ea3f6d0d76dd135da39c068158c507b46038681f81da3199ecd3d8f0086d2c2ab'
data/Gemfile.lock CHANGED
@@ -35,67 +35,73 @@ GEM
35
35
  remote: https://rubygems.org/
36
36
  specs:
37
37
  RedCloth (4.3.3)
38
- actioncable (6.1.7.6)
39
- actionpack (= 6.1.7.6)
40
- activesupport (= 6.1.7.6)
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 (6.1.7.6)
44
- actionpack (= 6.1.7.6)
45
- activejob (= 6.1.7.6)
46
- activerecord (= 6.1.7.6)
47
- activestorage (= 6.1.7.6)
48
- activesupport (= 6.1.7.6)
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
- actionmailer (6.1.7.6)
51
- actionpack (= 6.1.7.6)
52
- actionview (= 6.1.7.6)
53
- activejob (= 6.1.7.6)
54
- activesupport (= 6.1.7.6)
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 (6.1.7.6)
58
- actionview (= 6.1.7.6)
59
- activesupport (= 6.1.7.6)
60
- rack (~> 2.0, >= 2.0.9)
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 (6.1.7.6)
65
- actionpack (= 6.1.7.6)
66
- activerecord (= 6.1.7.6)
67
- activestorage (= 6.1.7.6)
68
- activesupport (= 6.1.7.6)
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 (6.1.7.6)
71
- activesupport (= 6.1.7.6)
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 (6.1.7.6)
77
- activesupport (= 6.1.7.6)
83
+ activejob (7.0.8)
84
+ activesupport (= 7.0.8)
78
85
  globalid (>= 0.3.6)
79
- activemodel (6.1.7.6)
80
- activesupport (= 6.1.7.6)
81
- activerecord (6.1.7.6)
82
- activemodel (= 6.1.7.6)
83
- activesupport (= 6.1.7.6)
84
- activestorage (6.1.7.6)
85
- actionpack (= 6.1.7.6)
86
- activejob (= 6.1.7.6)
87
- activerecord (= 6.1.7.6)
88
- activesupport (= 6.1.7.6)
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 (6.1.7.6)
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)
@@ -129,7 +135,7 @@ GEM
129
135
  activerecord (>= 5.a)
130
136
  database_cleaner-core (~> 2.0.0)
131
137
  database_cleaner-core (2.0.1)
132
- date (3.3.3)
138
+ date (3.3.4)
133
139
  delocalize (1.2.0)
134
140
  rails (>= 2)
135
141
  devise (4.9.3)
@@ -197,23 +203,23 @@ GEM
197
203
  mini_mime (1.1.5)
198
204
  mini_racer (0.6.3)
199
205
  libv8-node (~> 16.10.0.0)
200
- minitest (5.15.0)
206
+ minitest (5.20.0)
201
207
  multi_xml (0.6.0)
202
208
  multipart-post (2.2.3)
203
209
  mysql2 (0.5.5)
204
- net-imap (0.4.1)
210
+ net-imap (0.4.9.1)
205
211
  date
206
212
  net-protocol
207
213
  net-pop (0.1.2)
208
214
  net-protocol
209
- net-protocol (0.2.1)
215
+ net-protocol (0.2.2)
210
216
  timeout
211
- net-smtp (0.4.0)
217
+ net-smtp (0.4.0.1)
212
218
  net-protocol
213
- nio4r (2.5.9)
214
- nokogiri (1.12.5-x86_64-darwin)
219
+ nio4r (2.7.0)
220
+ nokogiri (1.16.0-x86_64-darwin)
215
221
  racc (~> 1.4)
216
- nokogiri (1.12.5-x86_64-linux)
222
+ nokogiri (1.16.0-x86_64-linux)
217
223
  racc (~> 1.4)
218
224
  orm_adapter (0.5.0)
219
225
  poltergeist (1.18.1)
@@ -236,35 +242,36 @@ GEM
236
242
  rack-test (2.1.0)
237
243
  rack (>= 1.3)
238
244
  radius (0.7.5)
239
- rails (6.1.7.6)
240
- actioncable (= 6.1.7.6)
241
- actionmailbox (= 6.1.7.6)
242
- actionmailer (= 6.1.7.6)
243
- actionpack (= 6.1.7.6)
244
- actiontext (= 6.1.7.6)
245
- actionview (= 6.1.7.6)
246
- activejob (= 6.1.7.6)
247
- activemodel (= 6.1.7.6)
248
- activerecord (= 6.1.7.6)
249
- activestorage (= 6.1.7.6)
250
- activesupport (= 6.1.7.6)
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 (= 6.1.7.6)
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
257
262
  nokogiri (>= 1.6)
258
- rails-html-sanitizer (1.5.0)
259
- loofah (~> 2.19, >= 2.19.1)
263
+ rails-html-sanitizer (1.6.0)
264
+ loofah (~> 2.21)
265
+ nokogiri (~> 1.14)
260
266
  rails-observers (0.1.5)
261
267
  activemodel (>= 4.0)
262
- railties (6.1.7.6)
263
- actionpack (= 6.1.7.6)
264
- activesupport (= 6.1.7.6)
268
+ railties (7.0.8)
269
+ actionpack (= 7.0.8)
270
+ activesupport (= 7.0.8)
265
271
  method_source
266
272
  rake (>= 12.2)
267
273
  thor (~> 1.0)
274
+ zeitwerk (~> 2.5)
268
275
  rake (13.1.0)
269
276
  ransack (4.1.1)
270
277
  activerecord (>= 6.1.5)
@@ -329,9 +336,9 @@ GEM
329
336
  temple (0.10.0)
330
337
  terrapin (0.6.0)
331
338
  climate_control (>= 0.0.3, < 1.0)
332
- thor (1.2.2)
339
+ thor (1.3.0)
333
340
  tilt (2.1.0)
334
- timeout (0.4.0)
341
+ timeout (0.4.1)
335
342
  trustygems (0.2.1)
336
343
  rake
337
344
  tzinfo (2.0.6)
data/app/models/page.rb CHANGED
@@ -1,6 +1,10 @@
1
+ require 'trusty_cms/taggable'
2
+
1
3
  class Page < ActiveRecord::Base
2
4
  class MissingRootPageError < StandardError
3
- def initialize(message = 'Database missing root page'); super end
5
+ def initialize(message = 'Database missing root page')
6
+ ; super
7
+ end
4
8
  end
5
9
 
6
10
  # Callbacks
@@ -65,6 +69,7 @@ class Page < ActiveRecord::Base
65
69
  def child_path(child)
66
70
  clean_path(path + '/' + child.slug)
67
71
  end
72
+
68
73
  alias_method :child_url, :child_path
69
74
 
70
75
  def part(name)
@@ -118,6 +123,7 @@ class Page < ActiveRecord::Base
118
123
  clean_path(slug)
119
124
  end
120
125
  end
126
+
121
127
  alias_method :url, :path
122
128
 
123
129
  def process(request, response)
@@ -157,6 +163,7 @@ class Page < ActiveRecord::Base
157
163
  end
158
164
  end
159
165
  end
166
+
160
167
  private :set_content_type
161
168
 
162
169
  def response_code
@@ -256,11 +263,11 @@ class Page < ActiveRecord::Base
256
263
  @display_name = string
257
264
  else
258
265
  @display_name ||= begin
259
- n = name.to_s
260
- n.sub(/^(.+?)Page$/, '\1')
261
- n.gsub(/([A-Z])/, ' \1')
262
- n.strip
263
- end
266
+ n = name.to_s
267
+ n.sub(/^(.+?)Page$/, '\1')
268
+ n.gsub(/([A-Z])/, ' \1')
269
+ n.strip
270
+ end
264
271
  end
265
272
  @display_name = @display_name + ' - not installed' if missing? && @display_name !~ /not installed/
266
273
  @display_name
@@ -355,6 +362,7 @@ class Page < ActiveRecord::Base
355
362
  def clean_path(path)
356
363
  "/#{path.to_s.strip}".gsub(%r{//+}, '/')
357
364
  end
365
+
358
366
  alias_method :clean_url, :clean_path
359
367
 
360
368
  def parent?
@@ -17,8 +17,7 @@ end
17
17
  module TrustyCms
18
18
  class Application < Rails::Application
19
19
  include TrustyCms::Initializer
20
- config.active_record.whitelist_attributes = true
21
-
20
+ Rails.autoloaders.log!
22
21
  # Enable the asset pipeline
23
22
  config.assets.enabled = true
24
23
 
@@ -26,6 +25,7 @@ module TrustyCms
26
25
  config.assets.version = '1.0'
27
26
 
28
27
  # Initialize extension paths
28
+ config.eager_load_paths << Rails.root.join('vendor', 'extensions')
29
29
  config.initialize_extension_paths
30
30
  extension_loader = ExtensionLoader.instance { |l| l.initializer = self }
31
31
  extension_loader.paths(:load).reverse_each do |path|
@@ -77,16 +77,18 @@ module TrustyCms
77
77
  end
78
78
  end
79
79
  config.after_initialize do
80
- extension_loader.load_extensions
81
- extension_loader.load_extension_initializers
80
+ # extension_loader.load_extensions
81
+ # extension_loader.load_extension_initializers
82
82
 
83
83
  extension_loader.activate_extensions # also calls initialize_views
84
84
  # config.add_controller_paths(extension_loader.paths(:controller))
85
85
  # config.add_eager_load_paths(extension_loader.paths(:eager_load))
86
86
 
87
87
  # Add new inflection rules using the following format:
88
- ActiveSupport::Inflector.inflections do |inflect|
89
- inflect.uncountable 'config'
88
+ Rails.autoloaders.each do |autoloader|
89
+ autoloader.inflector.inflect(
90
+ 'config' => 'Configuration'
91
+ )
90
92
  end
91
93
  end
92
94
  end
@@ -1,5 +1,5 @@
1
1
  require 'simpleton'
2
- require 'ostruct'
2
+ require 'open_struct'
3
3
 
4
4
  module TrustyCms
5
5
  class AdminUI
@@ -1,5 +1,6 @@
1
1
  module TrustyCms
2
2
  class Engine < Rails::Engine
3
+ isolate_namespace TrustyCms
3
4
  paths['app/helpers'] = []
4
5
  initializer 'trusty_cms.assets.precompile' do |app|
5
6
  app.config.assets.paths << Rails.root.join('../trusty-cms/node_modules')
@@ -1,4 +1,4 @@
1
- require 'ostruct'
1
+ require 'open_struct'
2
2
  module TrustyCms
3
3
  module ResourceResponses
4
4
  def self.extended(base)
@@ -64,6 +64,7 @@ module TrustyCms
64
64
 
65
65
  class Response
66
66
  attr_reader :publish_formats, :publish_block, :blocks, :block_order
67
+
67
68
  def initialize
68
69
  @publish_formats = []
69
70
  @blocks = {}
@@ -0,0 +1,3 @@
1
+ module TrustyCms
2
+ VERSION = '6.2.0'.freeze
3
+ end
data/lib/trusty_cms.rb CHANGED
@@ -1,8 +1,7 @@
1
- TRUSTY_CMS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) unless defined? TRUSTY_CMS_ROOT
1
+ require 'trusty_cms/version'
2
+ require 'trusty_cms/engine'
2
3
 
3
- unless defined? TrustyCms::VERSION
4
- module TrustyCms
5
- VERSION = '6.1.2'.freeze
6
- end
4
+ module TrustyCms
7
5
  end
8
6
 
7
+ TRUSTY_CMS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) unless defined? TRUSTY_CMS_ROOT
@@ -0,0 +1,8 @@
1
+ Rails.autoloaders.each do |autoloader|
2
+ autoloader.inflector.inflect(
3
+ 'clipped_admin_ui' => 'ClippedAdminUI',
4
+ 'admin_ui' => 'AdminUI',
5
+ 'ostruct' => 'OpenStruct',
6
+ # Add more inflections as needed
7
+ )
8
+ end
data/trusty_cms.gemspec CHANGED
@@ -1,8 +1,10 @@
1
1
  # -*- encoding: utf-8 -*-
2
+ # frozen_string_literal: true
2
3
 
3
- require File.expand_path(__FILE__ + '/../lib/trusty_cms.rb')
4
+ $:.push File.expand_path('lib', __dir__)
5
+ require_relative 'lib/trusty_cms/version'
4
6
  Gem::Specification.new do |s|
5
- s.required_ruby_version = '>=2.5.3'
7
+ s.required_ruby_version = '>= 3.0.5'
6
8
  s.name = 'trusty-cms'
7
9
  s.version = TrustyCms::VERSION
8
10
  s.platform = Gem::Platform::RUBY
@@ -19,6 +19,7 @@ class MultiSiteExtension < TrustyCms::Extension
19
19
  # ActionController::Base.send :include, MultiSite::ApplicationControllerExtensions
20
20
  SiteController.send :include, MultiSite::SiteControllerExtensions
21
21
  Admin::ResourceController.send :include, MultiSite::ResourceControllerExtensions
22
+ Admin::PagesController.send :include, MultiSite::ResourceControllerExtensions
22
23
  Admin::PagesController.send :include, MultiSite::PagesControllerExtensions
23
24
  Admin::ResourceController.send :helper, MultiSite::SiteChooserHelper
24
25
  Admin::PagesController.send :helper, MultiSite::SiteChooserHelper
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.1.2
4
+ version: 6.2.0
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-12-19 00:00:00.000000000 Z
11
+ date: 2024-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activestorage-validator
@@ -954,7 +954,7 @@ files:
954
954
  - lib/inheritable_class_attributes.rb
955
955
  - lib/login_system.rb
956
956
  - lib/method_observer.rb
957
- - lib/ostruct.rb
957
+ - lib/open_struct.rb
958
958
  - lib/simpleton.rb
959
959
  - lib/string_extensions/string_extensions.rb
960
960
  - lib/symbol_extensions/symbol_extensions.rb
@@ -985,6 +985,7 @@ files:
985
985
  - lib/trusty_cms/setup.rb
986
986
  - lib/trusty_cms/taggable.rb
987
987
  - lib/trusty_cms/task_support.rb
988
+ - lib/trusty_cms/version.rb
988
989
  - log/.keep
989
990
  - package.json
990
991
  - public/.htaccess
@@ -1025,6 +1026,7 @@ files:
1025
1026
  - spec/dummy/config/initializers/session_store.rb
1026
1027
  - spec/dummy/config/initializers/trusty_cms_config.rb
1027
1028
  - spec/dummy/config/initializers/wrap_parameters.rb
1029
+ - spec/dummy/config/initializers/zeitwerk.rb
1028
1030
  - spec/dummy/config/locales/en.yml
1029
1031
  - spec/dummy/config/routes.rb
1030
1032
  - spec/dummy/config/secrets.yml
@@ -1135,7 +1137,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1135
1137
  requirements:
1136
1138
  - - ">="
1137
1139
  - !ruby/object:Gem::Version
1138
- version: 2.5.3
1140
+ version: 3.0.5
1139
1141
  required_rubygems_version: !ruby/object:Gem::Requirement
1140
1142
  requirements:
1141
1143
  - - ">"
@@ -1164,6 +1166,7 @@ test_files:
1164
1166
  - spec/dummy/config/environments/development.rb
1165
1167
  - spec/dummy/config/environments/test.rb
1166
1168
  - spec/dummy/config/environments/production.rb
1169
+ - spec/dummy/config/initializers/zeitwerk.rb
1167
1170
  - spec/dummy/config/initializers/mime_types.rb
1168
1171
  - spec/dummy/config/initializers/backtrace_silencers.rb
1169
1172
  - spec/dummy/config/initializers/session_store.rb
File without changes