trusty-cms 3.8.3 → 3.8.4
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 +4 -4
- data/Gemfile.lock +1 -1
- data/app/helpers/application_helper.rb +0 -1
- data/app/models/asset_type.rb +1 -4
- data/app/models/page.rb +2 -2
- data/app/models/standard_tags.rb +0 -3
- data/app/models/trusty_cms/page_response_cache_director.rb +0 -1
- data/config/application.rb +0 -2
- data/config/locales/en.yml +15 -17
- data/lib/configuration_extensions/configuration_extensions.rb +0 -2
- data/lib/trusty_cms.rb +1 -1
- data/spec/dummy/config/application.rb +0 -8
- data/vendor/extensions/clipped-extension/lib/asset_tags.rb +1 -19
- 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: 16008084828e31ad0ae76709269a435f9a89241d5a8a1e59cde3a310088ec616
|
4
|
+
data.tar.gz: c6c8ec48f78cde6e481e4aede127233895be9d83c9365467022e3fddaa3189f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f994ecbba09fbecd02765367dc379222345d06eaa337707de0f475ddd05708e10f3fc6854755fda963c9937df36a2dffc16f7b4fabb1edfa5e8b4a2d6fbcd6f7
|
7
|
+
data.tar.gz: a4031c894cbfebf29206cdcaf9a0b24aeb03adf8bc4a9f16293b56b1a8a8d2619a96fd4763ac141984863213adf3a54d720fee46c1ba3cc5d308c982d3fc2a6d
|
data/Gemfile.lock
CHANGED
data/app/models/asset_type.rb
CHANGED
@@ -97,7 +97,6 @@ class AssetType
|
|
97
97
|
#
|
98
98
|
def paperclip_styles
|
99
99
|
# Styles are not relevant if processors are not defined.
|
100
|
-
# TODO: should this default to an icon set?
|
101
100
|
@paperclip_styles ||= if paperclip_processors.any?
|
102
101
|
normalize_style_rules(configured_styles.merge(styles))
|
103
102
|
else
|
@@ -107,9 +106,7 @@ class AssetType
|
|
107
106
|
end
|
108
107
|
|
109
108
|
# Takes a motley collection of differently-defined styles and renders them into the standard hash-of-hashes format.
|
110
|
-
# Solitary strings are assumed to be
|
111
|
-
#TODO: define permitted and/or expected options for the asset type and pass through that subset of the style-definition hash
|
112
|
-
#
|
109
|
+
# Solitary strings are assumed to be #
|
113
110
|
def normalize_style_rules(styles={})
|
114
111
|
styles.each_pair do |name, rule|
|
115
112
|
unless rule.is_a? Hash
|
data/app/models/page.rb
CHANGED
@@ -194,11 +194,11 @@ class Page < ActiveRecord::Base
|
|
194
194
|
elsif (path =~ /^#{Regexp.quote(my_path)}([^\/]*)/)
|
195
195
|
slug_child = children.find_by_slug($1)
|
196
196
|
if slug_child
|
197
|
-
found = slug_child.find_by_path(path, live, clean)
|
197
|
+
found = slug_child.find_by_path(path, live, clean)
|
198
198
|
return found if found
|
199
199
|
end
|
200
200
|
children.each do |child|
|
201
|
-
found = child.find_by_path(path, live, clean)
|
201
|
+
found = child.find_by_path(path, live, clean)
|
202
202
|
return found if found
|
203
203
|
end
|
204
204
|
end
|
data/app/models/standard_tags.rb
CHANGED
@@ -441,7 +441,6 @@ module StandardTags
|
|
441
441
|
options = aggregate_children(tag)
|
442
442
|
children = Page.where(options)
|
443
443
|
|
444
|
-
# TODO: What is this nonsnese?
|
445
444
|
if first = children.first
|
446
445
|
tag.locals.page = first
|
447
446
|
tag.expand
|
@@ -464,7 +463,6 @@ module StandardTags
|
|
464
463
|
options = aggregate_children(tag)
|
465
464
|
children = Page.where(options)
|
466
465
|
|
467
|
-
# TODO: More nonsense
|
468
466
|
if last = children.last
|
469
467
|
tag.locals.page = last
|
470
468
|
tag.expand
|
@@ -1343,7 +1341,6 @@ module StandardTags
|
|
1343
1341
|
|
1344
1342
|
def dev?(request)
|
1345
1343
|
return false if request.nil?
|
1346
|
-
# TODO: More nonsense!
|
1347
1344
|
if dev_host = TrustyCms::Config['dev.host']
|
1348
1345
|
dev_host == request.host
|
1349
1346
|
else
|
data/config/application.rb
CHANGED
@@ -50,8 +50,6 @@ module TrustyCms
|
|
50
50
|
:verbose => false,
|
51
51
|
:allow_reload => false,
|
52
52
|
:allow_revalidate => false
|
53
|
-
# TODO: There's got to be a better place for this, but in order for assets to work fornow, we need ConditionalGet
|
54
|
-
# TODO: Workaround from: https://github.com/rtomayko/rack-cache/issues/80
|
55
53
|
config.middleware.insert_before(Rack::ConditionalGet, Rack::Cache)
|
56
54
|
config.assets.enabled = true
|
57
55
|
|
data/config/locales/en.yml
CHANGED
@@ -4,14 +4,14 @@ en:
|
|
4
4
|
activerecord:
|
5
5
|
errors:
|
6
6
|
messages:
|
7
|
-
blank: '
|
8
|
-
invalid: '
|
9
|
-
not_a_number: '
|
10
|
-
not_a_page: "
|
11
|
-
not_permitted: '
|
12
|
-
taken: '
|
13
|
-
too_long: '
|
14
|
-
too_short: '
|
7
|
+
blank: 'This field is required.' # required
|
8
|
+
invalid: 'This does not match the expected format' #invalid_format
|
9
|
+
not_a_number: 'This must be a number' # must be number
|
10
|
+
not_a_page: "There must be a page at this address"
|
11
|
+
not_permitted: 'This must be one of the permitted values'
|
12
|
+
taken: 'This name is already in use' # name_in_use
|
13
|
+
too_long: 'This must not be longer than %{count} characters' # character_limit
|
14
|
+
too_short: 'This must be at least %{count} characters long' # character_minimum
|
15
15
|
models:
|
16
16
|
asset:
|
17
17
|
attributes:
|
@@ -20,15 +20,15 @@ en:
|
|
20
20
|
page:
|
21
21
|
attributes:
|
22
22
|
slug:
|
23
|
-
taken: '
|
23
|
+
taken: 'This slug is already in use by a sibling of this page' # slug_in_use
|
24
24
|
user:
|
25
25
|
attributes:
|
26
26
|
email:
|
27
|
-
invalid: '
|
27
|
+
invalid: 'This is not a valid e-mail address' # invalid_email
|
28
28
|
login:
|
29
|
-
taken: '
|
29
|
+
taken: 'This login is already in use' # login already in use
|
30
30
|
password:
|
31
|
-
confirmation: '
|
31
|
+
confirmation: 'This must match confirmation' # password_confirmation
|
32
32
|
add_child: 'Add Child'
|
33
33
|
add_field: 'Add Field'
|
34
34
|
add_part: 'Add Part'
|
@@ -42,11 +42,9 @@ en:
|
|
42
42
|
images: 'Images'
|
43
43
|
others: 'Others'
|
44
44
|
audios: 'Audio'
|
45
|
-
flashes: 'Flash'
|
46
45
|
fonts: 'Fonts'
|
47
46
|
videos: 'Video'
|
48
47
|
pdfs: 'PDFs'
|
49
|
-
swfs: 'Flash'
|
50
48
|
available_tags: 'Available Tags'
|
51
49
|
available_tags_for: 'Available Tags for %{name}'
|
52
50
|
body: 'Body'
|
@@ -68,13 +66,13 @@ en:
|
|
68
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.'
|
69
67
|
asset_note: 'Attached assets. '
|
70
68
|
assets: 'Assets'
|
71
|
-
assets_explanation: 'Assets and images can be uploaded and then attached or inserted into pages, snippets and layouts. Click on
|
69
|
+
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.'
|
72
70
|
assets_title: 'Assets'
|
73
71
|
asset_page_upload_note: 'Assets uploaded here will be automatically associated with this page.'
|
74
72
|
asset_upload_note: 'Choose an asset to upload here. If the <code>Title</code> field is left blank, the filename (without the file type) will be automatically added. By clicking on <code>More</code>, you can add a caption as well.'
|
75
73
|
attached_assets: 'Attached Assets'
|
76
74
|
attach: 'Attach'
|
77
|
-
attach_asset: '
|
75
|
+
attach_asset: 'Attach asset'
|
78
76
|
attach_assets: 'Attach assets'
|
79
77
|
attach_existing: 'Attach Existing Assets'
|
80
78
|
attach_to_page: 'Attach to page'
|
@@ -87,7 +85,7 @@ en:
|
|
87
85
|
caption: 'Caption'
|
88
86
|
confirm_refresh_assets: 'Are you sure you want to regenerate every asset thumbnail? This is likely to take a long time and use a lot of server resources: <strong class="warning">the performance of your site is very likely to be affected</strong> and your browser may time out before the operation is complete. This is only recommended if your asset collection is small!'
|
89
87
|
confirm_remove_asset: 'Are you sure you want to permanently remove the following asset?'
|
90
|
-
confirm_remove_from_page: 'Are you sure you want to remove this
|
88
|
+
confirm_remove_from_page: 'Are you sure you want to remove this asset from the page?'
|
91
89
|
delete_asset: 'Delete Asset'
|
92
90
|
detach: 'Detach'
|
93
91
|
edit: 'Edit'
|
data/lib/trusty_cms.rb
CHANGED
@@ -37,7 +37,6 @@ module TrustyCms
|
|
37
37
|
$LOAD_PATH.unshift path
|
38
38
|
end
|
39
39
|
# config.add_plugin_paths(extension_loader.paths(:plugin))
|
40
|
-
# TODO: Come back and look at this.
|
41
40
|
trusty_locale_paths = Dir[File.join(TRUSTY_CMS_ROOT, 'config', 'locales', '*.{rb,yml}')]
|
42
41
|
config.i18n.load_path = trusty_locale_paths + extension_loader.paths(:locale)
|
43
42
|
|
@@ -85,8 +84,6 @@ module TrustyCms
|
|
85
84
|
# :metastore => "trusty:tmp/cache/meta"
|
86
85
|
# Sets the meta store type and storage location. We recommend you use
|
87
86
|
# trusty: since this will enable manual expiration and acceleration headers.
|
88
|
-
|
89
|
-
# TODO: We're not sure this is actually working, but we can't really test this until the app initializes.
|
90
87
|
config.middleware.use Rack::Cache,
|
91
88
|
:private_headers => ['Authorization'],
|
92
89
|
:entitystore => "trusty:tmp/cache/entity",
|
@@ -94,13 +91,8 @@ module TrustyCms
|
|
94
91
|
:verbose => false,
|
95
92
|
:allow_reload => false,
|
96
93
|
:allow_revalidate => false
|
97
|
-
# TODO: There's got to be a better place for this, but in order for assets to work fornow, we need ConditionalGet
|
98
|
-
# TODO: Workaround from: https://github.com/rtomayko/rack-cache/issues/80
|
99
94
|
config.middleware.insert_before(Rack::ConditionalGet, Rack::Cache)
|
100
95
|
config.assets.enabled = true
|
101
|
-
|
102
|
-
|
103
|
-
|
104
96
|
config.filter_parameters += [:password, :password_confirmation]
|
105
97
|
|
106
98
|
# Use the database for sessions instead of the cookie-based default,
|
@@ -184,9 +184,7 @@ module AssetTags
|
|
184
184
|
asset_content_type = tag.locals.asset.asset_content_type
|
185
185
|
tag.expand unless asset_content_type.match(regexp).nil?
|
186
186
|
end
|
187
|
-
|
188
|
-
#TODO: could use better docs for Asset#other? case explaining what types it covers
|
189
|
-
|
187
|
+
|
190
188
|
[:title, :caption, :asset_file_name, :extension, :asset_content_type, :asset_file_size, :id].each do |method|
|
191
189
|
desc %{
|
192
190
|
Renders the @#{method.to_s}@ attribute of the asset
|
@@ -293,21 +291,5 @@ private
|
|
293
291
|
:conditions => conditions
|
294
292
|
}
|
295
293
|
end
|
296
|
-
|
297
|
-
def swf_embed_markup(url, dimensions, fallback_content)
|
298
|
-
width, height = dimensions
|
299
|
-
%{<!--[if !IE]> -->
|
300
|
-
<object type="application/x-shockwave-flash" data="#{url}" width="#{width}" height="#{height}">
|
301
|
-
<!-- <![endif]-->
|
302
|
-
<!--[if IE]>
|
303
|
-
<object width="#{width}" height="#{height}"
|
304
|
-
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
|
305
|
-
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0">
|
306
|
-
<param name="movie" value="#{url}" />
|
307
|
-
<!-->
|
308
|
-
#{fallback_content}
|
309
|
-
</object>
|
310
|
-
<!-- <![endif]-->}
|
311
|
-
end
|
312
294
|
end
|
313
295
|
|
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: 3.8.
|
4
|
+
version: 3.8.4
|
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: 2020-02-
|
11
|
+
date: 2020-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: acts_as_list
|