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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e373d392203b28442ebf17a3b2174a282c43357f4a89351056aacf7b400f505
4
- data.tar.gz: e0f34c90b48af63d7de0788795a4373638f2426d5c926ba5f4067eec58bf5eb9
3
+ metadata.gz: 2afe1e335218fdc9543278f43aa02d37fbb02d09799891e44ec9df52c39c60d1
4
+ data.tar.gz: 7ec6e36c084504e083f391016e5176f524bce3c123199bdec8221348d85d122c
5
5
  SHA512:
6
- metadata.gz: 5076487c7701af146ecf07dccad04ce4c1c4f5951522781d4ccf327f6a3bc0cf963ee3a54ab02dbc7f45a26cae9488f4a20e57aa674519c2c175d0855d3292c9
7
- data.tar.gz: 339e7be449be6161b6baff53c7e7533424a7d4ed327320b31f5a2a28d8f976f124971727493d0bb3a1ff45f8ab88065149fbab6037ac22eb7daab796e50a2831
6
+ metadata.gz: 499c64b11f93824feec2f5fc4712d7416f66f7ec06e0ac99f6b65570b2220197cd3a43c05156cfdb371ae3fb9734691aada7d37bae1d95b0bac244f91bab36c0
7
+ data.tar.gz: 800fc065a9a07c5b33020e7ece0e327455b05ff0b00ab644e588bbb067f9b6bb0b04f76fab9e6b080ae25db203bcfffc48d8691752c6528986b21e2732b4d4f8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trusty-cms (3.3.1)
4
+ trusty-cms (3.3.2)
5
5
  RedCloth (= 4.3.2)
6
6
  acts_as_list (~> 0.9.5)
7
7
  acts_as_tree (~> 2.6.1)
@@ -8,10 +8,7 @@ module TrustyCms
8
8
  end
9
9
 
10
10
  def migrate_extensions
11
- TrustyCms::Application.config.extensions.each do |ext|
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
@@ -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 = '3.3.1'
5
+ VERSION = '3.3.2'
6
6
  end
7
7
  end
@@ -3,33 +3,35 @@ class ClippedExtension < TrustyCms::Extension
3
3
  require 'admin/assets_helper'
4
4
 
5
5
  def activate
6
- if Asset.table_exists?
7
- Page.send :include, PageAssetAssociations # defines page-asset associations. likely to be generalised soon.
8
- TrustyCms::AdminUI.send :include, ClippedAdminUI unless defined? admin.asset # defines shards for extension of the asset-admin interface
9
- Admin::PagesController.send :helper, Admin::AssetsHelper # currently only provides a description of asset sizes
10
- Page.send :include, AssetTags # radius tags for selecting sets of assets and presenting each one
11
- UserActionObserver.instance.send :add_observer!, Asset # the usual creator- and updater-stamping
12
-
13
- 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]
14
- 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]
15
- 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]
16
- AssetType.new :pdf, :icon => 'pdf', :processors => [:thumbnail], :extensions => %w{pdf}, :mime_types => %w[application/pdf application/x-pdf], :styles => :standard
17
- 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]
18
- AssetType.new :other, :icon => 'unknown'
19
-
20
- admin.asset ||= TrustyCms::AdminUI.load_default_asset_regions # loads the shards defined in AssetsAdminUI
21
- admin.page.edit.add :form, 'assets', :after => :edit_page_parts # adds the asset-attachment picker to the page edit view
22
- admin.page.edit.add :main, 'asset_popups', :after => :edit_popups # adds the asset-attachment picker to the page edit view
23
- admin.page.edit.asset_popups.concat %w{upload_asset attach_asset}
24
- admin.configuration.show.add :trusty_config, 'admin/configuration/clipped_show', :after => 'defaults'
25
- admin.configuration.edit.add :form, 'admin/configuration/clipped_edit', :after => 'edit_defaults'
26
-
27
- if TrustyCms::Config.table_exists? && TrustyCms::config["paperclip.command_path"] # This is needed for testing if you are using mod_rails
28
- Paperclip.options[:command_path] = TrustyCms::config["paperclip.command_path"]
29
- end
30
-
31
- tab "Assets", :after => "Content" do
32
- add_item "All", "/admin/assets/"
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.1
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-25 00:00:00.000000000 Z
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