Bump admin template to 1.1.6
Merge pull request #12 from alphagov/bump-admin-template

Bump admin template to 1.1.6
Bump Rails to 4.1.8
Merge pull request #13 from alphagov/bump-rails-to-4-1-8

Bump Rails to 4.1.8
Do not send Uncategorized groups to Publishing API

As we are adding the latest feed, we no longer need to display the
"Other" section at the bottom of a sub-topic.

This PR stops uncategorized groups, which power the "Other" section,
being sent to the Publishing API. It also adds a note to the user on the
frontend warning about this behaviour.
Merge pull request #14 from alphagov/remove-other-section-for-curated-lists

Do not send Uncategorized groups to Publishing API
Add a Tag and MainstreamBrowsePage model

This creates a 'tags' table in the database, and two models: Tag and
MainstreamBrowsePage. A Tag can have a parent (that is not a child), and 
we validate that the slug and title are present.

Here, single table inheritance is being used so that Tag can be of type
MainstreamBrowsePage or Topic (to be implemented later).
Generate a UUID before creation
Add controller to allow browse page creation

This adds a MainstreamBrowsePageController, and workflow to allow a
mainstream browse page to be created.
Ensure tag slugs are unique amongst their siblings

This adds a unique index constraint to the 'tags' table to ensure that a
tag slug is unique amongst all other tags which share the same parent_id.

Validations have also been added to the Tag model to ensure that this
constraint is met, along with some unit tests.
Bump gds-api-adapters to 14.11.0

This adds support to the Panopticon adapter for the new tag endpoints
Add tag presenters

This adds two new presenters: TagPresenter, used to render a Tag 
instance in the required format for Panopticon, and 
MainstreamBrowsePagePresenter, which subclasses TagPresenter to override
the 'tag_type' attribute.

I've separated these concerns at this early stage as I expect there soon
to be a TopicPresenter which will also subclass the TagPresenter, but
which may include additional functionality that is currently provided
by the SectorPresenter.
Add a notifier for Panopticon

This adds a new class which encapsulates behaviour to notify Panopticon
when a tag is created, given an instance of a class that conforms to the
TagPresenter interface.

This also defines the Panopticon service, and provides an instance of
the service in development. A bearer token is always required when 
making requests to Panopticon using the API client. In development,
no assertions are made against the validity of the bearer token, as long
as there is a string present. (see the mock_bearer_token strategy in
GDS:SSO for more details)
Notify Panopticon when a browse page is created

This changes the MainstreamBrowsePagesController so that, when a browse
page is created in this app, a request is made to Panopticon to create
the browse page there too.

The notifier is invoked as part of the create action, and will fail 
noisily if the request is unsuccessful, as the Panopticon API adapter
will raise an exception. For now, it makes sense not to catch this, as 
consistency between this app and Panopticon is the most important thing.
Support updates to mainstream browse pages

This adds 'show', 'edit' and 'update' actions to the 
MainstreamBrowsePageController, so that mainstream browse pages can be
updated.
Notify Panopticon when a browse page is updated

This extends the earlier work to add the PanopticonNotifier, and adds 
a new method to notify Panopticon for an updated tag.

The MainstreamBrowsePagesController has been changed to invoke the new
'update_tag' method on the notifier after a mainstream browse page has
been saved.
Fix the mainstream_browse_page factory
Tidy up list of mainstream browse pages

This makes the list of mainstream browse pages a table, and changes the
data displayed so that only parent tags are listed here.

Here, we're using RSpec's feature spec pattern to have integration tests
for smaller aspects of the app which fall outside of the 'critical path'
scope for the Cucumber test suite.
Correctly use the parent_id in TagPresenter

This fixes the TagPresenter so that the slug of the parent tag is 
used to build the tag_id, instead of the primary key.

This also makes the presenter more robust for the scenario where no 
parent exists for the tag.
Allow child browse pages to be created

This changes the existing mainstream browse pages implementation so that
child browse pages can be created under a parent browse page.

This also changes the 'show' view for parent browse pages, so that they 
display a list of their children, and add a link to the form to create
a new child browse page.

A child browse page is created through the same 'new'/'create' actions
as parent browse pages, but with a parent_id attribute, provided through
a URL parameter (and checked during the rendering of the page).

Panopticon is notified of the creation of child browse pages in the same
way as parents.