Rails engine for rearview. This project is for rearview developers only. For users please go to the rearview project for installation, configuration, and other details.
Be sure to read the contribution guidelines contribute.
Before contributing you should read Getting Started with Engines guide to familiarize yourself with rails engines. This blog post also provides some more in-depth details of rails engines.
Rearview consists of two components:
(1) Rearview engine (this repo)
The vast majority of any code customizations and bug fixes should be made here.
(2) Rearview engine host (https://github.com/livingsocial/rearview)
This is mostly a convienience for users so they can quickly get rearview up and running. This also allows users to customize views and other components at well defined extension points without them having to submit them back into the code base.
Note: the rearview engine is not completely isolated (yet) so it cannot be safely multi-tennated with other engines in the same host
git clone [email protected]:livingsocial/rearview-engine.git
git clone [email protected]:livingsocial/rearview.git
Change the line simliar to this
gem 'rearview', '~> 1.0.0'
To point to the path you cloned the engine too, for example
gem 'rearview', :path => '~/clone/path/rearview-engine'
Update your gems with bundler
bundle install
rake rearview:install:migrations
rake db:setup
bin/rails server
The Rearview UI is built using bootstrap, require.js, and backbone.
Rearview does not use the asset pipeline. Instead you'll need to take a look at public/rearview-src. In development mode javascript, css, etc are loaded directly from here. When rearview-engine is bundled as a Gem the various elements are pre-compiled (manually before gem build) using require.js and are loaded from public/rearview.
To compile the ui before distribution, run the following rake task from inside rearview-engine:
rake rearview:ui:build