trusty-cms 5.3.2 → 5.3.3
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 +9 -6
- data/app/controllers/admin/assets_controller.rb +15 -10
- data/app/models/asset.rb +1 -1
- data/lib/trusty_cms.rb +1 -1
- data/package.json +1 -1
- data/yarn.lock +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c591245f6321610691f2d9342e479eb1b4debdd6db8c9954716487d0ae858f2
|
4
|
+
data.tar.gz: 33c8cdeca0c6ca6cce01bda86a2ad35305659b6170e95420aac4418df219aa35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebcefc1ffbceb9e91b955eb531f3e6b034605b29c705a11c602c844c5ceaad43ca5178d995f82a09a35db10ca16edb4c453b8c5a45e017b894b5de3f4b417b9f
|
7
|
+
data.tar.gz: e9df006914845d2d435815ffe12d76d80b47c26ba8e0887d8d2b9aba6b9ce6e9141178f9bceb61d6798148d17624d8830e8267c03a157ff9a28efd9e1af14c31
|
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,11 @@ GEM
|
|
202
202
|
libv8-node (~> 16.10.0.0)
|
203
203
|
minitest (5.15.0)
|
204
204
|
multi_xml (0.6.0)
|
205
|
-
|
206
|
-
|
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.
|
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.
|
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
|
-
|
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
|
|
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/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.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-
|
11
|
+
date: 2022-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activestorage-validator
|