roo_on_rails 1.12.0 → 1.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +26 -3
- data/lib/roo_on_rails/checks/papertrail/system_named.rb +1 -1
- data/lib/roo_on_rails/concerns/require_api_key.rb +3 -2
- data/lib/roo_on_rails/papertrail_client.rb +1 -1
- data/lib/roo_on_rails/railties/routemaster.rb +5 -0
- data/lib/roo_on_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dcc5b196608b3a05692de3dbd1933cd5941fea2
|
4
|
+
data.tar.gz: c6464bba5c6cc5acefc6cc95efeb027b309ebebb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bcb66d9da64e40f1cc1862602b1bbed89c052c3e5d6f1a303e4cb1b61aae635f572c0e83d9a72c8d5d9e8683afff17c031ca6439f821e3223706cf8bf590c3b
|
7
|
+
data.tar.gz: 8b497f06d565b9148d3ed0798b5d87a66a14f764b62fc9d2ae383516ffdfea6398df5b1d9455d7b56769a3b2ec7f0419bffd2962b26253ff50a2dd6e50cb843c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# v1.12.0 (2017-10-12)
|
2
|
+
|
3
|
+
Features:
|
4
|
+
|
5
|
+
- Provide `ROUTEMASTER_VERIFY_SSL` environment variable to disable
|
6
|
+
routemaster-client's SSL verification. (#68)
|
7
|
+
|
8
|
+
Bug fix:
|
9
|
+
|
10
|
+
- Fixes issue with `fix` command of the service setup scripts for papertrail (#66)
|
11
|
+
- Fixes issue with API authentication concern where service name was incorrect (#71)
|
12
|
+
|
1
13
|
# v1.12.0 (2017-09-27)
|
2
14
|
|
3
15
|
Features (library):
|
data/README.md
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
- [Rack middleware](#rack-middleware)
|
22
22
|
- [Database configuration](#database-configuration)
|
23
23
|
- [Sidekiq](#sidekiq)
|
24
|
-
- [HireFire
|
24
|
+
- [HireFire](#hirefire)
|
25
25
|
- [Logging](#logging)
|
26
26
|
- [Google OAuth authentication](#google-oauth-authentication)
|
27
27
|
- [Datadog Integration](#datadog-integration)
|
@@ -128,7 +128,29 @@ NB. If you are migrating to SLA-based queue names, do not set `SIDEKIQ_ENABLED`
|
|
128
128
|
to `true` before your old queues have finished processing (this will prevent
|
129
129
|
Sidekiq from seeing the old queues at all).
|
130
130
|
|
131
|
-
### HireFire
|
131
|
+
### HireFire
|
132
|
+
|
133
|
+
#### For Web Dynos
|
134
|
+
|
135
|
+
Web dynos can be autoscaled by HireFire _only_ if it has been configured to use the `Web.Logplex.Load` source and the Heroku runtime metrics lab feature has been enabled:
|
136
|
+
|
137
|
+
```bash
|
138
|
+
$ heroku labs:enable log-runtime-metrics -a your-service-name-here
|
139
|
+
```
|
140
|
+
|
141
|
+
You will also need a log drain for HireFire, but the RooOnRails helper below should configure this for you. You can check with
|
142
|
+
|
143
|
+
```bash
|
144
|
+
$ heroku drains | grep hirefire
|
145
|
+
https://logdrain.hirefire.io (d.00000000-0000-0000-0000-000000000000)
|
146
|
+
|
147
|
+
# No drain? Add with:
|
148
|
+
$ heroku drains:add -a your-service-name-here https://logdrain.hirefire.io
|
149
|
+
```
|
150
|
+
|
151
|
+
([HireFire docs for set up](https://help.hirefire.io/guides/logplex/load-logplex))
|
152
|
+
|
153
|
+
#### For Sidekiq Workers
|
132
154
|
|
133
155
|
When `HIREFIRE_TOKEN` is set an endpoint will be mounted at `/hirefire` that
|
134
156
|
reports the required worker count as a function of queue latency. By default we
|
@@ -249,10 +271,11 @@ These extra required variables are automatically set by Heroku:
|
|
249
271
|
|
250
272
|
### Routemaster Client
|
251
273
|
|
252
|
-
When `ROUTEMASTER_ENABLED` is set to `true` we attempt to configure [`routemaster-client`](https://github.com/deliveroo/routemaster-client) on your application. In order for this to happen
|
274
|
+
When `ROUTEMASTER_ENABLED` is set to `true` we attempt to configure [`routemaster-client`](https://github.com/deliveroo/routemaster-client) on your application. In order for this to happen, set the following environment variables:
|
253
275
|
|
254
276
|
* `ROUTEMASTER_URL` – the full URL of your Routemaster application (mandatory)
|
255
277
|
* `ROUTEMASTER_UUID` – the UUID of your application, e.g. `logistics-dashboard` (mandatory)
|
278
|
+
* `ROUTEMASTER_VERIFY_SSL` – set to false if your Routemaster application is not served with a valid cert. (optional)
|
256
279
|
|
257
280
|
If you then want to enable the publishing of events onto the event bus, you need to set `ROUTEMASTER_PUBLISHING_ENABLED` to `true` and implement publishers as needed. An example of how to do this is detailed in [`README.routemaster_client.md`](README.routemaster_client.md).
|
258
281
|
|
@@ -86,7 +86,8 @@ module RooOnRails
|
|
86
86
|
return false if service_name == '' || client_key == ''
|
87
87
|
|
88
88
|
client_keys = @cache[normalize(service_name)]
|
89
|
-
|
89
|
+
return false unless client_keys
|
90
|
+
client_keys.include?(client_key)
|
90
91
|
end
|
91
92
|
|
92
93
|
private
|
@@ -96,7 +97,7 @@ module RooOnRails
|
|
96
97
|
end
|
97
98
|
|
98
99
|
def normalize(service_name)
|
99
|
-
service_name.upcase.gsub(/[A-Z0-9]+/, '_')
|
100
|
+
service_name.upcase.gsub(/[^A-Z0-9]+/, '_')
|
100
101
|
end
|
101
102
|
|
102
103
|
def parse_client_keys(str)
|
@@ -15,6 +15,7 @@ module RooOnRails
|
|
15
15
|
::Routemaster::Client.configure do |config|
|
16
16
|
config.url = routemaster_url
|
17
17
|
config.uuid = routemaster_uuid
|
18
|
+
config.verify_ssl = routemaster_verify_ssl
|
18
19
|
end
|
19
20
|
end
|
20
21
|
end
|
@@ -32,6 +33,10 @@ module RooOnRails
|
|
32
33
|
def routemaster_uuid
|
33
34
|
ENV.fetch('ROUTEMASTER_UUID')
|
34
35
|
end
|
36
|
+
|
37
|
+
def routemaster_verify_ssl
|
38
|
+
ENV.fetch('ROUTEMASTER_VERIFY_SSL', 'true') != 'false'
|
39
|
+
end
|
35
40
|
end
|
36
41
|
end
|
37
42
|
end
|
data/lib/roo_on_rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roo_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien Letessier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv-rails
|