Skip to main content
Table of contents

Application: manuals-publisher

Publishes manuals on GOV.UK

Ownership

#govuk-platform-health owns the application and is responsible for updating its dependencies.

Hosting

The production version of this application is hosted on Carrenza.

SSH Access (Carrenza & AWS)

This application lives on backend machines in Carrenza.

gds govuk connect ssh -e staging carrenza/backend
gds govuk connect ssh -e production carrenza/backend

This application lives on backend machines on the integration environment in AWS.

gds govuk connect ssh -e integration backend

Run a rake task

Relevant manual pages

Example pages published by manuals-publisher

README

Warning The content below is pulled in directly from the repository.
Links might not function properly.

Manuals Publisher is a Ruby on Rails content management application for the ‘manuals’ format. The manuals format is currently in a rendered phase of migration, so content is stored in a local datastore but also drafted and published through the publishing-pipeline via the Publishing API.

This is the renamed repository of the original Specialist
Publisher. Specialist Publisher has been divided into two publishing
applications to accommodate Specialist Documents and Manuals
separately. Specialist Document or Finders publishing now lives
at https://github.com/alphagov/specialist-publisher. See history for more details.

Purpose

Publishing app for manuals.

Nomenclature

  • Manual: Grouped Documents published as a number of sections inside a parent document

Live examples of manuals

Dependencies

Running the application

To run the application in development you will need at least one user in the application database. In a rails console do:

User.create!(name: "My Name", email: "my.email@somedomain.com", permissions: ["gds_editor"], organisation_slug: "government-digital-service", organisation_content_id: "af07d5a5-df63-4ddc-9383-6a666845ebe9")

Note: This insert (and the app in general) doesn’t work with recent versions of MongoDB. v3.0.12 works OK; v3.4.1 does NOT work due to a problem with the :w => 1 option no longer being supported at the top level, i.e. outside the Write Concern options. It looks as if v2.4.9 is currently being used in production.

Then start the application:

$ ./startup.sh

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

Running the test suite

$ bundle exec rake

Note: The cucumber rake task which is run as part of the default rake task does not work with bundler versions of 1.13.0 onwards. The following exception occurs: cannot load such file -- active_model/translation (LoadError). The full stack trace is recorded here. Based on the fact that the Ruby version is set to v2.1.2, it looks as if the version of bundler currently being used in production is v1.6.5.

Application directory structure

Non standard Rails directories and what they’re used for:

  • app/models Combination of Mongoid documents and Ruby objects for handling Documents and various behaviours
    • app/models/validators Not validators. Decorators for providing validation logic.
  • app/presenters Decorators mainly used for previewing documents
  • app/services Reusable classes for completing actions on documents
  • app/view_adapters Provide classes which allow us to have Rails like form objects in views
  • app/workers Classes for sidekiq workers. Currently the only worker in the App is for publishing Manuals as Manual publishing was timing out due to the large number of document objects inside a Manual

Documentation