Skip to content

Latest commit

 

History

History
81 lines (74 loc) · 1.92 KB

development.textile

File metadata and controls

81 lines (74 loc) · 1.92 KB

Tests

To run tests locally :

  1. Install required packages with bundle:
    bundle install --without production development travis
  2. Run Ruby tests :
    DATABASE_URL="sqlite::memory:" bundle exec rspec spec
  3. Run Javascript tests :
    rake jasmine:ci
  4. To run Javascript tests in a browser :
    rake jasmine

Javascript libraries management

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 :

  1. Install Node and npm
  2. Install Grunt and Bower :
    sudo npm install -g grunt-cli
    sudo npm install -g bower
    npm install
  3. Install Javascript dependencies with Bower :
    bower install
  4. Concatenate and minify dependencies using grunt :
    grunt
  5. Updating npm dependencies
    sudo npm install -g npm-check-updates
    npm-check-updates
    npm install
  6. Updating bower dependencies
    bower update
    grunt

Application structure

  • 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.