The MAS CMS.
- Ruby/Rails
- ImageMagic
- MySQL
- Node.js (for Bower)
- Bower (Install via NPM)
$ ./bin/setup
$ rails s
The setup script will install required gems, bower modules and create the databases as well as seed some data to setup the CMS.
Note: Make sure you've added all the required API keys for the app to work properly. Make sure you set the HOSTNAME, GA_API_EMAIL_ADDRESS, GA_PRIVATE_KEY_PATH variables in the .env
file appropriately. The setup script above will set up the .env
file structure but you may need to set some keys seperately, particularly the Rackspace ones.
Sometimes you may need to seperately update Dough to pull the latest style changes. You can do that by running:
bundle update dough-ruby
bowndler update
Run unit specs with:
$ bundle exec rspec
Run feature specs with:
$ bundle exec cucumber
For JavaScript tests we use:
Run JavaScript tests with:
npm test
Or for the direct command:
./node_modules/karma/bin/karma start test/karma.conf.js
autoWatch
is on by default so tests will rerun whenever changes are made.
Use --single-run
if you only want it to run once.
This can easily be deployed to Heroku but the MAS organisation uses its own deployment infrastructure. If you're a MAS employee, you can deploy this to QA by triggering the cms_commit
pipeline . Refer to the organisational wiki on how to deploy to our production environment.
The styleguide lists all HTML/CSS components used within the CMS.
Any new components should be built here first, then integrated into the views.
The rake task
bundle exec rake cms:update_page_views
is to retrieve page views from Google Analytics for articles. This allows us to generate the Popular links section that is displayed in the frontend application.