-
Notifications
You must be signed in to change notification settings - Fork 307
Upgrading to social stream 2.0
Social Stream 2.0 principal changes consist on a full rewrite of the views. It should not be too hard to migrate from version 1.0 to 2.0 if you have not touched your views or you have totally rewrite them.
These are the issues you must consider in your upgrade:
- Run
rake social_stream:migrations:update
in order to copy new migrations to your application and migrate usingrake db:migrate
Avatars have received an important refactorization. Support for multiple avatars have been dropped, saving in the number of database queries
- Check your
config/initializers/avatars_for_rails.rb
if it exists in your application, and compare it with https://github.com/ging/avatars_for_rails/blob/master/lib/generators/avatars_for_rails/templates/initializer.rb - After running the migrations, your avatars will move to a new location inside the
public/
directory
Social Stream 2.0 uses new thumbnail sizes, in order to optimize bandwidth.
- Run
rake social_stream:attachments:fix
to regenerate the thumbnails. You can save the generation of the most heavy formats placing a file inpublic/system/paperclip_attachments.yml
with the following content:
---
:Video:
:file:
- :flv
- :mp4
- :webm
:Audio:
:file:
- :webma
Social Stream 2.0 uses Sass to fully decouple the views from the style. However, social_stream stylesheets must be compiled at once.
- Change
application.css
to*= require social_stream.css.sass
only. Then, create aapp/assets/stylesheets/social_stream.css.sass
with all the imports, like https://github.com/ging/social_stream/blob/master/spec/dummy/app/assets/stylesheets/social_stream.css.sass
Social Stream 2.0 uses Deface to add new functionality in the views. If you added functionality to your toolbar, sidebar, etc, you must change it to deface style. If you don't know what we are talking about, you don't have to worry about this step
- Migrate your addictions to
Toolbar
,Sidebar
, etc to Deface