service_downtime_simulator 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE.md +1 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +1 -0
- data/Gemfile.lock +1 -1
- data/README.md +26 -5
- data/lib/service_downtime_simulator.rb +1 -1
- data/lib/service_downtime_simulator/modes/base.rb +1 -1
- data/lib/service_downtime_simulator/modes/successful_but_gibberish.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c65b6c5302bf1af0c3871c27e97fb8ddeb2a66cf32dc659996213caa35199be
|
4
|
+
data.tar.gz: 1c9e86ac71bef46c71c2ae06702fec2dfb5d09486b234eda81ffc15cb2f73192
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f56e4ba94599d97d336831652ed6e77f0733bdfe5eeee5b01f9b8d91330edfa96ab72f310a35395a9ca2c2c36df65d72d837974d79d52ea581db3f6d6ab7af48
|
7
|
+
data.tar.gz: 94864f3a50b617d687b9e6fec149b311410961df8a40435e357e424850e3c530ab7eb3121ee3c279edb84de250e2f0a9bf82faa7830afbd6ebd5f8ffabf291b7
|
@@ -0,0 +1 @@
|
|
1
|
+
> :rotating_light: If you work at Deliveroo and you're contributing to this project, please bear in mind that this repository is public.
|
@@ -0,0 +1 @@
|
|
1
|
+
> :rotating_light: If you work at Deliveroo and you're contributing to this project, please bear in mind that this repository is public.
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
[![CircleCI](https://circleci.com/gh/deliveroo/service_downtime_simulator/tree/master.svg?style=svg&circle-token=d66bc2c0246da5cdf4eeaeb6c9f7b10bcd74bb7b)](https://circleci.com/gh/deliveroo/service_downtime_simulator/tree/master)
|
4
4
|
|
5
|
+
---
|
6
|
+
|
7
|
+
:rotating_light: If you work at Deliveroo and you're contributing to this project, please bear in mind that this repository is public.
|
8
|
+
|
9
|
+
---
|
10
|
+
|
5
11
|
This is a piece of Rack middleware that simulates failures you would want to tolerate in upstream services.
|
6
12
|
|
7
13
|
## Installation
|
@@ -17,10 +23,6 @@ config.middleware.use(
|
|
17
23
|
)
|
18
24
|
```
|
19
25
|
|
20
|
-
### Other Rack-based applications
|
21
|
-
|
22
|
-
Instructions TBC.
|
23
|
-
|
24
26
|
## Configuration
|
25
27
|
|
26
28
|
The middleware takes a `config` argument in the form of a hash. Said hash should have the following shape:
|
@@ -81,9 +83,28 @@ config.middleware.use(
|
|
81
83
|
ServiceDowntimeSimulator::Middleware,
|
82
84
|
{
|
83
85
|
enabled: ENV['FAILURE_SIMULATION_ENABLED'] == 'I_UNDERSTAND_THE_CONSEQUENCES_OF_THIS',
|
84
|
-
mode: ENV
|
86
|
+
mode: ENV.fetch('FAILURE_SIMULATION_MODE', '').to_sym,
|
85
87
|
excluded_paths: ['/health'],
|
86
88
|
logger: Rails.logger
|
87
89
|
}
|
88
90
|
)
|
89
91
|
```
|
92
|
+
|
93
|
+
## Development
|
94
|
+
|
95
|
+
- Clone this repository
|
96
|
+
- Ensure you have Ruby 2.5.1 installed
|
97
|
+
- `make install` to get the dependencies
|
98
|
+
- `make test` to run the tests
|
99
|
+
- `make lint` to lint your code
|
100
|
+
- ???
|
101
|
+
- Profit
|
102
|
+
|
103
|
+
## Gem Publishing
|
104
|
+
|
105
|
+
TBC, but very manual and involved flow is:
|
106
|
+
|
107
|
+
- Update version in `lib/service_downtime_simulator.rb` and commit
|
108
|
+
- Tag version via `git tag XXX`
|
109
|
+
- Push (`git push origin head --tags`)
|
110
|
+
- Release to Rubygems (`make publish`)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: service_downtime_simulator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh McMillan
|
@@ -60,6 +60,8 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".circleci/config.yml"
|
63
|
+
- ".github/ISSUE_TEMPLATE.md"
|
64
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
63
65
|
- ".gitignore"
|
64
66
|
- ".rspec"
|
65
67
|
- ".rubocop.yml"
|