peterdavidhamilton / service-manual

DfE Service Manual

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DfE Service manual

Before you start

You will need to create a .env.development.local file in your root directory which contains actual values for the following

CONTENTFUL_API_KEY=xxxxxx
CONTENTFUL_SPACE=xxxxxx

Prerequisites

  • Ruby 2.6.5
  • NodeJS 10.x.x
  • Yarn 1.16.x

Setting up the app in development

  1. Run bundle install to install the gem dependencies
  2. Run yarn to install node dependencies
  3. Run bundle exec rails server to launch the app on http://localhost:3000
  4. Run ./bin/webpack-dev-server in a separate shell for faster compilation of assets

Running specs, linter(without auto correct) and annotate models and serializers

bundle exec rake

Running specs

bundle exec rspec

Linting

It's best to lint just your app directories and not those belonging to the framework, e.g.

bundle exec govuk-lint-ruby app config db lib spec Gemfile --format clang -a

or

bundle exec govuk-lint-sass app/webpacker/styles

Security vulnerabilites scanner

Brakeman is a static analysis tool which checks Ruby on Rails applications for security vulnerabilities.

To get the report simply run:

  brakeman

or

  brakeman -o report.html

(if you want a report in a nicer format).

Please check https://brakemanscanner.org/docs/ for more details.

About

DfE Service Manual

License:MIT License


Languages

Language:Ruby 61.8%Language:HTML 28.1%Language:SCSS 6.5%Language:JavaScript 2.0%Language:Dockerfile 1.2%Language:Shell 0.4%