trusty-cms 4.3.1 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/Gemfile.lock +99 -87
- data/app/assets/config/trusty-cms-manifest.js +6 -0
- data/app/assets/javascripts/ckeditor/config.js +2 -2
- data/app/assets/stylesheets/admin/partials/_content.scss +1 -0
- data/app/controllers/admin/assets_controller.rb +6 -2
- data/app/models/asset.rb +39 -48
- data/app/models/asset_type.rb +6 -2
- data/app/views/admin/assets/edit.html.haml +5 -3
- data/config/database.yml +2 -2
- data/config/locales/en.yml +1 -0
- data/coverage/index.html +1 -1
- data/lib/trusty_cms/deprecation.rb +13 -0
- data/lib/trusty_cms.rb +1 -1
- data/node_modules/path-parse/index.js +17 -35
- data/node_modules/path-parse/package.json +1 -1
- data/node_modules/postcss/CHANGELOG.md +27 -0
- data/node_modules/postcss/README.md +21 -0
- data/node_modules/postcss/lib/at-rule.js +2 -4
- data/node_modules/postcss/lib/comment.js +2 -4
- data/node_modules/postcss/lib/container.js +27 -122
- data/node_modules/postcss/lib/css-syntax-error.js +5 -7
- data/node_modules/postcss/lib/declaration.js +2 -4
- data/node_modules/postcss/lib/input.js +3 -5
- data/node_modules/postcss/lib/lazy-result.js +10 -17
- data/node_modules/postcss/lib/map-generator.js +10 -17
- data/node_modules/postcss/lib/node.js +2 -4
- data/node_modules/postcss/lib/parser.js +2 -4
- data/node_modules/postcss/lib/postcss.d.ts +25 -19
- data/node_modules/postcss/lib/previous-map.js +17 -6
- data/node_modules/postcss/lib/processor.js +16 -15
- data/node_modules/postcss/lib/result.js +2 -4
- data/node_modules/postcss/lib/root.js +10 -17
- data/node_modules/postcss/lib/rule.js +2 -4
- data/node_modules/postcss/lib/stringifier.js +2 -4
- data/node_modules/postcss/lib/warning.js +2 -4
- data/node_modules/postcss/package.json +16 -12
- data/spec/dummy/log/test.log +542 -443
- data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
- data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +1 -1
- data/trusty_cms.gemspec +4 -2
- data/vendor/extensions/clipped-extension/lib/clipped/engine.rb +1 -1
- data/yarn.lock +6 -6
- metadata +69 -345
- data/app/assets/config/trusty-cms/manifest.js +0 -7
- data/config/initializers/interpolation.rb +0 -6
- data/node_modules/path-parse/test.js +0 -77
- data/node_modules/postcss/docs/api/assets/scripts.min.js +0 -8
- data/node_modules/postcss/docs/api/assets/styles.min.css +0 -1
- data/node_modules/postcss/docs/api/index.html +0 -22716
- data/spec/dummy/log/development.log +0 -158
- data/spec/dummy/node_modules/jquery/AUTHORS.txt +0 -327
- data/spec/dummy/node_modules/jquery/LICENSE.txt +0 -20
- data/spec/dummy/node_modules/jquery/README.md +0 -62
- data/spec/dummy/node_modules/jquery/bower.json +0 -14
- data/spec/dummy/node_modules/jquery/dist/jquery.js +0 -10872
- data/spec/dummy/node_modules/jquery/dist/jquery.min.js +0 -2
- data/spec/dummy/node_modules/jquery/dist/jquery.min.map +0 -1
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.js +0 -8777
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.js +0 -2
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.map +0 -1
- data/spec/dummy/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2478
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
- data/spec/dummy/node_modules/jquery/package.json +0 -117
- data/spec/dummy/node_modules/jquery/src/ajax/jsonp.js +0 -103
- data/spec/dummy/node_modules/jquery/src/ajax/load.js +0 -77
- data/spec/dummy/node_modules/jquery/src/ajax/script.js +0 -74
- data/spec/dummy/node_modules/jquery/src/ajax/var/location.js +0 -5
- data/spec/dummy/node_modules/jquery/src/ajax/var/nonce.js +0 -5
- data/spec/dummy/node_modules/jquery/src/ajax/var/rquery.js +0 -5
- data/spec/dummy/node_modules/jquery/src/ajax/xhr.js +0 -170
- data/spec/dummy/node_modules/jquery/src/ajax.js +0 -873
- data/spec/dummy/node_modules/jquery/src/attributes/attr.js +0 -141
- data/spec/dummy/node_modules/jquery/src/attributes/classes.js +0 -186
- data/spec/dummy/node_modules/jquery/src/attributes/prop.js +0 -143
- data/spec/dummy/node_modules/jquery/src/attributes/support.js +0 -33
- data/spec/dummy/node_modules/jquery/src/attributes/val.js +0 -191
- data/spec/dummy/node_modules/jquery/src/attributes.js +0 -13
- data/spec/dummy/node_modules/jquery/src/callbacks.js +0 -236
- data/spec/dummy/node_modules/jquery/src/core/DOMEval.js +0 -43
- data/spec/dummy/node_modules/jquery/src/core/access.js +0 -72
- data/spec/dummy/node_modules/jquery/src/core/camelCase.js +0 -23
- data/spec/dummy/node_modules/jquery/src/core/init.js +0 -129
- data/spec/dummy/node_modules/jquery/src/core/isAttached.js +0 -26
- data/spec/dummy/node_modules/jquery/src/core/nodeName.js +0 -13
- data/spec/dummy/node_modules/jquery/src/core/parseHTML.js +0 -65
- data/spec/dummy/node_modules/jquery/src/core/parseXML.js +0 -30
- data/spec/dummy/node_modules/jquery/src/core/ready-no-deferred.js +0 -97
- data/spec/dummy/node_modules/jquery/src/core/ready.js +0 -86
- data/spec/dummy/node_modules/jquery/src/core/readyException.js +0 -13
- data/spec/dummy/node_modules/jquery/src/core/stripAndCollapse.js +0 -14
- data/spec/dummy/node_modules/jquery/src/core/support.js +0 -20
- data/spec/dummy/node_modules/jquery/src/core/toType.js +0 -20
- data/spec/dummy/node_modules/jquery/src/core/var/rsingleTag.js +0 -7
- data/spec/dummy/node_modules/jquery/src/core.js +0 -400
- data/spec/dummy/node_modules/jquery/src/css/addGetHookIf.js +0 -26
- data/spec/dummy/node_modules/jquery/src/css/adjustCSS.js +0 -74
- data/spec/dummy/node_modules/jquery/src/css/curCSS.js +0 -65
- data/spec/dummy/node_modules/jquery/src/css/finalPropName.js +0 -42
- data/spec/dummy/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -15
- data/spec/dummy/node_modules/jquery/src/css/showHide.js +0 -105
- data/spec/dummy/node_modules/jquery/src/css/support.js +0 -133
- data/spec/dummy/node_modules/jquery/src/css/var/cssExpand.js +0 -5
- data/spec/dummy/node_modules/jquery/src/css/var/getStyles.js +0 -17
- data/spec/dummy/node_modules/jquery/src/css/var/isHiddenWithinTree.js +0 -34
- data/spec/dummy/node_modules/jquery/src/css/var/rboxStyle.js +0 -7
- data/spec/dummy/node_modules/jquery/src/css/var/rnumnonpx.js +0 -7
- data/spec/dummy/node_modules/jquery/src/css/var/swap.js +0 -26
- data/spec/dummy/node_modules/jquery/src/css.js +0 -494
- data/spec/dummy/node_modules/jquery/src/data/Data.js +0 -162
- data/spec/dummy/node_modules/jquery/src/data/var/acceptData.js +0 -19
- data/spec/dummy/node_modules/jquery/src/data/var/dataPriv.js +0 -7
- data/spec/dummy/node_modules/jquery/src/data/var/dataUser.js +0 -7
- data/spec/dummy/node_modules/jquery/src/data.js +0 -180
- data/spec/dummy/node_modules/jquery/src/deferred/exceptionHook.js +0 -21
- data/spec/dummy/node_modules/jquery/src/deferred.js +0 -399
- data/spec/dummy/node_modules/jquery/src/deprecated/ajax-event-alias.js +0 -22
- data/spec/dummy/node_modules/jquery/src/deprecated/event.js +0 -48
- data/spec/dummy/node_modules/jquery/src/deprecated.js +0 -87
- data/spec/dummy/node_modules/jquery/src/dimensions.js +0 -57
- data/spec/dummy/node_modules/jquery/src/effects/Tween.js +0 -125
- data/spec/dummy/node_modules/jquery/src/effects/animatedSelector.js +0 -15
- data/spec/dummy/node_modules/jquery/src/effects.js +0 -701
- data/spec/dummy/node_modules/jquery/src/event/focusin.js +0 -58
- data/spec/dummy/node_modules/jquery/src/event/support.js +0 -11
- data/spec/dummy/node_modules/jquery/src/event/trigger.js +0 -201
- data/spec/dummy/node_modules/jquery/src/event.js +0 -892
- data/spec/dummy/node_modules/jquery/src/exports/amd.js +0 -26
- data/spec/dummy/node_modules/jquery/src/exports/global.js +0 -34
- data/spec/dummy/node_modules/jquery/src/jquery.js +0 -41
- data/spec/dummy/node_modules/jquery/src/manipulation/_evalUrl.js +0 -32
- data/spec/dummy/node_modules/jquery/src/manipulation/buildFragment.js +0 -106
- data/spec/dummy/node_modules/jquery/src/manipulation/getAll.js +0 -32
- data/spec/dummy/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -22
- data/spec/dummy/node_modules/jquery/src/manipulation/support.js +0 -41
- data/spec/dummy/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -5
- data/spec/dummy/node_modules/jquery/src/manipulation/var/rtagName.js +0 -8
- data/spec/dummy/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
- data/spec/dummy/node_modules/jquery/src/manipulation.js +0 -480
- data/spec/dummy/node_modules/jquery/src/offset.js +0 -238
- data/spec/dummy/node_modules/jquery/src/queue/delay.js +0 -24
- data/spec/dummy/node_modules/jquery/src/queue.js +0 -145
- data/spec/dummy/node_modules/jquery/src/selector-native.js +0 -241
- data/spec/dummy/node_modules/jquery/src/selector-sizzle.js +0 -19
- data/spec/dummy/node_modules/jquery/src/selector.js +0 -3
- data/spec/dummy/node_modules/jquery/src/serialize.js +0 -136
- data/spec/dummy/node_modules/jquery/src/traversing/findFilter.js +0 -97
- data/spec/dummy/node_modules/jquery/src/traversing/var/dir.js +0 -22
- data/spec/dummy/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -8
- data/spec/dummy/node_modules/jquery/src/traversing/var/siblings.js +0 -17
- data/spec/dummy/node_modules/jquery/src/traversing.js +0 -198
- data/spec/dummy/node_modules/jquery/src/var/ObjectFunctionString.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/arr.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/class2type.js +0 -6
- data/spec/dummy/node_modules/jquery/src/var/document.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/documentElement.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/flat.js +0 -16
- data/spec/dummy/node_modules/jquery/src/var/fnToString.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/getProto.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/hasOwn.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/indexOf.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/isFunction.js +0 -13
- data/spec/dummy/node_modules/jquery/src/var/isWindow.js +0 -8
- data/spec/dummy/node_modules/jquery/src/var/pnum.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/push.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/rcheckableType.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/rcssNum.js +0 -9
- data/spec/dummy/node_modules/jquery/src/var/rnothtmlwhite.js +0 -8
- data/spec/dummy/node_modules/jquery/src/var/slice.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/support.js +0 -6
- data/spec/dummy/node_modules/jquery/src/var/toString.js +0 -7
- data/spec/dummy/node_modules/jquery/src/wrap.js +0 -78
- data/spec/dummy/node_modules/jquery-ui-bundle/AUTHORS.txt +0 -333
- data/spec/dummy/node_modules/jquery-ui-bundle/LICENSE.txt +0 -43
- data/spec/dummy/node_modules/jquery-ui-bundle/external/jquery/jquery.js +0 -11008
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_444444_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_555555_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777620_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777777_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_cc0000_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_ffffff_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/index.html +0 -559
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.css +0 -1312
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.js +0 -18706
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.css +0 -7
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.js +0 -13
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.css +0 -886
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.min.css +0 -5
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.css +0 -443
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.min.css +0 -5
- data/spec/dummy/node_modules/jquery-ui-bundle/package.json +0 -33
- data/spec/dummy/node_modules/jquery-ujs/CONTRIBUTING.md +0 -109
- data/spec/dummy/node_modules/jquery-ujs/MIT-LICENSE +0 -20
- data/spec/dummy/node_modules/jquery-ujs/README.md +0 -86
- data/spec/dummy/node_modules/jquery-ujs/RELEASE.md +0 -23
- data/spec/dummy/node_modules/jquery-ujs/bower.json +0 -19
- data/spec/dummy/node_modules/jquery-ujs/package.json +0 -26
- data/spec/dummy/node_modules/jquery-ujs/src/rails.js +0 -555
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0fc7adbc55517598d8eb365fe2518df17faab505fece52ec5dcb3374459b45c
|
4
|
+
data.tar.gz: 9de9c0c248cbe41a2c4b55592c9a3412f5cc50279e680de125c7ced575c0a0ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 737f21b157db73ad8763d0bcb2576e8f6ff9ddff69d3be98713aae5903c71432e48db36df8f16b4def7e226f18d2f8fe4d4905ef80623f5638a4b245f2ebbe26
|
7
|
+
data.tar.gz: f472cff774a907272ac9a4a60a9a73ac9ef081fe4cd29411abf55238e1ef62640384f00a5be9c7f7fe68e968b05c9fa680438614378501e0cc7e7eebb50e4581
|
data/Gemfile
CHANGED
@@ -12,10 +12,11 @@ gem 'trustygems', '~> 0.2.0'
|
|
12
12
|
gemspec
|
13
13
|
|
14
14
|
group :development, :test do
|
15
|
+
gem 'activestorage-validator'
|
15
16
|
gem 'acts_as_list'
|
16
17
|
gem 'database_cleaner'
|
17
18
|
gem 'factory_bot_rails', '6.2.0'
|
18
|
-
gem '
|
19
|
+
gem 'file_validators'
|
19
20
|
gem 'launchy', '~> 2.5.0'
|
20
21
|
gem 'mysql2'
|
21
22
|
gem 'poltergeist', '~> 1.18.1'
|
data/Gemfile.lock
CHANGED
@@ -1,17 +1,19 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
trusty-cms (
|
4
|
+
trusty-cms (5.0.0)
|
5
5
|
RedCloth (= 4.3.2)
|
6
|
+
activestorage-validator
|
6
7
|
acts_as_list (>= 0.9.5, < 1.1.0)
|
7
8
|
acts_as_tree (~> 2.9.1)
|
8
|
-
ckeditor (>= 4.2.2, < 4.
|
9
|
+
ckeditor (>= 4.2.2, < 4.4.0)
|
9
10
|
delocalize (>= 0.2, < 2.0)
|
10
11
|
devise
|
11
12
|
execjs (~> 2.7)
|
12
13
|
haml
|
13
14
|
haml-rails (~> 2.0)
|
14
15
|
highline (>= 1.7.8, < 2.1.0)
|
16
|
+
image_processing
|
15
17
|
kraken-io
|
16
18
|
mini_racer
|
17
19
|
mysql2
|
@@ -33,60 +35,62 @@ GEM
|
|
33
35
|
remote: https://rubygems.org/
|
34
36
|
specs:
|
35
37
|
RedCloth (4.3.2)
|
36
|
-
actioncable (6.1.
|
37
|
-
actionpack (= 6.1.
|
38
|
-
activesupport (= 6.1.
|
38
|
+
actioncable (6.1.4.1)
|
39
|
+
actionpack (= 6.1.4.1)
|
40
|
+
activesupport (= 6.1.4.1)
|
39
41
|
nio4r (~> 2.0)
|
40
42
|
websocket-driver (>= 0.6.1)
|
41
|
-
actionmailbox (6.1.
|
42
|
-
actionpack (= 6.1.
|
43
|
-
activejob (= 6.1.
|
44
|
-
activerecord (= 6.1.
|
45
|
-
activestorage (= 6.1.
|
46
|
-
activesupport (= 6.1.
|
43
|
+
actionmailbox (6.1.4.1)
|
44
|
+
actionpack (= 6.1.4.1)
|
45
|
+
activejob (= 6.1.4.1)
|
46
|
+
activerecord (= 6.1.4.1)
|
47
|
+
activestorage (= 6.1.4.1)
|
48
|
+
activesupport (= 6.1.4.1)
|
47
49
|
mail (>= 2.7.1)
|
48
|
-
actionmailer (6.1.
|
49
|
-
actionpack (= 6.1.
|
50
|
-
actionview (= 6.1.
|
51
|
-
activejob (= 6.1.
|
52
|
-
activesupport (= 6.1.
|
50
|
+
actionmailer (6.1.4.1)
|
51
|
+
actionpack (= 6.1.4.1)
|
52
|
+
actionview (= 6.1.4.1)
|
53
|
+
activejob (= 6.1.4.1)
|
54
|
+
activesupport (= 6.1.4.1)
|
53
55
|
mail (~> 2.5, >= 2.5.4)
|
54
56
|
rails-dom-testing (~> 2.0)
|
55
|
-
actionpack (6.1.
|
56
|
-
actionview (= 6.1.
|
57
|
-
activesupport (= 6.1.
|
57
|
+
actionpack (6.1.4.1)
|
58
|
+
actionview (= 6.1.4.1)
|
59
|
+
activesupport (= 6.1.4.1)
|
58
60
|
rack (~> 2.0, >= 2.0.9)
|
59
61
|
rack-test (>= 0.6.3)
|
60
62
|
rails-dom-testing (~> 2.0)
|
61
63
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
62
|
-
actiontext (6.1.
|
63
|
-
actionpack (= 6.1.
|
64
|
-
activerecord (= 6.1.
|
65
|
-
activestorage (= 6.1.
|
66
|
-
activesupport (= 6.1.
|
64
|
+
actiontext (6.1.4.1)
|
65
|
+
actionpack (= 6.1.4.1)
|
66
|
+
activerecord (= 6.1.4.1)
|
67
|
+
activestorage (= 6.1.4.1)
|
68
|
+
activesupport (= 6.1.4.1)
|
67
69
|
nokogiri (>= 1.8.5)
|
68
|
-
actionview (6.1.
|
69
|
-
activesupport (= 6.1.
|
70
|
+
actionview (6.1.4.1)
|
71
|
+
activesupport (= 6.1.4.1)
|
70
72
|
builder (~> 3.1)
|
71
73
|
erubi (~> 1.4)
|
72
74
|
rails-dom-testing (~> 2.0)
|
73
75
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
74
|
-
activejob (6.1.
|
75
|
-
activesupport (= 6.1.
|
76
|
+
activejob (6.1.4.1)
|
77
|
+
activesupport (= 6.1.4.1)
|
76
78
|
globalid (>= 0.3.6)
|
77
|
-
activemodel (6.1.
|
78
|
-
activesupport (= 6.1.
|
79
|
-
activerecord (6.1.
|
80
|
-
activemodel (= 6.1.
|
81
|
-
activesupport (= 6.1.
|
82
|
-
activestorage (6.1.
|
83
|
-
actionpack (= 6.1.
|
84
|
-
activejob (= 6.1.
|
85
|
-
activerecord (= 6.1.
|
86
|
-
activesupport (= 6.1.
|
79
|
+
activemodel (6.1.4.1)
|
80
|
+
activesupport (= 6.1.4.1)
|
81
|
+
activerecord (6.1.4.1)
|
82
|
+
activemodel (= 6.1.4.1)
|
83
|
+
activesupport (= 6.1.4.1)
|
84
|
+
activestorage (6.1.4.1)
|
85
|
+
actionpack (= 6.1.4.1)
|
86
|
+
activejob (= 6.1.4.1)
|
87
|
+
activerecord (= 6.1.4.1)
|
88
|
+
activesupport (= 6.1.4.1)
|
87
89
|
marcel (~> 1.0.0)
|
88
|
-
mini_mime (
|
89
|
-
|
90
|
+
mini_mime (>= 1.1.0)
|
91
|
+
activestorage-validator (0.1.4)
|
92
|
+
rails (>= 5.2.0)
|
93
|
+
activesupport (6.1.4.1)
|
90
94
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
91
95
|
i18n (>= 1.6, < 2)
|
92
96
|
minitest (>= 5.1)
|
@@ -96,7 +100,7 @@ GEM
|
|
96
100
|
activerecord (>= 4.2)
|
97
101
|
acts_as_tree (2.9.1)
|
98
102
|
activerecord (>= 3.0.0)
|
99
|
-
addressable (2.
|
103
|
+
addressable (2.8.0)
|
100
104
|
public_suffix (>= 2.0.2, < 5.0)
|
101
105
|
bcrypt (3.1.16)
|
102
106
|
builder (3.2.4)
|
@@ -109,17 +113,15 @@ GEM
|
|
109
113
|
rack-test (>= 0.6.3)
|
110
114
|
regexp_parser (>= 1.5, < 3.0)
|
111
115
|
xpath (~> 3.2)
|
112
|
-
ckeditor (4.
|
113
|
-
cocaine
|
116
|
+
ckeditor (4.3.0)
|
114
117
|
orm_adapter (~> 0.5.0)
|
118
|
+
terrapin
|
115
119
|
climate_control (0.2.0)
|
116
120
|
cliver (0.3.2)
|
117
|
-
cocaine (0.6.0)
|
118
|
-
terrapin (= 0.6.0)
|
119
121
|
coderay (1.1.3)
|
120
122
|
concurrent-ruby (1.1.9)
|
121
123
|
crass (1.0.6)
|
122
|
-
css_parser (1.
|
124
|
+
css_parser (1.10.0)
|
123
125
|
addressable
|
124
126
|
database_cleaner (2.0.1)
|
125
127
|
database_cleaner-active_record (~> 2.0.0)
|
@@ -145,10 +147,13 @@ GEM
|
|
145
147
|
factory_bot_rails (6.2.0)
|
146
148
|
factory_bot (~> 6.2.0)
|
147
149
|
railties (>= 5.0.0)
|
148
|
-
ffi (1.15.
|
149
|
-
|
150
|
-
|
151
|
-
|
150
|
+
ffi (1.15.4)
|
151
|
+
file_validators (3.0.0)
|
152
|
+
activemodel (>= 3.2)
|
153
|
+
mime-types (>= 1.0)
|
154
|
+
globalid (0.5.2)
|
155
|
+
activesupport (>= 5.0)
|
156
|
+
haml (5.2.2)
|
152
157
|
temple (>= 0.8.0)
|
153
158
|
tilt
|
154
159
|
haml-rails (2.0.1)
|
@@ -163,45 +168,47 @@ GEM
|
|
163
168
|
haml (>= 4.0, < 6)
|
164
169
|
nokogiri (>= 1.6.0)
|
165
170
|
ruby_parser (~> 3.5)
|
166
|
-
httparty (0.
|
171
|
+
httparty (0.20.0)
|
167
172
|
mime-types (~> 3.0)
|
168
173
|
multi_xml (>= 0.5.2)
|
169
174
|
i18n (1.8.10)
|
170
175
|
concurrent-ruby (~> 1.0)
|
176
|
+
image_processing (1.12.1)
|
177
|
+
mini_magick (>= 4.9.5, < 5)
|
178
|
+
ruby-vips (>= 2.0.17, < 3)
|
171
179
|
json (2.5.1)
|
172
180
|
kraken-io (0.1.3)
|
173
181
|
activesupport
|
174
182
|
httparty
|
175
183
|
json
|
176
184
|
multipart-post
|
177
|
-
kt-paperclip (7.0.0)
|
178
|
-
activemodel (>= 4.2.0)
|
179
|
-
activesupport (>= 4.2.0)
|
180
|
-
marcel (~> 1.0.1)
|
181
|
-
mime-types
|
182
|
-
terrapin (~> 0.6.0)
|
183
185
|
launchy (2.5.0)
|
184
186
|
addressable (~> 2.7)
|
185
187
|
libv8-node (15.14.0.1-x86_64-darwin-18)
|
186
|
-
|
188
|
+
libv8-node (15.14.0.1-x86_64-darwin-20)
|
189
|
+
libv8-node (15.14.0.1-x86_64-linux)
|
190
|
+
loofah (2.12.0)
|
187
191
|
crass (~> 1.0.2)
|
188
192
|
nokogiri (>= 1.5.9)
|
189
193
|
mail (2.7.1)
|
190
194
|
mini_mime (>= 0.1.1)
|
191
|
-
marcel (1.0.
|
195
|
+
marcel (1.0.2)
|
192
196
|
method_source (1.0.0)
|
193
197
|
mime-types (3.3.1)
|
194
198
|
mime-types-data (~> 3.2015)
|
195
199
|
mime-types-data (3.2021.0225)
|
196
|
-
|
200
|
+
mini_magick (4.11.0)
|
201
|
+
mini_mime (1.1.1)
|
197
202
|
mini_racer (0.4.0)
|
198
203
|
libv8-node (~> 15.14.0.0)
|
199
204
|
minitest (5.14.4)
|
200
205
|
multi_xml (0.6.0)
|
201
206
|
multipart-post (2.1.1)
|
202
207
|
mysql2 (0.5.3)
|
203
|
-
nio4r (2.5.
|
204
|
-
nokogiri (1.
|
208
|
+
nio4r (2.5.8)
|
209
|
+
nokogiri (1.12.4-x86_64-darwin)
|
210
|
+
racc (~> 1.4)
|
211
|
+
nokogiri (1.12.4-x86_64-linux)
|
205
212
|
racc (~> 1.4)
|
206
213
|
orm_adapter (0.5.0)
|
207
214
|
poltergeist (1.18.1)
|
@@ -217,40 +224,40 @@ GEM
|
|
217
224
|
public_suffix (4.0.6)
|
218
225
|
racc (1.5.2)
|
219
226
|
rack (2.2.3)
|
220
|
-
rack-cache (1.
|
227
|
+
rack-cache (1.13.0)
|
221
228
|
rack (>= 0.4)
|
222
229
|
rack-test (1.1.0)
|
223
230
|
rack (>= 1.0, < 3)
|
224
231
|
radius (0.7.5)
|
225
|
-
rails (6.1.
|
226
|
-
actioncable (= 6.1.
|
227
|
-
actionmailbox (= 6.1.
|
228
|
-
actionmailer (= 6.1.
|
229
|
-
actionpack (= 6.1.
|
230
|
-
actiontext (= 6.1.
|
231
|
-
actionview (= 6.1.
|
232
|
-
activejob (= 6.1.
|
233
|
-
activemodel (= 6.1.
|
234
|
-
activerecord (= 6.1.
|
235
|
-
activestorage (= 6.1.
|
236
|
-
activesupport (= 6.1.
|
232
|
+
rails (6.1.4.1)
|
233
|
+
actioncable (= 6.1.4.1)
|
234
|
+
actionmailbox (= 6.1.4.1)
|
235
|
+
actionmailer (= 6.1.4.1)
|
236
|
+
actionpack (= 6.1.4.1)
|
237
|
+
actiontext (= 6.1.4.1)
|
238
|
+
actionview (= 6.1.4.1)
|
239
|
+
activejob (= 6.1.4.1)
|
240
|
+
activemodel (= 6.1.4.1)
|
241
|
+
activerecord (= 6.1.4.1)
|
242
|
+
activestorage (= 6.1.4.1)
|
243
|
+
activesupport (= 6.1.4.1)
|
237
244
|
bundler (>= 1.15.0)
|
238
|
-
railties (= 6.1.
|
245
|
+
railties (= 6.1.4.1)
|
239
246
|
sprockets-rails (>= 2.0.0)
|
240
247
|
rails-dom-testing (2.0.3)
|
241
248
|
activesupport (>= 4.2.0)
|
242
249
|
nokogiri (>= 1.6)
|
243
|
-
rails-html-sanitizer (1.
|
250
|
+
rails-html-sanitizer (1.4.2)
|
244
251
|
loofah (~> 2.3)
|
245
252
|
rails-observers (0.1.5)
|
246
253
|
activemodel (>= 4.0)
|
247
|
-
railties (6.1.
|
248
|
-
actionpack (= 6.1.
|
249
|
-
activesupport (= 6.1.
|
254
|
+
railties (6.1.4.1)
|
255
|
+
actionpack (= 6.1.4.1)
|
256
|
+
activesupport (= 6.1.4.1)
|
250
257
|
method_source
|
251
|
-
rake (>= 0.
|
258
|
+
rake (>= 0.13)
|
252
259
|
thor (~> 1.0)
|
253
|
-
rake (13.0.
|
260
|
+
rake (13.0.6)
|
254
261
|
rdoc (6.3.2)
|
255
262
|
regexp_parser (2.1.1)
|
256
263
|
responders (3.0.1)
|
@@ -270,7 +277,7 @@ GEM
|
|
270
277
|
rspec-mocks (3.10.2)
|
271
278
|
diff-lcs (>= 1.2.0, < 2.0)
|
272
279
|
rspec-support (~> 3.10.0)
|
273
|
-
rspec-rails (5.0.
|
280
|
+
rspec-rails (5.0.2)
|
274
281
|
actionpack (>= 5.2)
|
275
282
|
activesupport (>= 5.2)
|
276
283
|
railties (>= 5.2)
|
@@ -279,7 +286,9 @@ GEM
|
|
279
286
|
rspec-mocks (~> 3.10)
|
280
287
|
rspec-support (~> 3.10)
|
281
288
|
rspec-support (3.10.2)
|
282
|
-
|
289
|
+
ruby-vips (2.1.3)
|
290
|
+
ffi (~> 1.12)
|
291
|
+
ruby_parser (3.17.0)
|
283
292
|
sexp_processor (~> 4.15, >= 4.15.1)
|
284
293
|
sass-rails (6.0.0)
|
285
294
|
sassc-rails (~> 2.1, >= 2.1.1)
|
@@ -323,19 +332,22 @@ GEM
|
|
323
332
|
websocket-driver (0.7.5)
|
324
333
|
websocket-extensions (>= 0.1.0)
|
325
334
|
websocket-extensions (0.1.5)
|
326
|
-
will_paginate (3.3.
|
335
|
+
will_paginate (3.3.1)
|
327
336
|
xpath (3.2.0)
|
328
337
|
nokogiri (~> 1.8)
|
329
338
|
zeitwerk (2.4.2)
|
330
339
|
|
331
340
|
PLATFORMS
|
332
341
|
x86_64-darwin-18
|
342
|
+
x86_64-darwin-20
|
343
|
+
x86_64-linux
|
333
344
|
|
334
345
|
DEPENDENCIES
|
346
|
+
activestorage-validator
|
335
347
|
acts_as_list
|
336
348
|
database_cleaner
|
337
349
|
factory_bot_rails (= 6.2.0)
|
338
|
-
|
350
|
+
file_validators
|
339
351
|
launchy (~> 2.5.0)
|
340
352
|
mysql2
|
341
353
|
poltergeist (~> 1.18.1)
|
@@ -347,4 +359,4 @@ DEPENDENCIES
|
|
347
359
|
trustygems (~> 0.2.0)
|
348
360
|
|
349
361
|
BUNDLED WITH
|
350
|
-
2.2.
|
362
|
+
2.2.27
|
@@ -3,8 +3,8 @@ CKEDITOR.editorConfig = function( config ) {
|
|
3
3
|
config.removeFormatTags = "";
|
4
4
|
config.protectedSource.push(/<r:([\S]+).*<\/r:\1>/g);
|
5
5
|
config.protectedSource.push(/<r:[^>/]*\/>/g);
|
6
|
-
|
7
|
-
config.forcePasteAsPlainText =
|
6
|
+
//let paste from word be available
|
7
|
+
// config.forcePasteAsPlainText = false;
|
8
8
|
// if you want to remove clipboard, you have to remove all of these:
|
9
9
|
// clipboard, pastetext, pastefromword
|
10
10
|
config.removePlugins = "save, newpage, preview, print, templates, forms, flash, smiley, language, pagebreak, iframe, bidi";
|
@@ -1,6 +1,9 @@
|
|
1
1
|
class Admin::AssetsController < Admin::ResourceController
|
2
2
|
paginate_models(per_page: 50)
|
3
3
|
COMPRESS_FILE_TYPE = ['image/jpeg', 'image/png', 'image/gif', 'image/svg+xml'].freeze
|
4
|
+
before_action do
|
5
|
+
ActiveStorage::Current.host = request.base_url
|
6
|
+
end
|
4
7
|
|
5
8
|
def index
|
6
9
|
assets = Asset.order('created_at DESC')
|
@@ -67,8 +70,9 @@ class Admin::AssetsController < Admin::ResourceController
|
|
67
70
|
private
|
68
71
|
|
69
72
|
def compress(uploaded_asset)
|
73
|
+
require 'open-uri'
|
70
74
|
data = $kraken.upload(uploaded_asset.tempfile.path, 'lossy' => true)
|
71
|
-
File.write(uploaded_asset.tempfile, open(data.kraked_url).read,
|
75
|
+
File.write(uploaded_asset.tempfile, URI.open(data.kraked_url).read, mode: 'wb')
|
72
76
|
uploaded_asset
|
73
77
|
end
|
74
78
|
|
@@ -81,4 +85,4 @@ class Admin::AssetsController < Admin::ResourceController
|
|
81
85
|
def asset_params
|
82
86
|
params.permit(:id, :for_attachment, asset: [:caption, :for_attachment, asset: []])
|
83
87
|
end
|
84
|
-
end
|
88
|
+
end
|
data/app/models/asset.rb
CHANGED
@@ -1,6 +1,4 @@
|
|
1
1
|
class Asset < ActiveRecord::Base
|
2
|
-
include Paperclip::Glue
|
3
|
-
|
4
2
|
has_many :page_attachments, dependent: :destroy
|
5
3
|
has_many :pages, through: :page_attachments
|
6
4
|
has_site if respond_to? :has_site
|
@@ -33,52 +31,43 @@ class Asset < ActiveRecord::Base
|
|
33
31
|
end
|
34
32
|
}
|
35
33
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
storage: TrustyCms.config['paperclip.storage'],
|
45
|
-
path: TrustyCms.config['paperclip.path'],
|
46
|
-
url: TrustyCms.config['paperclip.url'],
|
47
|
-
fog_credentials: TrustyCmsClippedExtension::Cloud.credentials,
|
48
|
-
fog_directory: TrustyCms.config['paperclip.fog.directory'],
|
49
|
-
fog_public: TrustyCms.config['paperclip.fog.public?'] || true,
|
50
|
-
fog_host: TrustyCmsClippedExtension::Cloud.host,
|
51
|
-
fog_file: {
|
52
|
-
'Cache-Control' => 'max-age=31536000',
|
53
|
-
}
|
54
|
-
|
55
|
-
validates_attachment_content_type :asset, content_type: ['application/zip', 'image/jpg', 'image/jpeg', 'image/png', 'image/gif', 'application/pdf', 'application/javascript', 'text/javascript', 'text/css']
|
56
|
-
|
34
|
+
has_one_attached :asset
|
35
|
+
validates :asset,
|
36
|
+
presence: true,
|
37
|
+
blob:
|
38
|
+
{
|
39
|
+
content_type: %w[application/zip image/jpg image/jpeg image/png image/gif application/pdf text/css],
|
40
|
+
size_range: 1..5.megabytes,
|
41
|
+
}
|
57
42
|
before_save :assign_title
|
58
43
|
before_save :assign_uuid
|
59
44
|
|
60
|
-
after_post_process :read_dimensions
|
61
|
-
|
62
|
-
validates_attachment_presence :asset, message: 'You must choose a file to upload!'
|
63
|
-
if TrustyCms.config['paperclip.skip_filetype_validation'] != 'true' && TrustyCms.config['paperclip.content_types']
|
64
|
-
validates_attachment_content_type :asset, content_type: TrustyCms.config['paperclip.content_types'].gsub(' ', '').split(',')
|
65
|
-
else
|
66
|
-
validates_attachment_presence :asset, message: 'Your uploaded file must have an extension in its name!'
|
67
|
-
end
|
68
|
-
validates_attachment_size :asset, less_than: (TrustyCms.config['assets.max_asset_size'] || 5).to_i.megabytes
|
69
|
-
|
70
45
|
def asset_type
|
71
46
|
AssetType.for(asset)
|
72
47
|
end
|
73
|
-
delegate :paperclip_processors, :paperclip_styles, :style_dimensions, :style_format,
|
48
|
+
delegate :paperclip_processors, :paperclip_styles, :active_storage_styles, :style_dimensions, :style_format,
|
49
|
+
to: :asset_type
|
74
50
|
|
75
51
|
def thumbnail(style_name = 'original')
|
76
|
-
return asset.url if style_name
|
77
|
-
return
|
52
|
+
return asset.url if style_name == 'original'
|
53
|
+
return asset_variant(style_name).processed.url if asset.variable?
|
78
54
|
|
79
55
|
asset_type.icon(style_name)
|
80
56
|
end
|
81
57
|
|
58
|
+
def asset_variant(style_name)
|
59
|
+
case style_name
|
60
|
+
when 'thumbnail'
|
61
|
+
asset.variant(gravity: 'Center', resize: '100x100^', crop: '100x100+0+0')
|
62
|
+
when 'normal'
|
63
|
+
asset.variant(gravity: 'Center', resize: '640x640^')
|
64
|
+
when 'small'
|
65
|
+
asset.variant(gravity: 'Center', resize: '320x320^')
|
66
|
+
when 'icon'
|
67
|
+
asset.variant(gravity: 'Center', resize: '50x50^')
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
82
71
|
def style?(style_name = 'original')
|
83
72
|
style_name == 'original' || paperclip_styles.keys.include?(style_name.to_sym)
|
84
73
|
end
|
@@ -110,7 +99,10 @@ class Asset < ActiveRecord::Base
|
|
110
99
|
end
|
111
100
|
|
112
101
|
def geometry(style_name = 'original')
|
113
|
-
|
102
|
+
unless style?(style_name)
|
103
|
+
raise Paperclip::StyleError,
|
104
|
+
"Requested style #{style_name} is not defined for this asset."
|
105
|
+
end
|
114
106
|
|
115
107
|
@geometry ||= {}
|
116
108
|
begin
|
@@ -118,8 +110,9 @@ class Asset < ActiveRecord::Base
|
|
118
110
|
original_geometry
|
119
111
|
else
|
120
112
|
style = asset.styles[style_name.to_sym]
|
121
|
-
original_geometry.transformed_by(style.geometry)
|
122
|
-
|
113
|
+
original_geometry.transformed_by(style.geometry)
|
114
|
+
# this can return dimensions for fully specified style sizes but not for relative sizes when there are no original dimensions
|
115
|
+
end
|
123
116
|
rescue Paperclip::TransformationError => e
|
124
117
|
Rails.logger.warn "geometry transformation error: #{e}"
|
125
118
|
original_geometry # returns a blank geometry if the real geometry cannot be calculated
|
@@ -174,19 +167,17 @@ class Asset < ActiveRecord::Base
|
|
174
167
|
# original file and calculate thumbnail dimensions later, on demand.
|
175
168
|
|
176
169
|
def read_dimensions
|
177
|
-
if image?
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
self.original_extension = File.extname(file.path)
|
183
|
-
end
|
170
|
+
if image? && file = asset.queued_for_write[:original]
|
171
|
+
geometry = Paperclip::Geometry.from_file(file)
|
172
|
+
self.original_width = geometry.width
|
173
|
+
self.original_height = geometry.height
|
174
|
+
self.original_extension = File.extname(file.path)
|
184
175
|
end
|
185
176
|
true
|
186
177
|
end
|
187
178
|
|
188
179
|
def assign_title
|
189
|
-
self.title =
|
180
|
+
self.title = asset.filename.base
|
190
181
|
end
|
191
182
|
|
192
183
|
def assign_uuid
|
@@ -235,7 +226,7 @@ class Asset < ActiveRecord::Base
|
|
235
226
|
|
236
227
|
# this is a convenience for image-pickers
|
237
228
|
def self.thumbnail_options
|
238
|
-
asset_sizes = thumbnail_sizes.
|
229
|
+
asset_sizes = thumbnail_sizes.map do |k, v|
|
239
230
|
size_id = k
|
240
231
|
size_description = "#{k}: "
|
241
232
|
size_description << (v.is_a?(Array) ? v.join(' as ') : v)
|
data/app/models/asset_type.rb
CHANGED
@@ -104,6 +104,10 @@ class AssetType
|
|
104
104
|
@paperclip_styles
|
105
105
|
end
|
106
106
|
|
107
|
+
def active_storage_styles
|
108
|
+
@active_storage_styles ||= normalize_style_rules(configured_styles.merge(styles))
|
109
|
+
end
|
110
|
+
|
107
111
|
# Takes a motley collection of differently-defined styles and renders them into the standard hash-of-hashes format.
|
108
112
|
# Solitary strings are assumed to be #
|
109
113
|
def normalize_style_rules(styles = {})
|
@@ -173,8 +177,8 @@ class AssetType
|
|
173
177
|
# class methods
|
174
178
|
|
175
179
|
def self.for(attachment)
|
176
|
-
extension =
|
177
|
-
from_extension(extension) || from_mimetype(attachment.
|
180
|
+
extension = attachment.record.original_extension
|
181
|
+
from_extension(extension) || from_mimetype(attachment.content_type) || catchall
|
178
182
|
end
|
179
183
|
|
180
184
|
def self.from_extension(extension)
|
@@ -16,10 +16,12 @@
|
|
16
16
|
= "#{t("clipped_extension.filename")}: #{@asset.asset_file_name unless @asset.new_record?}"
|
17
17
|
%br
|
18
18
|
%label.url
|
19
|
-
= "#{t("clipped_extension.asset_url")}: #{image_path @asset.
|
19
|
+
= "#{t("clipped_extension.asset_url")}: #{image_path @asset.asset.url unless @asset.new_record?}"
|
20
|
+
%br
|
21
|
+
%label.id
|
22
|
+
= "#{t("clipped_extension.asset_id")}: #{@asset.asset.id unless @asset.new_record?}"
|
20
23
|
%p.asset
|
21
|
-
|
22
|
-
= image_tag @asset.thumbnail(display_size.to_sym), :class => 'preview'
|
24
|
+
= image_tag @asset.thumbnail("normal"), :class => 'preview'
|
23
25
|
|
24
26
|
= updated_stamp @asset
|
25
27
|
|
data/config/database.yml
CHANGED
data/config/locales/en.yml
CHANGED
@@ -66,6 +66,7 @@ en:
|
|
66
66
|
asset_page_attachment_note: 'Attached assets. These can be inserted with drag and drop or shown with the <code><r:assets:each /></code> tag.'
|
67
67
|
asset_note: 'Attached assets. '
|
68
68
|
asset_url: 'Asset URL'
|
69
|
+
asset_id: 'Asset ID'
|
69
70
|
assets: 'Assets'
|
70
71
|
assets_explanation: 'Assets and images can be uploaded and then attached or inserted into pages, snippets and layouts. Click on an asset name above to edit it or click <code>Remove</code> to delete it.'
|
71
72
|
assets_title: 'Assets'
|
data/coverage/index.html
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
<img src="./assets/0.12.3/loading.gif" alt="loading"/>
|
15
15
|
</div>
|
16
16
|
<div id="wrapper" class="hide">
|
17
|
-
<div class="timestamp">Generated <abbr class="timeago" title="2021-
|
17
|
+
<div class="timestamp">Generated <abbr class="timeago" title="2021-10-05T10:51:28-04:00">2021-10-05T10:51:28-04:00</abbr></div>
|
18
18
|
<ul class="group_tabs"></ul>
|
19
19
|
|
20
20
|
<div id="content">
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'active_support'
|
2
|
+
|
3
|
+
class AssetType
|
4
|
+
def paperclip_processors
|
5
|
+
ActiveSupport::Deprecation.warn('Paperclip processors will be deprecated soon in favor of ActiveStorage.')
|
6
|
+
|
7
|
+
active_storage_styles
|
8
|
+
end
|
9
|
+
|
10
|
+
def paperclip_styles
|
11
|
+
ActiveSupport::Deprecation.warn('Paperclip styles will be deprecated soon in favor of ActiveStorage.')
|
12
|
+
end
|
13
|
+
end
|