trusty-cms 5.3 → 5.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38fabf49ce5ba5526134087066b03104bffd2068b1cae9fff879905e67ce1185
4
- data.tar.gz: 8272cba43aef447d20d5e7320998c7f61a081cd2194f59d12419a8047f33f87d
3
+ metadata.gz: 4c591245f6321610691f2d9342e479eb1b4debdd6db8c9954716487d0ae858f2
4
+ data.tar.gz: 33c8cdeca0c6ca6cce01bda86a2ad35305659b6170e95420aac4418df219aa35
5
5
  SHA512:
6
- metadata.gz: c907cb268f754852fa624b73be17dfb7d428b00aa9259b5557a3050ca7809ff618f37375b6876c085bc44b4ae6df981d84ae2943ba0d2b9e8a7f1fe33fb13620
7
- data.tar.gz: 9986b6a5c0873b5f6b51581be2028146e3c98a5f0994de24d90a607377bb68d99ff554e9b7dbbbc3e891baf5ddbe88e1aeda5e7aa8c33317e3c1b65f3c4b6d1d
6
+ metadata.gz: ebcefc1ffbceb9e91b955eb531f3e6b034605b29c705a11c602c844c5ceaad43ca5178d995f82a09a35db10ca16edb4c453b8c5a45e017b894b5de3f4b417b9f
7
+ data.tar.gz: e9df006914845d2d435815ffe12d76d80b47c26ba8e0887d8d2b9aba6b9ce6e9141178f9bceb61d6798148d17624d8830e8267c03a157ff9a28efd9e1af14c31
data/Gemfile CHANGED
@@ -21,7 +21,7 @@ group :development, :test do
21
21
  gem 'mysql2'
22
22
  gem 'poltergeist', '~> 1.18.1'
23
23
  gem 'pry-byebug'
24
- gem 'psych', '4.0.3'
24
+ gem 'psych', '4.0.4'
25
25
  gem 'rails-observers'
26
26
  gem 'rspec-rails'
27
27
  gem 'simplecov'
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,11 @@ 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.1.1)
206
- mysql2 (0.5.3)
205
+
206
+ multipart-post (2.2.2)
207
+
208
+ mysql2 (0.5.4)
209
+
207
210
  nio4r (2.5.8)
208
211
  nokogiri (1.12.5-x86_64-darwin)
209
212
  racc (~> 1.4)
@@ -220,11 +223,11 @@ GEM
220
223
  pry-byebug (3.9.0)
221
224
  byebug (~> 11.0)
222
225
  pry (~> 0.13.0)
223
- psych (4.0.3)
226
+ psych (4.0.4)
224
227
  stringio
225
228
  public_suffix (4.0.6)
226
229
  racc (1.6.0)
227
- rack (2.2.3)
230
+ rack (2.2.3.1)
228
231
  rack-cache (1.13.0)
229
232
  rack (>= 0.4)
230
233
  rack-test (1.1.0)
@@ -356,7 +359,7 @@ DEPENDENCIES
356
359
  mysql2
357
360
  poltergeist (~> 1.18.1)
358
361
  pry-byebug
359
- psych (= 4.0.3)
362
+ psych (= 4.0.4)
360
363
  rails-observers
361
364
  rspec-rails
362
365
  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
- set_owner_or_editor
45
- if params[:for_attachment]
46
- @page = Page.find_by_id(params[:page_id]) || Page.new
47
- @page_attachments << @page_attachment = @asset.page_attachments.build(page: @page)
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
- end
52
- if asset_params[:for_attachment]
53
- render partial: 'admin/page_attachments/attachment', collection: @page_attachments
54
- else
55
- response_for :create
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
 
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..5.megabytes,
40
+ size_range: 1..10.megabytes,
41
41
  }
42
42
  before_save :assign_title
43
43
  before_save :assign_uuid
data/lib/trusty_cms.rb CHANGED
@@ -2,6 +2,6 @@ TRUSTY_CMS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) unle
2
2
 
3
3
  unless defined? TrustyCms::VERSION
4
4
  module TrustyCms
5
- VERSION = '5.3'.freeze
5
+ VERSION = '5.3.3'.freeze
6
6
  end
7
7
  end
data/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "trusty-cms",
3
- "version": "3.1.6",
4
- "description": "TrustyCMS is a branch of Radiant CMS. Its goal is to pull the Radiant framework into Rails 5 with minimal changes to its infrastructure.",
3
+ "version": "5.3.1",
4
+ "description": "TrustyCMS is a branch of Radiant CMS. Its goal is to pull the Radiant framework into Rails 6 with minimal changes to its infrastructure.",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/pgharts/trusty-cms.git",
7
7
  "author": "Danielle Greaves <danigreaves@gmail.com>",
@@ -13,7 +13,7 @@
13
13
  "jquery-treetable": "^3.2.0-1",
14
14
  "jquery-ui-bundle": "^1.12.1",
15
15
  "jquery-ujs": "^1.2.2",
16
- "jquery-validation": "^1.19.3",
16
+ "jquery-validation": "^1.19.4",
17
17
  "js-cookie": "^3.0.1",
18
18
  "tablesaw": "^3.1.2"
19
19
  },
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.3:
978
- version "1.19.3"
979
- resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.19.3.tgz#50b350eba8b02bcfd119ba15f199487b7eb64086"
980
- integrity sha512-iXxCS5W7STthSTMFX/NDZfWHBLbJ1behVK3eAgHXAV8/0vRa9M4tiqHvJMr39VGWHMGdlkhrtrkBuaL2UlE8yw==
977
+ jquery-validation@^1.19.4:
978
+ version "1.19.4"
979
+ resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.19.4.tgz#a765781d954e5876fa437d5c75b7a9440bfa37a8"
980
+ integrity sha512-PcwKcATCR+JL77m9kkWd84NAHAunJP9iasF6IbMxUgl73xDAimxjt5oYFmYHDXBmTZM4rpkXxMNR/jGI5TlSjA==
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.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: 2022-06-01 00:00:00.000000000 Z
11
+ date: 2022-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activestorage-validator
@@ -1168,52 +1168,52 @@ signing_key:
1168
1168
  specification_version: 4
1169
1169
  summary: A no-fluff content management system designed for small teams.
1170
1170
  test_files:
1171
- - spec/dummy/db/schema.rb
1172
- - spec/dummy/yarn.lock
1173
- - spec/dummy/public/422.html
1171
+ - spec/fixtures/users.yml
1174
1172
  - spec/dummy/public/500.html
1173
+ - spec/dummy/public/422.html
1175
1174
  - spec/dummy/public/404.html
1176
1175
  - spec/dummy/public/favicon.ico
1177
1176
  - spec/dummy/app/assets/config/manifest.js
1178
- - spec/dummy/package.json
1177
+ - spec/dummy/db/schema.rb
1179
1178
  - spec/dummy/config.ru
1180
- - spec/dummy/config/environments/production.rb
1179
+ - spec/dummy/package.json
1180
+ - spec/dummy/bin/rake
1181
+ - spec/dummy/bin/rails
1182
+ - spec/dummy/bin/setup
1183
+ - spec/dummy/bin/bundle
1184
+ - spec/dummy/README.rdoc
1185
+ - spec/dummy/Rakefile
1186
+ - spec/dummy/config/application.rb
1187
+ - spec/dummy/config/routes.rb
1181
1188
  - spec/dummy/config/environments/test.rb
1182
1189
  - spec/dummy/config/environments/development.rb
1183
- - spec/dummy/config/environment.rb
1184
- - spec/dummy/config/secrets.yml
1185
- - spec/dummy/config/routes.rb
1186
- - spec/dummy/config/application.rb
1187
- - spec/dummy/config/initializers/backtrace_silencers.rb
1190
+ - spec/dummy/config/environments/production.rb
1191
+ - spec/dummy/config/initializers/assets.rb
1188
1192
  - spec/dummy/config/initializers/mime_types.rb
1189
- - spec/dummy/config/initializers/inflections.rb
1190
- - spec/dummy/config/initializers/wrap_parameters.rb
1191
1193
  - spec/dummy/config/initializers/cookies_serializer.rb
1194
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
1192
1195
  - spec/dummy/config/initializers/session_store.rb
1196
+ - spec/dummy/config/initializers/wrap_parameters.rb
1197
+ - spec/dummy/config/initializers/backtrace_silencers.rb
1198
+ - spec/dummy/config/initializers/inflections.rb
1193
1199
  - spec/dummy/config/initializers/trusty_cms_config.rb
1194
- - spec/dummy/config/initializers/filter_parameter_logging.rb
1195
- - spec/dummy/config/initializers/assets.rb
1196
1200
  - spec/dummy/config/locales/en.yml
1201
+ - spec/dummy/config/secrets.yml
1197
1202
  - spec/dummy/config/database.yml
1203
+ - spec/dummy/config/environment.rb
1198
1204
  - spec/dummy/config/boot.rb
1199
- - spec/dummy/Rakefile
1200
- - spec/dummy/bin/bundle
1201
- - spec/dummy/bin/rake
1202
- - spec/dummy/bin/rails
1203
- - spec/dummy/bin/setup
1204
- - spec/dummy/README.rdoc
1205
- - spec/features/pages_spec.rb
1206
- - spec/features/config_spec.rb
1207
- - spec/features/layouts_spec.rb
1205
+ - spec/dummy/yarn.lock
1206
+ - spec/ci/database.mysql.yml
1207
+ - spec/support/custom_actions.rb
1208
1208
  - spec/rails_helper.rb
1209
- - spec/controllers/users_controller_spec.rb
1210
- - spec/controllers/application_controller_spec.rb
1211
- - spec/fixtures/users.yml
1212
- - spec/models/layout_spec.rb
1213
- - spec/factories/layout.rb
1214
1209
  - spec/factories/user.rb
1215
- - spec/factories/page.rb
1216
1210
  - spec/factories/page_part.rb
1217
- - spec/support/custom_actions.rb
1218
- - spec/ci/database.mysql.yml
1211
+ - spec/factories/layout.rb
1212
+ - spec/factories/page.rb
1213
+ - spec/controllers/users_controller_spec.rb
1214
+ - spec/controllers/application_controller_spec.rb
1219
1215
  - spec/spec_helper.rb
1216
+ - spec/features/layouts_spec.rb
1217
+ - spec/features/pages_spec.rb
1218
+ - spec/features/config_spec.rb
1219
+ - spec/models/layout_spec.rb