Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
The publishing tool for GOV.UK
Ruby HTML JavaScript CSS
branch: master

Merge pull request #376 from alphagov/bump-govuk-content-schema-test-…

…helpers

Bump govuk-content-schema-test-helpers to 1.3.0
Failed to load latest commit information.
app Validate placeholders against content schemas
config Organ donor registration on Completed Transaction
data Add LGSL code 266
db Remove expectation data
doc Remove a few deprecated files
lib Fix local_contact_importer error with nil URLs
public Remove some compiled assets
script Set up fact check addresses from a config file.
spec/javascripts Update analytics usage to be compatible with 2.0.0
test Validate placeholders against content schemas
vendor/assets/javascripts Remove old HTML5 shim
.generators Added tests to ensure that a publication cannot be destroyed if it is…
.gitignore Ignore initialisers prefixed with 'dev_'.
.ruby-version Bump ruby patch version for security fixes
.simplecov Merge coverage reports so that unit tests contribute towards coverage.
.travis.yml Bump ruby patch version for security fixes
CONTRIBUTING.md Define contributing guide
Gemfile Bump govuk-content-schema-test-helpers to 1.3.0
Gemfile.lock Bump govuk-content-schema-test-helpers to 1.3.0
LICENCE.txt Correct copyright notice
Procfile Adding Sidekiq and related config
README.md Add script for running schema tests only
Rakefile Include jasmine:ci in default task
config.ru Rename guides app to 'publisher' (dull, but appropriate). Will stay a…
jenkins-schema.sh Fix the jenkins-schema.sh
jenkins.sh Clone content schemas for the CI build
jenkins_branches.sh Add Jenkins branch build script
startup.sh Add startup script.

README.md

Publisher

Publisher is the primary content design app for GOV.UK. It provides the user interface for entering all the key editorial formats and an API so other apps (primarily frontend) can access that data for display. It is intended to work in partnership with Panopticon which manages metadata, slugs, titles, etc.

Running in development

If you're just interested in running the Publisher locally, with a minimum of interaction with other apps, here's how.

Create a user

publisher$ script/console
>> User.create name: "Your name", email: "youremail@example.com", uid: Time.zone.now.to_i, version: 1

Run panopticon using rails s or similar

panopticon$ rails s -p 3001

Run the publisher app setting env variable to point at your panopticon instance

publisher$ PANOPTICON_URI="http://localhost:3001" bundle exec rails server

Local Transactions

There is no UI or automated process for importing the source data for local transactions.

The source data can be downloaded from http://local.direct.gov.uk/Data/local_authority_service_details.CSV.

They can be imported using a rake task:

bundle exec rake local_transactions:import SOURCE=/path/to/local_authority_service_details.CSV

Statsd

This application uses statsd-ruby to send metrics to statsd. If a statsd process isn't present on the server it won't matter as statsd-ruby sends metrics over UDP. If a statsd process is present then it'll send strings with the respective increment/decrement/gauge function to use.

Asset Manager

If your models include media assets such as images and video, you will need to run the asset-manager app alongside publisher.

See the asset-manager project for app-specific setup instructions.

Publisher needs an OAuth bearer token in order to authenticate with Asset Manager. By default, this is loaded from the PUBLISHER_ASSET_MANAGER_BEARER_TOKEN environment variable in config/initializers/gds_api.rb.

To obtain this bearer token, you should create an API user in the signonotron2 application. In the signonotron2 directory, run:

rake api_clients:create[publisher,publisher@example.com,asset-manager,signin]

This will generate the bearer token you need.

Running the test suite

The test suite relies on the presence of the govuk-content-schemas repository. If it is present at the same directory level as the government-frontend repository then run the tests with:

bundle exec rake

Or to specify the location explicitly:

GOVUK_CONTENT_SCHEMAS_PATH=/some/dir/govuk-content-schemas bundle exec rake

Something went wrong with that request. Please try again.