Serves the homepage, transactions and some index pages on GOV.UK
Switch branches/tags
Clone or download
tijmenb Merge pull request #1648 from alphagov/dependabot/bundler/govuk_publi…
…shing_components-12.1.0

Bump govuk_publishing_components from 12.0.0 to 12.1.0
Latest commit dd5b679 Oct 15, 2018
Permalink
Failed to load latest commit information.
app Fetch country child link details from details hash Oct 8, 2018
bin Upgrade to Rails 5.1.4 Nov 14, 2017
config Attempt to minify the javascripts Sep 20, 2018
doc Sort of renders an answer Sep 6, 2011
lib Fix linting issues relating to memoized variable names Sep 20, 2018
log Add gitkeep to log so Docker can compile production assets Jan 8, 2018
public Remove redundant google site verification file. Dec 11, 2013
script Fix whitespace & indentation issues Sep 28, 2016
spec/javascripts Update Jasmine tests for Jasmine 2+ Feb 16, 2018
test Remove deprecation warning about importing mini_test Oct 8, 2018
.gitignore Fix rubocop errors Jan 14, 2016
.rubocop.yml Bump the target Ruby version in .rubocop.yml Sep 20, 2018
.ruby-version Bump to ruby-2.5.1 May 29, 2018
CONTRIBUTING.md Define contributing guide Nov 29, 2013
Dockerfile Bump to ruby-2.5.1 May 29, 2018
Gemfile Bump govuk_publishing_components from 12.0.0 to 12.1.0 Oct 15, 2018
Gemfile.lock Bump govuk_publishing_components from 12.0.0 to 12.1.0 Oct 15, 2018
Jenkinsfile Remove brakeman: true from the Jenkinsfile Sep 20, 2018
LICENCE.txt Correct copyright notice Feb 16, 2015
Procfile Use foreman to run application in docker environment Feb 16, 2018
README.md Remove site search from README Jan 5, 2018
Rakefile Add jenkins:ci task to default rake Feb 16, 2018
app.json Make sure Heroku apps serve their own assets Mar 21, 2018
config.ru Fix whitespace & indentation issues Sep 28, 2016
startup.sh Update to startup script Jun 7, 2017

README.md

GOV.UK Mainstream, Home & Search Frontend

Application to serve some mainstream formats and the homepage for GOV.UK.

Live examples

Formats

Hard-coded routes

Nomenclature

  • Formats - our phrase for a type of content

Technical documentation

A Ruby on Rails application that renders the citizen-facing part of formats stored in the Content Store. It looks up the passed-in slug in the Content Store.

It also serves the homepage (hard-coded route).

See app/views/root for some bespoke transaction start pages.

Dependencies

Running the application

To run the application standalone, run static and execute the following command:

PLEK_SERVICE_STATIC_URI=http://127.0.0.1:3013 ./startup.sh

which uses a local copy of static.

Note that you will have to have GOV.UK Mapit running locally.

To run in a full development stack (with DNS, all apps running etc.) just use ./startup.sh.

If you are using the GDS development virtual machine then the application will be available on the host at http://frontend.dev.gov.uk/

Note that the app uses a local version of GOV.UK Mapit, therefore a valid dataset will have to be loaded for Mapit, otherwise postcode lookups will not succeed. This is part of the standard GOV.UK data replication steps.

Running the test suite

bundle exec rake runs the test suite.

JavaScript unit testing

The tests in test/javascripts will be run as part of the test:javascript task.

To run them in a browser on your local machine (useful for breakpointing):

  1. run INCLUDE_JS_TEST_ASSETS=1 bundle exec script/rails server -p 3150 --environment=test on your vm
  2. open test/javascripts/support/LocalTestRunner.html (as a static file) in your browser.

This relies on you being able to access the above server on http://www.dev.gov.uk:3150.

Licence

MIT Licence