To run tests locally :
- Install required packages with bundle:
bundle install --without production development travis
- Run Ruby tests :
DATABASE_URL="sqlite::memory:" bundle exec rspec spec
- Run Javascript tests :
rake jasmine:ci
- To run Javascript tests in a browser :
rake jasmine
This procedure is not required to use CapoRSS. It is only necessary if you want to manage or update the Javascript dependencies of CapoRSS.
To update Javascript libraries :
- Install Node and npm
- Install Grunt and Bower :
sudo npm install -g grunt-cli
sudo npm install -g bower
npm install
- Install Javascript dependencies with Bower :
bower install
- Concatenate and minify dependencies using grunt :
grunt
- Updating npm dependencies
sudo npm install -g npm-check-updates
npm-check-updates
npm install
- Updating bower dependencies
bower update
grunt
- app : Contains the server-side Sinatra application. Each folder has an “init.rb” file which imports the other files.
- helpers : Helper methods.
- models : Datamapper models. Also includes database migrations in the “migrations.rb” file.
- parsers : Custom Feedjira parsers.
- routes : Sinatra routes.
- patches : Fixes on existing libraries.
- backbone : Contains the client-side Backbone application. All of these files are concatenated and minified by the server.
- bin : Contains scheduled task scripts.
- doc : Documentation.
- i18n : Translation files.
- public : Public files. CSS, fonts, images and Javascript dependencies.
- spec : Tests.
- views : Template files.
- partials : HAML partial files.
- scss : SCSS style files.
- underscore : HAML files containing Underscore templates.