@@ -27,103 +27,88 @@ We have also added visual graphics to better aid understanding:
27
27
28
28
- [ docs/results] ( docs/results )
29
29
30
- We have also gather together all the documents and information we have gone through in one ticket:
31
-
32
- - https://trello.com/c/kT50EDZ7
33
-
34
- If for some reason the ticket is not available, please refer to the following:
30
+ Please refer to the following for more information:
35
31
36
32
- https://www.gov.uk/guidance/rehabilitation-periods
37
- - https://hub.unlock.org.uk/knowledgebase /detailedguideroa/
33
+ - https://hub.unlock.org.uk/advice /detailedguideroa/
38
34
- https://docs.google.com/spreadsheets/d/1ZSCk-wgMfIc22GQahKH_ys4u-E9GWIn6dQ7mm5t1RFI/edit#gid=2019860123
39
35
40
36
It is important to understand how convictions work, as this is the main reason for the existence of this service.
41
37
42
- ## Docker
43
-
44
- The application can be run inside a docker container. This will take care of the ruby environment, postgres database,
45
- and any other dependency for you, without having to configure anything in your machine.
46
-
47
- * ` docker-compose up `
48
-
49
- The application will be run in "production" mode, so will be as accurate as possible to a real production environment.
50
-
51
- Please note, in production environments this is done in a slightly different way as we don't use docker-compose in those
52
- environments (kubernetes cluster). But the general idea is the same.
53
-
54
- ## Getting Started
55
-
56
- You will need to install [ Homebrew] ( https://brew.sh ) , to enable the ` brew ` command.
57
-
58
- * Copy ` .env.example ` to ` .env ` and replace with suitable values.
38
+ ## Development
59
39
60
- * ` bundle install `
61
- * ` bundle exec rails db:setup `
62
- * ` bundle exec rails db:migrate `
63
- * ` bundle exec rails server `
40
+ ### Working on the Code
64
41
65
- ### GOV.UK Frontend (styles, javascript and other assets)
42
+ Work should be based off of, and PRed to, the main branch. We use the GitHub
43
+ PR approval process so once your PR is ready you'll need to have one person
44
+ approve it, and the CI tests passing, before it can be merged.
66
45
67
- * ` brew install yarn ` # if you don't have it already
68
- * ` yarn ` # this will install the dependencies
69
46
70
- ### For running the tests:
47
+ ### Basic Setup
71
48
72
- * Copy ` .env.test.example ` to ` .env.test ` and replace with suitable values if you expect to run the tests
73
- * ` RAILS_ENV=test bundle exec rails db:setup `
74
- * ` RAILS_ENV=test bundle exec rails db:migrate `
49
+ #### Cloning This Repository
75
50
76
- You can then run all the code linters and tests with:
51
+ Clone this repository then ` cd ` into the new directory
77
52
78
- * ` RAILS_ENV=test bundle exec rake `
79
- or
80
- * ` RAILS_ENV=test bundle exec rake test:all_the_things `
53
+ ```
54
+ $ git clone git@github.com:ministryofjustice/disclosure-checker.git
55
+ $ cd disclosure-checker
56
+ ```
81
57
82
- Or you can run specific tests as follows (refer to * lib/tasks/all_tests.rake * for the complete list):
58
+ ### Installing the app for development
83
59
84
- * ` RAILS_ENV=test bundle exec rake spec `
85
- * ` RAILS_ENV=test bundle exec rake brakeman `
60
+ #### Latest Version of Ruby
86
61
87
- ## Cucumber features
62
+ If you don't have ` rbenv ` already installed, install it as follows:
63
+ ```
64
+ $ brew install rbenv ruby-build
65
+ $ rbenv init
66
+ ```
88
67
89
- ChromeDriver is needed for the integration tests. It can be installed on Mac using Homebrew: ` brew cask install chromedriver `
68
+ Follow the instructions printed out from the ` rbenv init ` command and update your ` ~/.bash_profile ` or equivalent file accordingly, then start a new terminal and navigate to the repo directory.
90
69
91
- The features can be run manually (these are not part of the default rake task) in any of these forms :
70
+ Use ` rbenv ` to install the latest version of ruby as defined in ` .ruby-version ` (make sure you are in the repo path) :
92
71
93
- * ` bundle exec cucumber features `
94
- * ` bundle exec cucumber features/caution.feature `
95
- * ` bundle exec cucumber features/caution.feature -t @happy_path `
72
+ `` `
73
+ $ rbenv install
74
+ `` `
96
75
97
- Any of the files in the [ features ] ( features ) directory can be run individually.
76
+ #### Dependencies
98
77
99
- By default cucumber will start a local server on a random port, run features against that server, and kill the server once the features have finished.
78
+ Node.js:
100
79
101
- If you want to show the browser (useful to debug issues) prefix the commands like this:
80
+ ```
81
+ $ brew install node
82
+ ```
102
83
103
- * ` SHOW_BROWSER=1 bundle exec cucumber features/caution.feature `
84
+ Yarn
104
85
105
- ## K8s cluster staging environment
86
+ ```
87
+ $ brew install yarn
88
+ ```
106
89
107
- There is a staging environment running on [ this url ] [ k8s-staging ]
90
+ Postgresql
108
91
109
- The staging env uses http basic auth to restrict access. The username and
110
- password should be available from the MoJ Rattic server, in the Family Justice group.
92
+ ```
93
+ $ brew install postgresql
94
+ ```
111
95
112
- This environment should be used for any test or demo purposes, user research, etc.
113
- Do not use production for tests as this will have an impact on metrics and will trigger real emails
96
+ #### Setup
114
97
115
- There is a [ deploy repo] [ deploy-repo ] for this staging environment.
116
- It contains the k8s configuration files and also the required ENV variables.
98
+ Use the following commands to install gems and javascript packages then create the database
117
99
118
- ## Continuous integration and deployment
100
+ ```
101
+ $ bin/setup
102
+ $ bin/yarn install
103
+ ```
119
104
120
- GitHub actions are used for CI and CD and you can find the configuration in ` .github/workflows/test-build-deploy.yml `
105
+ #### Running locally:
121
106
122
- After a successful merge to ` main ` , a docker image will be created and pushed to an ECR repository.
123
- It will also trigger an automatic deploy to [ staging] [ k8s-staging ] .
107
+ ```
108
+ $ bin/rails server
109
+ ```
124
110
125
- For more details, refer to the [ deploy repo ] [ deploy-repo ] .
111
+ The site will be accessible at http://localhost:3000 .
126
112
127
- [ c100-application ] : https://github.com/ministryofjustice/c100-application
128
- [ deploy-repo ] : https://github.com/ministryofjustice/disclosure-checker-deploy
129
- [ k8s-staging ] : https://disclosure-checker-staging.apps.live.cloud-platform.service.justice.gov.uk
113
+ ## Exceptions
114
+ Any exceptions raised in any deployed environment will be sent to [ Sentry] ( https://ministryofjustice.sentry.io/projects/disclosure-checker ) .
0 commit comments