trusty-cms 3.3.1 → 3.3.2
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/lib/trusty_cms/extension_migrator.rb +1 -4
- data/lib/trusty_cms.rb +1 -1
- data/vendor/extensions/clipped-extension/clipped_extension.rb +37 -27
- 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: 2afe1e335218fdc9543278f43aa02d37fbb02d09799891e44ec9df52c39c60d1
|
4
|
+
data.tar.gz: 7ec6e36c084504e083f391016e5176f524bce3c123199bdec8221348d85d122c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 499c64b11f93824feec2f5fc4712d7416f66f7ec06e0ac99f6b65570b2220197cd3a43c05156cfdb371ae3fb9734691aada7d37bae1d95b0bac244f91bab36c0
|
7
|
+
data.tar.gz: 800fc065a9a07c5b33020e7ece0e327455b05ff0b00ab644e588bbb067f9b6bb0b04f76fab9e6b080ae25db203bcfffc48d8691752c6528986b21e2732b4d4f8
|
data/Gemfile.lock
CHANGED
@@ -8,10 +8,7 @@ module TrustyCms
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def migrate_extensions
|
11
|
-
|
12
|
-
to_migrate = Extension.descendants.detect{|descendant| descendant.name == "#{ext.to_s.camelize}Extension" }
|
13
|
-
to_migrate.migrator.migrate
|
14
|
-
end
|
11
|
+
[]
|
15
12
|
end
|
16
13
|
|
17
14
|
def get_all_versions
|
data/lib/trusty_cms.rb
CHANGED
@@ -3,33 +3,35 @@ class ClippedExtension < TrustyCms::Extension
|
|
3
3
|
require 'admin/assets_helper'
|
4
4
|
|
5
5
|
def activate
|
6
|
-
if
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
6
|
+
if database_exists?
|
7
|
+
if Asset.table_exists?
|
8
|
+
Page.send :include, PageAssetAssociations # defines page-asset associations. likely to be generalised soon.
|
9
|
+
TrustyCms::AdminUI.send :include, ClippedAdminUI unless defined? admin.asset # defines shards for extension of the asset-admin interface
|
10
|
+
Admin::PagesController.send :helper, Admin::AssetsHelper # currently only provides a description of asset sizes
|
11
|
+
Page.send :include, AssetTags # radius tags for selecting sets of assets and presenting each one
|
12
|
+
UserActionObserver.instance.send :add_observer!, Asset # the usual creator- and updater-stamping
|
13
|
+
|
14
|
+
AssetType.new :image, :icon => 'image', :default_radius_tag => 'image', :processors => [:thumbnail], :styles => :standard, :extensions => %w[jpg jpeg png gif], :mime_types => %w[image/png image/x-png image/jpeg image/pjpeg image/jpg image/gif]
|
15
|
+
AssetType.new :video, :icon => 'video', :processors => [:frame_grab], :styles => :standard, :mime_types => %w[application/x-mp4 video/mpeg video/quicktime video/x-la-asf video/x-ms-asf video/x-msvideo video/x-sgi-movie video/x-flv flv-application/octet-stream video/3gpp video/3gpp2 video/3gpp-tt video/BMPEG video/BT656 video/CelB video/DV video/H261 video/H263 video/H263-1998 video/H263-2000 video/H264 video/JPEG video/MJ2 video/MP1S video/MP2P video/MP2T video/mp4 video/MP4V-ES video/MPV video/mpeg4 video/mpeg4-generic video/nv video/parityfec video/pointer video/raw video/rtx video/ogg video/webm]
|
16
|
+
AssetType.new :audio, :icon => 'audio', :mime_types => %w[audio/mpeg audio/mpg audio/ogg application/ogg audio/x-ms-wma audio/vnd.rn-realaudio audio/x-wav]
|
17
|
+
AssetType.new :pdf, :icon => 'pdf', :processors => [:thumbnail], :extensions => %w{pdf}, :mime_types => %w[application/pdf application/x-pdf], :styles => :standard
|
18
|
+
AssetType.new :document, :icon => 'document', :mime_types => %w[application/msword application/rtf application/vnd.ms-excel application/vnd.ms-powerpoint application/vnd.ms-project application/vnd.ms-works text/plain text/html]
|
19
|
+
AssetType.new :other, :icon => 'unknown'
|
20
|
+
|
21
|
+
admin.asset ||= TrustyCms::AdminUI.load_default_asset_regions # loads the shards defined in AssetsAdminUI
|
22
|
+
admin.page.edit.add :form, 'assets', :after => :edit_page_parts # adds the asset-attachment picker to the page edit view
|
23
|
+
admin.page.edit.add :main, 'asset_popups', :after => :edit_popups # adds the asset-attachment picker to the page edit view
|
24
|
+
admin.page.edit.asset_popups.concat %w{upload_asset attach_asset}
|
25
|
+
admin.configuration.show.add :trusty_config, 'admin/configuration/clipped_show', :after => 'defaults'
|
26
|
+
admin.configuration.edit.add :form, 'admin/configuration/clipped_edit', :after => 'edit_defaults'
|
27
|
+
|
28
|
+
if TrustyCms::Config.table_exists? && TrustyCms::config["paperclip.command_path"] # This is needed for testing if you are using mod_rails
|
29
|
+
Paperclip.options[:command_path] = TrustyCms::config["paperclip.command_path"]
|
30
|
+
end
|
31
|
+
|
32
|
+
tab "Assets", :after => "Content" do
|
33
|
+
add_item "All", "/admin/assets/"
|
34
|
+
end
|
33
35
|
end
|
34
36
|
end
|
35
37
|
end
|
@@ -38,4 +40,12 @@ class ClippedExtension < TrustyCms::Extension
|
|
38
40
|
|
39
41
|
end
|
40
42
|
|
43
|
+
def database_exists?
|
44
|
+
ActiveRecord::Base.connection
|
45
|
+
rescue ActiveRecord::NoDatabaseError
|
46
|
+
false
|
47
|
+
else
|
48
|
+
true
|
49
|
+
end
|
50
|
+
|
41
51
|
end
|
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.3.
|
4
|
+
version: 3.3.2
|
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: 2018-04-
|
11
|
+
date: 2018-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: acts_as_list
|