Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
33e8577
Update GOV.UK Frontend dependency to 2.1.0
Sep 26, 2018
193c689
Use header macro instead of HTML
Sep 26, 2018
c293f48
Document in CHANGELOG
Sep 26, 2018
22e7dd0
Merge pull request #600 from alphagov/update-frontend-to-2.1.0
Sep 26, 2018
b3dda98
Release v8.1.0
Sep 26, 2018
0993c2d
Merge pull request #601 from alphagov/release-8.1.0
Sep 26, 2018
ce8ad13
Set stylesheet media to all
Oct 2, 2018
11b31c7
Document in CHANGELOG
Oct 2, 2018
54d97ec
Merge pull request #605 from alphagov/fix-print-styles
Oct 2, 2018
ba4d5c0
fix About link in nav
joelanman Oct 3, 2018
8bf8ab2
Merge pull request #607 from alphagov/fix-about-link
joelanman Oct 3, 2018
ae83a74
Use form POST request when clearing session data
36degrees Oct 8, 2018
fb5464f
Use consistent page titles
36degrees Oct 8, 2018
396c582
Document in changelog
36degrees Oct 8, 2018
56293c1
Merge pull request #608 from alphagov/post-to-clear-session
36degrees Oct 8, 2018
736e420
Update GOV.UK Frontend dependency
Oct 11, 2018
ed4b6a5
Import character-count component
Oct 11, 2018
4362c7e
Document in CHANGELOG
Oct 11, 2018
430d99f
Merge pull request #609 from alphagov/update-govuk-frontend
Oct 11, 2018
5ec6251
Release 8.2.0
Oct 11, 2018
4f248ad
Merge pull request #610 from alphagov/release-8.2.0
Oct 11, 2018
b639cc7
Heroku review app config
Oct 16, 2018
376756f
Merge pull request #612 from alphagov/heroku-review-app-config
Oct 17, 2018
31e4cdf
Fixed path for page templates in tutorials-and-examples
Oct 26, 2018
f6d7851
Merge pull request #620 from denizgenc/patch-1
36degrees Oct 26, 2018
a54a9d8
Add first draft of Notify integration guidance
quis Aug 2, 2018
8102a2d
Rewrite instructions to add more context
quis Sep 28, 2018
7900a7a
Remove duplicate send/sent
quis Oct 4, 2018
f0a0601
Remove use of shell redirection to save key
quis Oct 4, 2018
c5d8516
Capitalise GitHub
quis Oct 4, 2018
eac9a31
Remove unneeded explanation of variable
quis Oct 4, 2018
531f95d
Use HTML not macro for form example
quis Oct 4, 2018
aa9fbb3
Fix line telling people where to put routing code
quis Oct 4, 2018
909b01f
Add CHANGELOG entry
Oct 29, 2018
77a1205
Merge pull request #574 from quis/patch-3
Oct 29, 2018
8d3e34b
Add link to docs about using Notify
Oct 30, 2018
d75f802
Tidy code block in Notify guidance
Oct 30, 2018
bf1052b
Merge pull request #623 from alphagov/tidy-up-notify-guidance
Oct 30, 2018
3ccc972
Removed dependency
Oct 26, 2018
0f009ab
Merge pull request #621 from dylmye/RemoveMinimistDep
joelanman Oct 30, 2018
6364f2d
Add npm install reminder on crash
colinrotherham Sep 10, 2018
29f8ac5
Merge pull request #598 from colinrotherham/nodemon-crash
36degrees Oct 30, 2018
2fc55d5
Add standardjs and supertest to dev dependencies
simoneduca May 10, 2018
5322d51
Merge pull request #619 from alphagov/create-devdeps
Oct 30, 2018
be46e21
Setup exclusion list for the generated ZIP download
Oct 31, 2018
279a15c
Merge pull request #625 from alphagov/ignore-project-specific-files-f…
Nov 1, 2018
60fee40
Update govuk-frontend to 2.3.0
Nov 1, 2018
d0ab0c3
Document in CHANGELOG
Nov 1, 2018
73c52c4
Merge pull request #628 from alphagov/update-govuk-frontend-to-2.3.0
Nov 1, 2018
0b57fe1
Add step by step navigation
joelanman Jul 3, 2018
954d3a0
remove data-track-count (seems unused here)
joelanman Jul 6, 2018
73c4350
remove tracking code
joelanman Jul 6, 2018
694ff22
refactor scss
joelanman Jul 6, 2018
9a62d79
fix javascript for Standard
joelanman Oct 18, 2018
ea0ed35
Changelog
joelanman Oct 26, 2018
772626f
Merge pull request #539 from alphagov/step-by-step
joelanman Nov 1, 2018
c2c1f87
Release 8.3.0
Nov 1, 2018
8f23c3f
Merge pull request #629 from alphagov/release-v8.3.0
Nov 1, 2018
896e55c
Fix list of excluded styles
Nov 1, 2018
1787aa3
Merge pull request #630 from alphagov/fix-gitattributes-file
Nov 1, 2018
579810d
Move closing H1 tag onto the same line as the opening tag
36degrees Nov 2, 2018
4375b46
Merge pull request #632 from alphagov/closing-h1-tag-same-line
36degrees Nov 2, 2018
5442094
Avoid double-nested buttons in step-by-step navigation
colinrotherham Nov 2, 2018
83efd43
Merge pull request #634 from colinrotherham/step-nested-buttons
36degrees Nov 2, 2018
791fd95
Link to new GOV.UK Notify documentation
quis Nov 5, 2018
ef9c635
Merge pull request #635 from quis/patch-4
36degrees Nov 5, 2018
43faf40
Make unbranded layout available in app views
Nov 8, 2018
bcb0322
Enable global styles in unbranded.css
Nov 8, 2018
430f7a7
Document in CHANGELOG
Nov 8, 2018
82b9837
Merge pull request #638 from alphagov/make-unbranded-template-availab…
Nov 8, 2018
2ce3574
Update GOV.UK Frontend to v2.4.0
Nov 19, 2018
341c5fa
Merge pull request #642 from alphagov/update-govuk-frontend-to-2.4.0
Nov 19, 2018
5b1e103
Release v8.4.0
Nov 19, 2018
b9fdaf1
Merge pull request #643 from alphagov/release-8.4.0
Nov 19, 2018
6534709
Rename test to __tests__
hannalaakso Nov 14, 2018
989a2c1
Initial commit of moving tests over to Jest
hannalaakso Nov 14, 2018
fb0c8e3
Removes gulp mocha
Nov 14, 2018
0ccbc4a
Move listener to listen-on-port.js
Nov 16, 2018
adc950e
Add changelog
hannalaakso Nov 20, 2018
af6bb02
Merge pull request #640 from alphagov/add-jest-tests
hannalaakso Nov 20, 2018
0e3cad7
Revert "Replacing Mocha with Jest"
NickColley Nov 20, 2018
11ec96a
Merge pull request #644 from alphagov/revert-640-add-jest-tests
joelanman Nov 20, 2018
61aa37f
Rename test to __tests__
hannalaakso Nov 14, 2018
6d45976
Initial commit of moving tests over to Jest
hannalaakso Nov 14, 2018
d63666e
Removes gulp mocha
Nov 14, 2018
1add6c5
Move listener to listen-on-port.js
Nov 16, 2018
c842486
Add changelog
hannalaakso Nov 20, 2018
45bf3a6
Start listen-on-port.js for Heroku
Nov 20, 2018
0e6dfd4
Merge pull request #645 from alphagov/al/add-jest-tests-new
aliuk2012 Nov 20, 2018
ca1b26a
updates support details
Nov 12, 2018
6078865
Merge pull request #639 from alphagov/al/add-support-details
aliuk2012 Nov 20, 2018
17d50b6
Add note about frontend survey to README
NickColley Nov 21, 2018
11c4589
Merge pull request #646 from alphagov/add-frontend-survey-to-readme
NickColley Nov 22, 2018
964565f
Test forceHttps functionality
Nov 22, 2018
58eefe0
Refactors force-https-redirect.js specs
Nov 23, 2018
ea5e182
Merge pull request #649 from alphagov/add-force-https-redirect-tests
aliuk2012 Nov 23, 2018
7f71c5b
Fix link context in step-by-step templates
eronisko Nov 22, 2018
fa1bff4
Document in changelog
Nov 26, 2018
3ea9eaa
Merge pull request #647 from eronisko/fix-step-by-step-templates
Nov 26, 2018
72b2226
Revert "Add note about frontend survey to README"
NickColley Dec 3, 2018
2e4b440
Merge pull request #654 from alphagov/revert-646-add-frontend-survey-…
NickColley Dec 3, 2018
22284bb
Moves basicAuth out of lib/utils.js
Nov 28, 2018
d9664e8
Adds basic unit tests for authentication
Nov 28, 2018
a94b418
Refactor authentication to use console.error
hannalaakso Nov 28, 2018
b538169
Moves middleware logic from server.js to authentication.js
hannalaakso Nov 28, 2018
64fac19
Adds unit tests for when the kit is running in non-prod environment
Nov 29, 2018
f6d42df
Merge pull request #651 from alphagov/al/middleware-basic-auth
aliuk2012 Dec 7, 2018
d852091
Bump GOV.UK Frontend to latest release
NickColley Dec 11, 2018
6e014d6
Merge pull request #657 from alphagov/bump-govuk-frontend
NickColley Dec 11, 2018
129ca4a
Gulp 4.0.0 upgrade
olliewilliams-CH Dec 19, 2018
d94906f
Update CHANGELOG.md
olliewilliams-CH Dec 19, 2018
2ac70db
Grouped dependencies
olliewilliams-CH Dec 19, 2018
2bc90d0
Update watch.js
olliewilliams-CH Dec 21, 2018
06eba42
Gulp task improvements
olliewilliams-CH Dec 28, 2018
1dd4dea
Merge pull request #659 from olliewilliams-CH/upgrade-to-gulp-4
joelanman Jan 2, 2019
9eea67f
update Standard
joelanman Jan 2, 2019
106bee0
standard 12 fixes
joelanman Jan 2, 2019
6ffc0b7
changelog
joelanman Jan 2, 2019
2542c17
Merge pull request #663 from alphagov/update-standard
joelanman Jan 2, 2019
626b66f
Replaces gutil-color with ansi-colors
Jan 2, 2019
00cf503
Replaces gutil.log with fancy logs
Jan 2, 2019
7c38f7c
Removes gulp-util as its now deprecated
Jan 2, 2019
63a765e
Adds entry to changelog
Jan 2, 2019
301a701
Merge pull request #664 from alphagov/remove-gulp-util
aliuk2012 Jan 2, 2019
ddcfdc0
Add acorn dependency to fix npm warning
joelanman Jan 3, 2019
d04f6c6
changelog
joelanman Jan 4, 2019
02e7a72
Merge pull request #666 from alphagov/fix-acorn-warning
joelanman Jan 4, 2019
e6ed4ff
Move acorn to dependency
Jan 4, 2019
d0ee20b
updates changelog
Jan 4, 2019
cc3c102
Merge pull request #667 from alphagov/fix-acorn-dependency-warning
aliuk2012 Jan 4, 2019
0c16f78
Update GOV.UK Frontend to version 2.5.0
NickColley Jan 10, 2019
abecae0
Import new components Accordion and Summary List
NickColley Jan 10, 2019
024eff7
Update CHANGELOG
NickColley Jan 10, 2019
d141b31
Merge pull request #671 from alphagov/update-govuk-frontend-to-2-5-0
NickColley Jan 11, 2019
56dd92c
Replace check answers pattern with updated code
Jan 11, 2019
f2272eb
Update button text and licence period content
Jan 14, 2019
8d0c21d
changelog
joelanman Jan 16, 2019
d89c86a
Merge pull request #672 from alphagov/update-check-answers
joelanman Jan 16, 2019
9b91756
Release 8.5.0
joelanman Jan 16, 2019
d2749d8
Merge pull request #678 from alphagov/release
joelanman Jan 16, 2019
5fdcbce
Update GOV.UK Frontned to version 2.6.0
Jan 31, 2019
70c5518
Merge pull request #680 from alphagov/update-frontend
aliuk2012 Jan 31, 2019
cf60dca
Release 8.6.0
Jan 31, 2019
cc8d92a
Merge pull request #681 from alphagov/release
aliuk2012 Jan 31, 2019
02226d1
add guidance for CSS, JavaScript and images
joelanman Feb 5, 2019
730b6d0
Merge pull request #683 from alphagov/assets-guidance
joelanman Feb 6, 2019
a987f01
Test on on macOS and Windows and both Node 10 / 8
36degrees Feb 7, 2019
71523d3
Remove before_deploy step
36degrees Feb 7, 2019
bb5a368
Add new deploy key for Travis
36degrees Feb 11, 2019
f7483dc
Tidy up config and release script
36degrees Feb 11, 2019
f481da1
Update documentation for create-release
36degrees Feb 11, 2019
fb2ddcf
Remove verification
36degrees Feb 11, 2019
ec39354
Merge pull request #688 from alphagov/test-on-windows
36degrees Feb 11, 2019
3803658
update docs and package.json to Node 10 LTS
joelanman Feb 6, 2019
831545c
Merge pull request #687 from alphagov/use-node-10
joelanman Feb 12, 2019
3eee124
Adds Extension Framework for departments to use their own frontend sy…
Aug 10, 2018
f933ab7
Update govuk-frontend from 2.6.0 to 2.7.0
Feb 11, 2019
1845bf2
Fixed extensions for windows (including tests).
Feb 13, 2019
8a51c17
Merge pull request #613 from hmrc/extensions
aliuk2012 Feb 14, 2019
309edc1
Release 8.7.0
Feb 14, 2019
4ee3eec
Merge pull request #690 from alphagov/new-release
aliuk2012 Feb 14, 2019
a454422
release docs
joelanman Feb 6, 2019
44737b7
Merge pull request #686 from alphagov/release-docs
aliuk2012 Feb 15, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# dont include the following files in the zip
.gitattributes export-ignore
README.md export-ignore
CHANGELOG.md export-ignore
CONTRIBUTING.md export-ignore
create-release.sh export-ignore
travis.yml export-ignore
.travis export-ignore
app.json export-ignore
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ignore tracking usage data config - we want a different one for each user
usage-data-config.json
# ignore extension SCSS because it's dynamically generated
lib/extensions/_extensions.scss
.env
.sass-cache
.DS_Store
Expand Down
47 changes: 32 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
language: node_js

node_js:
- "lts/*"
before_deploy:
- test $TRAVIS_TEST_RESULT = 0
before_install:
- npm install -g mocha
deploy:
- provider: script # (If version.txt is updated) - create a new tag and push to Github, update the latest-release branch
script: ./create-release.sh
on: master
# Automatic deploys are enabled in Heroku for this app
# Every push to master will deploy a new version of this app. Deploys happen automatically.
# Heroku will wait for CI to pass before deploying.
- "lts/*"
- "8"

os:
- linux
- osx
- windows

jobs:
include:
# If version.txt is updated on the master branch:
# - create a new tag and push it to Github
# - update the latest-release branch
- stage: deploy
name: "Create release on GitHub 🚀"
os: linux
script: echo "Checking whether we should release..."
deploy:
- provider: script
script: ./create-release.sh
on:
branch: master
env:
# DEPLOY_KEY
- secure: qpuH/3v+wsMLy9C3bGjallB6KxFQAtDlyZf3jmX8UQ0703tIvBnZoC1h9EJXOqxZbirLPHon7g902nOuhqUfrsPQgV7XEmXMGZsp31PuK/1lkyTCG3fAdeg8wcghwZn10Gw8jYZpOfWIf2GPDL+6utIU6Aog+odcls7tHWLVT80=

# Automatic deploys are also enabled in Heroku for this app
# Every push to master will automatically deploy a new version of this app.
# Heroku will wait for CI to pass before deploying.

notifications:
email: false

sudo: false
env:
global:
- secure: esj3ut+TwKX25QzU1koJyTVIX+x1V55graI65X8LiYXKcOP040VPJ9lIC0HeRs5UViBM0Ur1F93rGdgW2zYVzu5MLZoH7KjpzMcG30x+FDqLChT0JfNcLLtLm/wIhx/OAAmsBxXlvjPp092BeEKd3Jug8d329TxwwK5G5XxAatg=
52 changes: 41 additions & 11 deletions .travis/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,48 @@
# Travis encrypted files

This directory contains a public/private keypair generated just for this repository.
This directory contains an encrypted private deploy key with write access to the
Prototype Kit repository.

The public key is a deploy key which has been added to the GitHub repo for push access.
It has been encrypted using a key stored in the DEPLOY_KEY environment
variable, which is itself encrypted using `travis encrypt`.

The private key is encrypted using `travis encrypt-file` and then committed to this repo.
The deploy key is decrypted in create-release.sh.

The decrypt commands are in `.travis.yml`.
To update the key:

To regenerate a key:
1. Generate a new keypair using ssh-keygen

```
ssh-keygen -b 4096 -f .travis/prototype-kit-deploy-key
```

```
ssh-keygen -b 4096 -f .travis/govuk_prototype_kit # Make a new keypair
travis encrypt-file .travis/govuk_prototype_kit # Encrypt the private key
mv govuk_prototype_kit.enc .travis/ # Move the private key to the right place
rm .travis/govuk_prototype_kit # Remove the unencrypted private key
```
2. Add the *public* key as a new [deploy key], with write access to the
repository

```
cat .travis/prototype-kit-deploy-key.pub
```

2. Generate a new random string which we can use as an encryption key

3. Encrypt the private key using ssh-keygen

```
openssl aes-256-cbc -k [encryption key here] \
-in prototype-kit-deploy-key \
-out prototype-kit-deploy-key.enc
```

4. Remove the unencrypted private key and the public key

5. Encrypt the private key using the encryption key

```
travis encrypt DEPLOY_KEY=[encryption key]
```

6. Add the encrypted variable to the environment variables for the deploy job
in .travis.yml


[deploy key]: https://github.com/alphagov/govuk-prototype-kit/settings/keys
Binary file removed .travis/govuk_prototype_kit.enc
Binary file not shown.
1 change: 0 additions & 1 deletion .travis/govuk_prototype_kit.pub

This file was deleted.

Binary file added .travis/prototype-kit-deploy-key.enc
Binary file not shown.
78 changes: 78 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,81 @@
# 8.7.0

Features:
- [#613 Update to GOV.UK Frontend version 2.7.0 and adds experimental extensions feature](https://github.com/alphagov/govuk-prototype-kit/pull/613) (See GOV.UK Frontend 2.7.0 [release notes](https://github.com/alphagov/govuk-frontend/releases/tag/v2.7.0)). Big thanks @matcarey (https://github.com/matcarey)
As this is an **experimental** feature it should be used at your own risk, and is likely to change. Please contact us if you're interested in trying it out.

- [#687 Update docs and package.json to Node 10 LTS](https://github.com/alphagov/govuk-prototype-kit/pull/687)

- [#683 add guidance for CSS, JavaScript and images](https://github.com/alphagov/govuk-prototype-kit/pull/683)

# 8.6.0

Features:
- [#680 Update to GOV.UK Frontend version 2.6.0](https://github.com/alphagov/govuk-prototype-kit/pull/680) (See GOV.UK Frontend 2.6.0 [release notes](https://github.com/alphagov/govuk-frontend/releases/tag/v2.6.0))

# 8.5.0

Features:
- [#672 Replace ‘check answers’ pattern with updated code](https://github.com/alphagov/govuk-prototype-kit/pull/672)
- [#671 Update to GOV.UK Frontend version 2.5.0](https://github.com/alphagov/govuk-prototype-kit/pull/671)
Allows use of new components Accordion and Summary List

Fixes:

- [#667 Add acorn dependency to fix npm warning](https://github.com/alphagov/govuk-prototype-kit/pull/667)
- [#647 Fix link context in step-by-step templates](https://github.com/alphagov/govuk-prototype-kit/pull/647)

Internal:

- [#663 update Standard to 12.0.1](https://github.com/alphagov/govuk-prototype-kit/pull/663)
- [#640 Replace Mocha with Jest](https://github.com/alphagov/govuk-prototype-kit/pull/640)
- [#659 Upgrade kit to use Gulp 4](https://github.com/alphagov/govuk-prototype-kit/pull/659)
- [#664 Remove deprecated gulp-util](https://github.com/alphagov/govuk-prototype-kit/pull/664)

# 8.4.0

New features:

- [#642 Update GOV.UK Frontend to v2.4.0](https://github.com/alphagov/govuk-prototype-kit/pull/642)

Bug fixes:

- [#634 Avoid double-nested buttons in step-by-step navigation](https://github.com/alphagov/govuk-prototype-kit/pull/634)

- [#638 Make unbranded template available for use in app/views](https://github.com/alphagov/govuk-prototype-kit/pull/638)

# 8.3.0

New features:

- [#628 Update GOV.UK Frontend to v2.3.0](https://github.com/alphagov/govuk-prototype-kit/pull/628)

- [#574 Add Notify integration guidance](https://github.com/alphagov/govuk-prototype-kit/pull/574)

- [Add npm install reminder when prototype crashes](https://github.com/alphagov/govuk-prototype-kit/pull/598)

- [#539 Add step by step navigation](https://github.com/alphagov/govuk-prototype-kit/pull/539)

# 8.2.0

New Features:

- [#609 Update GOV.UK Frontend to v2.2.0](https://github.com/alphagov/govuk-prototype-kit/pull/609)

Also includes a new character-count component

Bug fixes:

- [#605 Set stylesheet media to "all" to allow print styles](https://github.com/alphagov/govuk-prototype-kit/pull/605)

- [#608 Clearing session data now uses a POST request rather than a destructive GET request](https://github.com/alphagov/govuk-prototype-kit/pull/608)

# 8.1.0

New features:

- [#600 Update GOV.UK Frontend to v2.1.0](https://github.com/alphagov/govuk-prototype-kit/pull/600)

# 8.0.0

Breaking changes:
Expand Down
50 changes: 39 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
We really like contributions and bug reports, in fact the project wouldn't have got to this stage without them.
We do have a few guidelines to bear in mind.

## Community
## Contributing

We have two Slack channels for the Prototype Kit. You'll need a government email address to join them.
If you’ve got an idea or suggestion you can:

* [Slack channel for users of the Prototype Kit](https://ukgovernmentdigital.slack.com/messages/prototype-kit/)
* [Slack channel for developers of the Prototype Kit](https://ukgovernmentdigital.slack.com/messages/prototype-kit-dev/)
* email [govuk-design-system-support@digital.cabinet-office.gov.uk](mailto:govuk-design-system-support@digital.cabinet-office.gov.uk)
* [get in touch on developer Slack channel](https://ukgovernmentdigital.slack.com/messages/prototype-kit-dev)([open in app](slack://channel?team=T04V6EBTR&id=C0E1063DW))
* [create a GitHub issue](https://github.com/alphagov/govuk-prototype-kit/issues)

## Raising bugs

Expand Down Expand Up @@ -51,16 +52,43 @@ which describes how we prefer git history and commit messages to read.

## To release a new version

Checkout a new branch for the release.
1. Checkout master and pull latest changes.

Update [CHANGELOG.md](https://github.com/alphagov/govuk-prototype-kit/blob/master/CHANGELOG.md) to summarise the changes made since the last release.
2. Decide on a new version number. Do this by looking at the [current "Unreleased" CHANGELOG](../../CHANGELOG.md) changes and updating the previous release number depending on the kind of entries:

To see the commits to be summarised in the changelog since the last release, [compare the latest-release branch with master](https://github.com/alphagov/govuk-prototype-kit/compare/latest-release...master).
When you fix a bug and your code stays backwards compatible, increase the patch component:

Propose a new version number in [VERSION.txt](https://github.com/alphagov/govuk-prototype-kit/blob/master/VERSION.txt) and update line 4 in [package.json](https://github.com/alphagov/govuk-prototype-kit/blob/master/package.json#L4) with the new version number.
```
v0.0.3 // Before bugfix
v0.0.4 // After bugfix
```

Open a new pull request with a single commit including the above changes.
When you add functionality and your code stays backwards compatible, increase the minor component and reset the patch component to zero:

[Here is an example for v6.1.0](https://github.com/alphagov/govuk-prototype-kit/commit/53e36d79a994ce3649b53f4008370cd75068c27c).
```
v0.2.4 // Before addition of new functionality
v0.3.0 // After addition of new functionality
```

Once merged into master a new version will be built.
When you implement changes and your code becomes backwards incompatible, increase the major component and reset the minor and patch components to zero:

```
v7.3.5 // Before implementing backwards incompatible changes
v8.0.0 // After implementing backwards incompatible changes
```

(From [jvandemo.com](https://www.jvandemo.com/a-simple-guide-to-semantic-versioning/))

3. Checkout a new branch called release-[new version number].

4. Update the version number in [VERSION.txt](https://github.com/alphagov/govuk-prototype-kit/blob/master/VERSION.txt) and update "version" in [package.json](https://github.com/alphagov/govuk-prototype-kit/blob/master/package.json#L4).

5. Commit your changes and open a new pull request on GitHub - copy the relevant Changelog section into the description.

6. Once someone has merged the pull request, [draft a new release on GitHub](https://github.com/alphagov/govuk-prototype-kit/releases)

7. In Tag version and Release title, put v[version number], for example `v7.0.0`.

8. In description, paste the relevant section from the Changelog.

9. Click 'Publish release'.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: node ./node_modules/gulp/bin/gulp generate-assets && node server.js
web: node ./node_modules/gulp/bin/gulp generate-assets && node listen-on-port.js
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ You must protect user privacy at all times, even when using prototypes. Prototyp
- [Installation guide for new users (non technical)](https://govuk-prototype-kit.herokuapp.com/docs/install/introduction)
- [Installation guide for developers (technical)](https://govuk-prototype-kit.herokuapp.com/docs/install/developer-install-instructions)

## Community
## Support

We have two Slack channels for the Prototype Kit. You'll need a government email address to join them.
The GOV.UK Prototype Kit is maintained by the Government Digital Service. If you’ve got a question or need support you can:

* [Slack channel for users of the Prototype Kit](https://ukgovernmentdigital.slack.com/messages/prototype-kit/)
* [Slack channel for developers of the Prototype Kit](https://ukgovernmentdigital.slack.com/messages/prototype-kit-dev/)
* email [govuk-design-system-support@digital.cabinet-office.gov.uk](mailto:govuk-design-system-support@digital.cabinet-office.gov.uk)
* [get in touch on Slack](https://ukgovernmentdigital.slack.com/messages/prototype-kit)([open in app](slack://channel?team=T04V6EBTR&id=C0647LW4R))
* [view known issues on GitHub](https://github.com/alphagov/govuk-prototype-kit/issues)

## Contributing

If you’ve got an idea or suggestion you can:

* [get in touch on the developer Slack channel](https://ukgovernmentdigital.slack.com/messages/prototype-kit-dev)([open in app](slack://channel?team=T04V6EBTR&id=C0E1063DW))
* [create a GitHub issue](https://github.com/alphagov/govuk-prototype-kit/issues)
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0.0
8.7.0
27 changes: 27 additions & 0 deletions __tests__/spec/force-https-redirect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* eslint-env jest */
const request = require('supertest')
let app

/* Setup Environment Variables before setting App */
process.env.NODE_ENV = 'production'
process.env.USE_HTTPS = 'true'
app = require('../../server.js')

describe('The Prototype Kit - force HTTPS redirect functionality', () => {
describe('should in a production environment', () => {
it('have HTTP header "location" field that begins with https', async () => {
const response = await request(app).get('/docs')
expect(response.header['location'].startsWith('https://')).toBeTruthy()
})

it('redirect to the same HTTPS url', async () => {
const response = await request(app).get('/docs')
expect(response.header['location'].endsWith('/docs')).toBeTruthy()
})

it('have HTTP header "status" field that indicates a redirect', async () => {
const response = await request(app).get('/docs')
expect(response.statusCode).toBe(302)
})
})
})
Loading