notifications-ruby-client 5.3.0 → 5.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dockerignore +1 -0
- data/CHANGELOG.md +6 -0
- data/CONTRIBUTING.md +26 -21
- data/DOCUMENTATION.md +390 -291
- data/Dockerfile +3 -0
- data/Makefile +11 -44
- data/lib/notifications/client/helper_methods.rb +7 -2
- data/lib/notifications/client/version.rb +1 -1
- data/scripts/run_with_docker.sh +22 -0
- metadata +5 -4
- data/bin/generate_docker_env.sh +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6827c0db7ff51cabb102005e382e49fb225344a2856b11f85dc4edc799b9d9a9
|
4
|
+
data.tar.gz: 222318524a806a4ce707cdc3fff989b6d91f28fffa106fe9235584d14b1cd2f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef8a9234c0e8a4730d9ce2561d35261882903090bbaeaaad29540b36a1622c77ff0953d395ed0976093e962cae92cd304f2ace1579ce41d5b3e70553528ee1d5
|
7
|
+
data.tar.gz: 44f09776241452471cacea7cec73bfa4ab158ed24f5a4a631bcdf747923cd18f66f34b0e8742dcc036dd2f4dd646dbc3a095e24736cac10452d4dc555105b4f9
|
data/.dockerignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
environment*.sh
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 5.4.0
|
2
|
+
|
3
|
+
* Add support for new security features when sending a file by email:
|
4
|
+
* `confirm_email_before_download` can be set to `true` to require the user to enter their email address before accessing the file.
|
5
|
+
* `retention_period` can be set to `<1-78> weeks` to set how long the file should be made available.
|
6
|
+
|
1
7
|
## 5.3.0
|
2
8
|
|
3
9
|
* Added `letter_contact_block` as a new attribute of the `Notifications::Client::Template` class. This affects the responses from the `get_template_by_id`, `get_template_version` and `get_all_templates` methods.
|
data/CONTRIBUTING.md
CHANGED
@@ -2,43 +2,48 @@
|
|
2
2
|
|
3
3
|
Pull requests are welcome.
|
4
4
|
|
5
|
+
## Setting Up
|
6
|
+
|
7
|
+
### Docker container
|
8
|
+
|
9
|
+
This app uses dependencies that are difficult to install locally. In order to make local development easy, we run app commands through a Docker container. Run the following to set this up:
|
10
|
+
|
11
|
+
```shell
|
12
|
+
make bootstrap-with-docker
|
13
|
+
```
|
14
|
+
|
15
|
+
Because the container caches things like packages, you will need to run this again if you change the package versions.
|
16
|
+
|
17
|
+
### `environment.sh`
|
18
|
+
|
19
|
+
In the root directory of the repo, run:
|
20
|
+
|
21
|
+
```
|
22
|
+
notify-pass credentials/client-integration-tests > environment.sh
|
23
|
+
```
|
24
|
+
|
25
|
+
Unless you're part of the GOV.UK Notify team, you won't be able to run this command or the Integration Tests. However, the file still needs to exist - run `touch environment.sh` instead.
|
26
|
+
|
5
27
|
## Tests
|
6
28
|
|
7
29
|
There are unit and integration tests that can be run to test functionality of the client.
|
8
30
|
|
9
|
-
|
31
|
+
### Unit Tests
|
10
32
|
|
11
33
|
To run the unit tests:
|
12
34
|
|
13
35
|
```
|
14
|
-
make test
|
36
|
+
make test-with-docker
|
15
37
|
```
|
16
38
|
|
17
|
-
|
18
|
-
|
19
|
-
Before running the integration tests, please ensure that the environment variables are set up.
|
20
|
-
|
21
|
-
```sh
|
22
|
-
export NOTIFY_API_URL="https://example.notify-api.url"
|
23
|
-
export API_KEY="example_API_test_key"
|
24
|
-
export FUNCTIONAL_TEST_NUMBER="valid mobile number"
|
25
|
-
export FUNCTIONAL_TEST_EMAIL="valid email address"
|
26
|
-
export EMAIL_TEMPLATE_ID="valid email_template_id"
|
27
|
-
export SMS_TEMPLATE_ID="valid sms_template_id"
|
28
|
-
export LETTER_TEMPLATE_ID="valid letter_template_id"
|
29
|
-
export EMAIL_REPLY_TO_ID="valid email reply to id"
|
30
|
-
export SMS_SENDER_ID="valid sms_sender_id - to test sending to a receiving number, so needs to be a valid number"
|
31
|
-
export API_SENDING_KEY="API_team_key for sending a SMS to a receiving number"
|
32
|
-
export INBOUND_SMS_QUERY_KEY="API_test_key to get received text messages"
|
33
|
-
```
|
39
|
+
### Integration Tests
|
34
40
|
|
35
41
|
To run the integration tests:
|
36
42
|
|
37
43
|
```
|
38
|
-
make integration-test
|
44
|
+
make integration-test-with-docker
|
39
45
|
```
|
40
46
|
|
41
|
-
|
42
47
|
## Releasing (for notify developers only)
|
43
48
|
|
44
49
|
To release manually, run `make publish-to-rubygems`. You will need to set the environment variable `GEM_HOST_API_KEY`, which can be found in the credentials repo under `credentials/rubygems/api_key`.
|