Skip to content

Upgrading ComfortableMexicanSofa

GBH edited this page Mar 26, 2013 · 32 revisions

To upgrade to a newer version of ComfortableMexicanSofa you must bump up the version number in your Gemfile like so:

gem 'comfortable_mexican_sofa', '~> 1.8.0'

and run bundle install.

Sometimes you'll need to create migrations to adjust the database. Generally it happens during major and minor version changes. Meaning that upgrade from 1.1.5 to 1.2.2 will probably require a migration, but 1.1.5 to 1.1.9 will not. If upgrading several minor version you'll need to apply all database migrations sequentially.


Upgrading from 1.7.x to 1.8.0+

  • Routing is now explicit. No more hoping that the globbing content serving route attaches itself at the bottom. Now you have to specify where routes go. All you need to do it either run rails g comfy:cms and move newly created routes (they'll probably end up at the top of the file), or manually paste this at the bottom of your routes.rb: ComfortableMexicanSofa::Routing.content :path => '/', :sitemap => false. You should also add this, if you want to access admin area: ComfortableMexicanSofa::Routing.admin :path => '/cms-admin'
  • Added extra manifests for easy admin area customization. If you want to change css within admin area, simply create app/assets/stylesheets/comfortable_mexican_sofa/admin/application.css (.sass/.scss/.whatever). For javascript, same idea: app/assets/javascripts/comfortable_mexican_sofa/admin/application.js (.coffee?).

Upgrading from 1.6.x to 1.7.0+

  • Admin interface is styled using Bootstrap 2.3.0
  • Forms are handled with formatted_form
  • Upgraded to CodeMirror 3
  • Bumped up Paperclip version requirement to 3.4.0. Default config is fixed now.
  • Replaced elRTE wysiwyg editor with wysihtml5
  • Due to wysiwyg editor replacement file insertion and management is temporarily missing.
  • Added support for Markdown. You can define markdown fields like this: {{ cms:page:content:markdown }}
  • Added support for Ruby 2.0.0
  • Dropped support for Ruby 1.8.7
  • Dropped support for Rails 3.0 (upgrade to 3.1 or 3.2)
  • Introduced a few common dependencies. HAML/SASS replace HTML/CSS. CoffeeScript will replace JS scripts.
  • No new migrations to worry about.

Upgrading to 1.6.26+

  • Fixture importing/exporting uses site identifiers instead of hostnames. You may need to adjust folder names.

Upgrading to 1.6.11+

  • Discovered a crappy paperclip default that now corrected with config.upload_file_options. Now default attachment url is set to /system/:class/:id/:attachment/:style/:filename instead of /system/:attachment/:id/:style/:filename. This means you'll need to move directories to adjust for this change. Not a problem if you never uploaded any files through CMS, or have your own override in place.

Upgrading from 1.5.x to 1.6.0

  • Replaced Wymeditor with elRTE.
  • Integrated image insertion with uploaded files.
  • Categories are scoped on Sites.
  • Cleaned up mess with slugs/labels. Now if your find_by_slug method is failing you want to replace it with find_by_identifier. Sites have identifiers now too.
  • Bumped up paperclip version in the Gemfile. Anything above 2.3.0 is OK. Choose your version wisely.
  • Migration file: https://raw.github.com/comfy/comfortable-mexican-sofa/master/db/upgrade_migrations/07_upgrade_to_1_6_0.rb
  • Don't forget to rails g comfy:cms if not using asset pipeline.
  • You also might need to refresh thumbnails for previously uploaded images with: rake paperclip:refresh CLASS=Cms::File

Upgrading from 1.4.x to 1.5.0

Upgrading from 1.3.x to 1.4.0

  • You can manage your uploads from the dedicated Files section. It will even allow you to upload multiple files at the same time.
  • Pages, snippets and files can be categorized. Helps with management and allows you to pull collections like this: @site.files.for_category('red_category', 'blue_category')
  • Don't forget to apply the migration https://github.com/comfy/comfortable-mexican-sofa/raw/master/db/upgrade_migrations/05_upgrade_to_1_4_0.rb
  • There are some CSS and JS changes as well, so run rails g comfy:cms if running Rails 3.0

Upgrading from 1.2.x to 1.3.0

  • Multiple Sites is a default functionality now. Setting to toggle it in the initializer is gone. content_prefix_path is an attribute of the Site now. This way if you want to serve pages from http://localhost/en/ you need to set up a Site with hostname localhost and path en.
  • Migration file can be found here: https://github.com/comfy/comfortable-mexican-sofa/raw/master/db/upgrade_migrations/04_upgrade_to_1_3_0.rb
  • Page caching (along with the initializer setting) is removed for the time being as it doesn't work for multiple sites.

Upgrading from 1.1.x to 1.2.0

Upgrading from 1.0.x to 1.1.1