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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b251f2b6694651096a5ae0ca961b6011625f7de5fd454760f6806457c745d813
4
- data.tar.gz: 1e62307f82e95f9eb3017f06f8a5c89974992625aa9fabde4bd25a4aed2455d3
3
+ metadata.gz: 9c65b6c5302bf1af0c3871c27e97fb8ddeb2a66cf32dc659996213caa35199be
4
+ data.tar.gz: 1c9e86ac71bef46c71c2ae06702fec2dfb5d09486b234eda81ffc15cb2f73192
5
5
  SHA512:
6
- metadata.gz: df90f8ca05da0c71e34d2eb8427301d128a13f3049f6628039d2a3df08421843073cef6382b2b553e7090bada1f112782e997453a03d9af0b713c302bd9b41e2
7
- data.tar.gz: 0eed6fcb9ab37f11ea39270b28ada5ceb772d944b2a5bed7448ddc2748a8ad6b8833c6ff1400979f16590237dfdc4d3cef5efe4de3c6b663cbde5aca30ccce12
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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- service_downtime_simulator (0.1.0)
4
+ service_downtime_simulator (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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['FAILURE_SIMULATION_MODE'],
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`)
@@ -1,5 +1,5 @@
1
1
  module ServiceDowntimeSimulator
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
4
4
 
5
5
  require_relative 'service_downtime_simulator/config'
@@ -20,7 +20,7 @@ module ServiceDowntimeSimulator
20
20
  end
21
21
 
22
22
  def body
23
- "Simulated Response (#{identifier})"
23
+ ["Simulated Response (#{identifier})"]
24
24
  end
25
25
 
26
26
  def status
@@ -8,7 +8,7 @@ module ServiceDowntimeSimulator
8
8
  end
9
9
 
10
10
  def body
11
- cheeseboard.shuffle.join(' ')
11
+ [cheeseboard.shuffle.join(' ')]
12
12
  end
13
13
 
14
14
  def cheeseboard
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.0
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"