notifications-ruby-client 5.3.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.dockerignore +1 -0
- data/CHANGELOG.md +11 -0
- data/CONTRIBUTING.md +26 -21
- data/DOCUMENTATION.md +398 -297
- data/Dockerfile +3 -0
- data/Makefile +11 -44
- data/README.md +2 -2
- data/lib/notifications/client/helper_methods.rb +8 -2
- data/lib/notifications/client/version.rb +1 -1
- data/notifications-ruby-client.gemspec +1 -1
- data/scripts/run_with_docker.sh +22 -0
- metadata +11 -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: 0b04d33af2550021b9eecec2c063c360f349715c33353be054d9e2f7e4463896
|
4
|
+
data.tar.gz: e4d0f5ece925c71a0ecfbc779bf27a94d29c8d7019b75b4b42955498ba58b2fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9158493f4a551508d9b4267fde147f345e0c0c47e5f46319bd92394b7a072d3b2c2543c9df841c0433685a86dd04eb1fb17fb5d6d18eede029ce11e6c798a65e
|
7
|
+
data.tar.gz: be9ea47296e25def1236762ab0d3e00d6e72a2e0548b94aaa81cf2770e8d2ac976cfb5b6df8223a7f5db56e57de7f9375c84561b31e9b9af928f5554a97e5720
|
data/.dockerignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
environment*.sh
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
## 6.0.0
|
2
|
+
|
3
|
+
* Removes the `is_csv` parameter from `prepare_upload`
|
4
|
+
* Adds a `filename` parameter to `prepare_upload` to set the filename of the document upon download. See the documentation for more information.
|
5
|
+
|
6
|
+
## 5.4.0
|
7
|
+
|
8
|
+
* Add support for new security features when sending a file by email:
|
9
|
+
* `confirm_email_before_download` can be set to `true` to require the user to enter their email address before accessing the file.
|
10
|
+
* `retention_period` can be set to `<1-78> weeks` to set how long the file should be made available.
|
11
|
+
|
1
12
|
## 5.3.0
|
2
13
|
|
3
14
|
* 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`.
|