trusty-cms 5.3.2 → 5.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +7 -7
- data/app/controllers/admin/assets_controller.rb +15 -10
- data/app/mailers/rad_social_mailer.rb +1 -1
- data/app/models/asset.rb +1 -1
- data/app/models/standard_tags.rb +3 -3
- data/lib/generators/extension/templates/spec_helper.rb +2 -2
- data/lib/generators/extension/templates/test_helper.rb +2 -2
- data/lib/generators/instance/templates/instance_boot.rb +1 -1
- data/lib/generators/instance/templates/instance_environment.rb +1 -2
- data/lib/generators/language_extension/templates/spec_helper.rb +2 -2
- data/lib/generators/language_extension/templates/test_helper.rb +2 -2
- data/lib/generators/trusty_cms/templates/application.rb.erb +1 -3
- data/lib/tasks/database.rake +4 -4
- data/lib/tasks/framework.rake +1 -1
- data/lib/tasks/radiant_config.rake +4 -4
- data/lib/tasks/upgrade_to_devise.rake +2 -2
- data/lib/trusty_cms.rb +1 -1
- data/package.json +1 -1
- data/yarn.lock +4 -4
- metadata +37 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f41c5db88399ed3675b8082e59ed41c9bf5fdfedf929575c4b8fc5100edf54b
|
4
|
+
data.tar.gz: daef5f8d9dfde5ccb49d4e0c41f547515ce90414809d8e3e053af21318ad823f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f03979458cf796043da050714854a889eea8c3a846c6ab0358c5ec015a9bebcc742153fabbee0613c73b0b5e4e9e693f4ebe21f58a60cf3c53d248d8532138a
|
7
|
+
data.tar.gz: 3572d0b7d1cb9b2eb99877960b7fa3ceb8dc82eb4b3197971c43bd3e51a0ca48aceb9abefce3d7b3fd7e1dad21d8b35da6327e7d2e1d8ed3cc5ade8584bc5900
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
trusty-cms (5.3)
|
4
|
+
trusty-cms (5.3.3)
|
5
5
|
RedCloth (= 4.3.2)
|
6
6
|
activestorage-validator
|
7
7
|
acts_as_list (>= 0.9.5, < 1.1.0)
|
@@ -202,8 +202,8 @@ GEM
|
|
202
202
|
libv8-node (~> 16.10.0.0)
|
203
203
|
minitest (5.15.0)
|
204
204
|
multi_xml (0.6.0)
|
205
|
-
multipart-post (2.
|
206
|
-
mysql2 (0.5.
|
205
|
+
multipart-post (2.2.2)
|
206
|
+
mysql2 (0.5.4)
|
207
207
|
nio4r (2.5.8)
|
208
208
|
nokogiri (1.12.5-x86_64-darwin)
|
209
209
|
racc (~> 1.4)
|
@@ -220,11 +220,11 @@ GEM
|
|
220
220
|
pry-byebug (3.9.0)
|
221
221
|
byebug (~> 11.0)
|
222
222
|
pry (~> 0.13.0)
|
223
|
-
psych (4.0.
|
223
|
+
psych (4.0.4)
|
224
224
|
stringio
|
225
225
|
public_suffix (4.0.6)
|
226
226
|
racc (1.6.0)
|
227
|
-
rack (2.2.
|
227
|
+
rack (2.2.4)
|
228
228
|
rack-cache (1.13.0)
|
229
229
|
rack (>= 0.4)
|
230
230
|
rack-test (1.1.0)
|
@@ -248,7 +248,7 @@ GEM
|
|
248
248
|
rails-dom-testing (2.0.3)
|
249
249
|
activesupport (>= 4.2.0)
|
250
250
|
nokogiri (>= 1.6)
|
251
|
-
rails-html-sanitizer (1.4.
|
251
|
+
rails-html-sanitizer (1.4.3)
|
252
252
|
loofah (~> 2.3)
|
253
253
|
rails-observers (0.1.5)
|
254
254
|
activemodel (>= 4.0)
|
@@ -356,7 +356,7 @@ DEPENDENCIES
|
|
356
356
|
mysql2
|
357
357
|
poltergeist (~> 1.18.1)
|
358
358
|
pry-byebug
|
359
|
-
psych (= 4.0.
|
359
|
+
psych (= 4.0.4)
|
360
360
|
rails-observers
|
361
361
|
rspec-rails
|
362
362
|
simplecov
|
@@ -41,18 +41,23 @@ class Admin::AssetsController < Admin::ResourceController
|
|
41
41
|
else
|
42
42
|
uploaded_asset = compress(uploaded_asset) if $kraken.api_key.present? && COMPRESS_FILE_TYPE.include?(uploaded_asset.content_type) && compress
|
43
43
|
@asset = Asset.create(asset: uploaded_asset, caption: asset_params[:asset][:caption])
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
44
|
+
if @asset.valid?
|
45
|
+
set_owner_or_editor
|
46
|
+
if params[:for_attachment]
|
47
|
+
@page = Page.find_by_id(params[:page_id]) || Page.new
|
48
|
+
@page_attachments << @page_attachment = @asset.page_attachments.build(page: @page)
|
49
|
+
end
|
50
|
+
@assets << @asset
|
51
|
+
else
|
52
|
+
error = @asset.errors.first.message
|
53
|
+
flash[:error] = error
|
48
54
|
end
|
49
|
-
@assets << @asset
|
50
55
|
end
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
+
if asset_params[:for_attachment]
|
57
|
+
render partial: 'admin/page_attachments/attachment', collection: @page_attachments
|
58
|
+
else
|
59
|
+
response_for :create
|
60
|
+
end
|
56
61
|
end
|
57
62
|
end
|
58
63
|
|
@@ -10,7 +10,7 @@ class RadSocialMailer < ApplicationMailer
|
|
10
10
|
@from_name = from_address.display_name
|
11
11
|
@from_email = from_address
|
12
12
|
@message = options[:message]
|
13
|
-
@actual_from = ENV
|
13
|
+
@actual_from = ENV.fetch('RAD_SOCIAL_FROM_EMAIL')
|
14
14
|
@actual_from = from_address if @actual_from.nil?
|
15
15
|
|
16
16
|
mail({
|
data/app/models/asset.rb
CHANGED
@@ -37,7 +37,7 @@ class Asset < ActiveRecord::Base
|
|
37
37
|
blob:
|
38
38
|
{
|
39
39
|
content_type: %w[application/zip image/jpg image/jpeg image/png image/gif application/pdf text/css],
|
40
|
-
size_range: 1..
|
40
|
+
size_range: 1..10.megabytes,
|
41
41
|
}
|
42
42
|
before_save :assign_title
|
43
43
|
before_save :assign_uuid
|
data/app/models/standard_tags.rb
CHANGED
@@ -362,7 +362,7 @@ module StandardTags
|
|
362
362
|
tag.locals.page = aggregate_page
|
363
363
|
aggregates << tag.expand
|
364
364
|
end
|
365
|
-
aggregates.flatten.join
|
365
|
+
aggregates.flatten.join
|
366
366
|
end
|
367
367
|
|
368
368
|
tag 'aggregate:each:children' do |tag|
|
@@ -380,7 +380,7 @@ module StandardTags
|
|
380
380
|
tag.locals.page = item
|
381
381
|
result << tag.expand
|
382
382
|
end
|
383
|
-
result.flatten.join
|
383
|
+
result.flatten.join
|
384
384
|
end
|
385
385
|
|
386
386
|
tag 'aggregate:children' do |tag|
|
@@ -976,7 +976,7 @@ module StandardTags
|
|
976
976
|
tag.locals.paginated_list = displayed_children
|
977
977
|
result << tag.render('pagination', tag.attr.dup)
|
978
978
|
end
|
979
|
-
result.flatten.join
|
979
|
+
result.flatten.join
|
980
980
|
end
|
981
981
|
|
982
982
|
def children_find_options(tag)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
unless defined? TRUSTY_CMS_ROOT
|
2
2
|
ENV["Rails.env"] = "test"
|
3
3
|
case
|
4
|
-
when ENV
|
5
|
-
require ENV
|
4
|
+
when ENV.fetch('RADIANT_ENV_FILE')
|
5
|
+
require ENV.fetch('RADIANT_ENV_FILE')
|
6
6
|
when File.dirname(__FILE__) =~ %r{vendor/trusty_cms/vendor/extensions}
|
7
7
|
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../../")}/config/environment"
|
8
8
|
else
|
@@ -3,8 +3,8 @@ require 'test/unit'
|
|
3
3
|
unless defined? TRUSTY_CMS_ROOT
|
4
4
|
ENV['Rails.env'] = 'test'
|
5
5
|
case
|
6
|
-
when ENV
|
7
|
-
require ENV
|
6
|
+
when ENV.fetch('RADIANT_ENV_FILE')
|
7
|
+
require ENV.fetch('RADIANT_ENV_FILE')
|
8
8
|
when File.dirname(__FILE__) =~ %r{vendor/trusty_cms/vendor/extensions}
|
9
9
|
require "#{File.expand_path(File.dirname(__FILE__) + '/../../../../../../')}/config/environment"
|
10
10
|
else
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# Configure your app in config/environment.rb and config/environments/*.rb
|
3
3
|
|
4
4
|
Rails.root = "#{File.dirname(__FILE__)}/.." unless defined?(Rails.root)
|
5
|
-
Rails.env = (
|
5
|
+
Rails.env = ENV.fetch('RAILS_ENV', 'development').dup unless defined?(Rails.env)
|
6
6
|
|
7
7
|
module Rails
|
8
8
|
class << self
|
@@ -59,8 +59,7 @@ TrustyCms::Initializer.run do |config|
|
|
59
59
|
:verbose => false,
|
60
60
|
:allow_reload => false,
|
61
61
|
:allow_revalidate => false
|
62
|
-
|
63
|
-
# TODO: Workaround from: https://github.com/rtomayko/rack-cache/issues/80
|
62
|
+
|
64
63
|
config.middleware.insert_before(Rack::ConditionalGet, Rack::Cache)
|
65
64
|
config.assets.enabled = true
|
66
65
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
unless defined? TRUSTY_CMS_ROOT
|
2
2
|
ENV["Rails.env"] = "test"
|
3
3
|
case
|
4
|
-
when ENV
|
5
|
-
require ENV
|
4
|
+
when ENV.fetch('RADIANT_ENV_FILE')
|
5
|
+
require ENV.fetch('RADIANT_ENV_FILE')
|
6
6
|
when File.dirname(__FILE__) =~ %r{vendor/trusty_cms/vendor/extensions}
|
7
7
|
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../../")}/config/environment"
|
8
8
|
else
|
@@ -3,8 +3,8 @@ require 'test/unit'
|
|
3
3
|
unless defined? TRUSTY_CMS_ROOT
|
4
4
|
ENV["Rails.env"] = "test"
|
5
5
|
case
|
6
|
-
when ENV
|
7
|
-
require ENV
|
6
|
+
when ENV.fetch('RADIANT_ENV_FILE')
|
7
|
+
require ENV.fetch('RADIANT_ENV_FILE')
|
8
8
|
when File.dirname(__FILE__) =~ %r{vendor/trusty_cms/vendor/extensions}
|
9
9
|
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../../")}/config/environment"
|
10
10
|
else
|
@@ -86,7 +86,6 @@ module TrustyCms
|
|
86
86
|
# radiant: since this will enable manual expiration and acceleration headers.
|
87
87
|
|
88
88
|
|
89
|
-
# TODO: We're not sure this is actually working, but we can't really test this until the app initializes.
|
90
89
|
config.middleware.use Rack::Cache,
|
91
90
|
:private_headers => ['Authorization'],
|
92
91
|
:entitystore => "radiant:tmp/cache/entity",
|
@@ -94,8 +93,7 @@ module TrustyCms
|
|
94
93
|
:verbose => false,
|
95
94
|
:allow_reload => false,
|
96
95
|
:allow_revalidate => false
|
97
|
-
|
98
|
-
# TODO: Workaround from: https://github.com/rtomayko/rack-cache/issues/80
|
96
|
+
|
99
97
|
config.middleware.insert_before(Rack::ConditionalGet, Rack::Cache)
|
100
98
|
config.assets.enabled = true
|
101
99
|
|
data/lib/tasks/database.rake
CHANGED
@@ -59,10 +59,10 @@ namespace :db do
|
|
59
59
|
task bootstrap: :initialize do
|
60
60
|
require 'trusty_cms/setup'
|
61
61
|
TrustyCms::Setup.bootstrap(
|
62
|
-
admin_name: ENV
|
63
|
-
admin_username: ENV
|
64
|
-
admin_password: ENV
|
65
|
-
database_template: ENV
|
62
|
+
admin_name: ENV.fetch('ADMIN_NAME'),
|
63
|
+
admin_username: ENV.fetch('ADMIN_USERNAME'),
|
64
|
+
admin_password: ENV.fetch('ADMIN_PASSWORD'),
|
65
|
+
database_template: ENV.fetch('DATABASE_TEMPLATE'),
|
66
66
|
)
|
67
67
|
puts %{
|
68
68
|
Your TrustyCms application is ready to use. Run `rails s -e production` to
|
data/lib/tasks/framework.rake
CHANGED
@@ -7,7 +7,7 @@ unless File.directory? "#{Rails.root}/app"
|
|
7
7
|
require 'rubygems'
|
8
8
|
require 'rubygems/gem_runner'
|
9
9
|
|
10
|
-
trusty = (version = ENV
|
10
|
+
trusty = (version = ENV.fetch('VERSION')) ?
|
11
11
|
Gem.cache.search('trusty-cms', "= #{version}").first :
|
12
12
|
Gem.cache.search('trusty-cms').max_by { |g| g.version }
|
13
13
|
|
@@ -3,15 +3,15 @@ namespace :trusty_cms do
|
|
3
3
|
namespace :config do
|
4
4
|
desc 'Export TrustyCms::Config to Rails.root/config/trusty_config.yml. Specify a path with TRUSTY_CONFIG_PATH - defaults to Rails.root/config/trusty_config.yml'
|
5
5
|
task export: :environment do
|
6
|
-
config_path = ENV
|
7
|
-
clear = ENV
|
6
|
+
config_path = ENV.fetch('TRUSTY_CONFIG_PATH') { "#{Rails.root}/config/trusty_config.yml" }
|
7
|
+
clear = ENV.fetch('CLEAR_CONFIG', nil)
|
8
8
|
TrustyCms::TaskSupport.config_export(config_path)
|
9
9
|
end
|
10
10
|
|
11
11
|
desc 'Import TrustyCms::Config from Rails.root/config/trusty_config.yml. Specify a path with TRUSTY_CONFIG_PATH - defaults to Rails.root/config/trusty_config.yml Set CLEAR_CONFIG=true to delete all existing settings before import'
|
12
12
|
task import: :environment do
|
13
|
-
config_path = ENV
|
14
|
-
clear = ENV
|
13
|
+
config_path = ENV('TRUSTY_CONFIG_PATH') { "#{Rails.root}/config/trusty_config.yml" }
|
14
|
+
clear = ENV.fetch('CLEAR_CONFIG', nil)
|
15
15
|
TrustyCms::TaskSupport.config_import(config_path, clear)
|
16
16
|
end
|
17
17
|
end
|
@@ -10,8 +10,8 @@ namespace :import do
|
|
10
10
|
LegacyUser.all.each do |legacy|
|
11
11
|
u = User.new(
|
12
12
|
email: legacy.email,
|
13
|
-
first_name: legacy.name.split
|
14
|
-
last_name: legacy.name.split
|
13
|
+
first_name: legacy.name.split[0],
|
14
|
+
last_name: legacy.name.split[1],
|
15
15
|
password: password,
|
16
16
|
password_confirmation: password,
|
17
17
|
admin: legacy.admin,
|
data/lib/trusty_cms.rb
CHANGED
data/package.json
CHANGED
data/yarn.lock
CHANGED
@@ -974,10 +974,10 @@ jquery-ujs@^1.2.2:
|
|
974
974
|
dependencies:
|
975
975
|
jquery ">=1.8.0"
|
976
976
|
|
977
|
-
jquery-validation@^1.19.
|
978
|
-
version "1.19.
|
979
|
-
resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.19.
|
980
|
-
integrity sha512-
|
977
|
+
jquery-validation@^1.19.5:
|
978
|
+
version "1.19.5"
|
979
|
+
resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.19.5.tgz#557495b7cad79716897057c4447ad3cd76fda811"
|
980
|
+
integrity sha512-X2SmnPq1mRiDecVYL8edWx+yTBZDyC8ohWXFhXdtqFHgU9Wd4KHkvcbCoIZ0JaSaumzS8s2gXSkP8F7ivg/8ZQ==
|
981
981
|
|
982
982
|
jquery@>=1.6:
|
983
983
|
version "3.6.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: 5.3.
|
4
|
+
version: 5.3.5
|
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: 2022-
|
11
|
+
date: 2022-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activestorage-validator
|
@@ -1169,51 +1169,51 @@ specification_version: 4
|
|
1169
1169
|
summary: A no-fluff content management system designed for small teams.
|
1170
1170
|
test_files:
|
1171
1171
|
- spec/fixtures/users.yml
|
1172
|
-
- spec/
|
1173
|
-
- spec/
|
1174
|
-
- spec/dummy/public/404.html
|
1175
|
-
- spec/dummy/public/favicon.ico
|
1176
|
-
- spec/dummy/app/assets/config/manifest.js
|
1177
|
-
- spec/dummy/db/schema.rb
|
1172
|
+
- spec/models/layout_spec.rb
|
1173
|
+
- spec/spec_helper.rb
|
1178
1174
|
- spec/dummy/config.ru
|
1179
|
-
- spec/dummy/package.json
|
1180
1175
|
- spec/dummy/bin/rake
|
1181
|
-
- spec/dummy/bin/rails
|
1182
1176
|
- spec/dummy/bin/setup
|
1183
1177
|
- spec/dummy/bin/bundle
|
1178
|
+
- spec/dummy/bin/rails
|
1179
|
+
- spec/dummy/public/422.html
|
1180
|
+
- spec/dummy/public/500.html
|
1181
|
+
- spec/dummy/public/favicon.ico
|
1182
|
+
- spec/dummy/public/404.html
|
1184
1183
|
- spec/dummy/README.rdoc
|
1185
|
-
- spec/dummy/
|
1186
|
-
- spec/dummy/config/
|
1187
|
-
- spec/dummy/config/
|
1184
|
+
- spec/dummy/yarn.lock
|
1185
|
+
- spec/dummy/config/secrets.yml
|
1186
|
+
- spec/dummy/config/locales/en.yml
|
1188
1187
|
- spec/dummy/config/environments/test.rb
|
1189
|
-
- spec/dummy/config/environments/development.rb
|
1190
1188
|
- spec/dummy/config/environments/production.rb
|
1191
|
-
- spec/dummy/config/
|
1192
|
-
- spec/dummy/config/
|
1193
|
-
- spec/dummy/config/
|
1194
|
-
- spec/dummy/config/
|
1189
|
+
- spec/dummy/config/environments/development.rb
|
1190
|
+
- spec/dummy/config/database.yml
|
1191
|
+
- spec/dummy/config/application.rb
|
1192
|
+
- spec/dummy/config/boot.rb
|
1193
|
+
- spec/dummy/config/environment.rb
|
1194
|
+
- spec/dummy/config/initializers/inflections.rb
|
1195
1195
|
- spec/dummy/config/initializers/session_store.rb
|
1196
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
1197
1196
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
1198
|
-
- spec/dummy/config/initializers/
|
1197
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
1198
|
+
- spec/dummy/config/initializers/mime_types.rb
|
1199
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
1200
|
+
- spec/dummy/config/initializers/assets.rb
|
1199
1201
|
- spec/dummy/config/initializers/trusty_cms_config.rb
|
1200
|
-
- spec/dummy/config/
|
1201
|
-
- spec/dummy/config/
|
1202
|
-
- spec/dummy/config/
|
1203
|
-
- spec/dummy/
|
1204
|
-
- spec/dummy/
|
1205
|
-
- spec/dummy/
|
1206
|
-
- spec/ci/database.mysql.yml
|
1207
|
-
- spec/support/custom_actions.rb
|
1208
|
-
- spec/rails_helper.rb
|
1209
|
-
- spec/factories/user.rb
|
1210
|
-
- spec/factories/page_part.rb
|
1211
|
-
- spec/factories/layout.rb
|
1202
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
1203
|
+
- spec/dummy/config/routes.rb
|
1204
|
+
- spec/dummy/app/assets/config/manifest.js
|
1205
|
+
- spec/dummy/package.json
|
1206
|
+
- spec/dummy/db/schema.rb
|
1207
|
+
- spec/dummy/Rakefile
|
1212
1208
|
- spec/factories/page.rb
|
1209
|
+
- spec/factories/layout.rb
|
1210
|
+
- spec/factories/page_part.rb
|
1211
|
+
- spec/factories/user.rb
|
1212
|
+
- spec/features/config_spec.rb
|
1213
|
+
- spec/features/pages_spec.rb
|
1214
|
+
- spec/features/layouts_spec.rb
|
1215
|
+
- spec/support/custom_actions.rb
|
1213
1216
|
- spec/controllers/users_controller_spec.rb
|
1214
1217
|
- spec/controllers/application_controller_spec.rb
|
1215
|
-
- spec/
|
1216
|
-
- spec/
|
1217
|
-
- spec/features/pages_spec.rb
|
1218
|
-
- spec/features/config_spec.rb
|
1219
|
-
- spec/models/layout_spec.rb
|
1218
|
+
- spec/ci/database.mysql.yml
|
1219
|
+
- spec/rails_helper.rb
|