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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05edf07734c3e18175c4b7f10d220b4443e8b23f
4
- data.tar.gz: fd09c771c91cfb18b2c1cc31ec0566f4585eee19
3
+ metadata.gz: 5dcc5b196608b3a05692de3dbd1933cd5941fea2
4
+ data.tar.gz: c6464bba5c6cc5acefc6cc95efeb027b309ebebb
5
5
  SHA512:
6
- metadata.gz: 9bbcfae06c1983dddf2bf86a037207bd93dc59ec86ba9772320a8e90e1d16bf6b034b848cf23292f755eb6e50557a99a0c6952d3099d5070386838db3904e404
7
- data.tar.gz: d7c935d825c03932d8cea692b4f9fefd8b971433283b4e4fe480143d3e4f043ae5260c4240a29369add01af2e62110d5fbef0062400dcca4b5b3daf88f366e14
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 (for Sidekiq workers)](#hirefire-for-sidekiq-workers)
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 (for Sidekiq workers)
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 you need to set the following environment variables:
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
 
@@ -33,7 +33,7 @@ module RooOnRails
33
33
  end
34
34
 
35
35
  def fix
36
- context.papertrail.client.update_system(name: app_name)
36
+ context.papertrail.client.update_system(system_id, app_name)
37
37
  end
38
38
 
39
39
  private
@@ -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
- client_keys && client_keys.include?(client_key)
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)
@@ -21,7 +21,7 @@ module RooOnRails
21
21
  end
22
22
 
23
23
  def update_system(id, data)
24
- _conn.put('systems/%s.json' % id, system: data).body
24
+ _conn.put('systems/%s.json' % id, system: { name: data }).body
25
25
  end
26
26
 
27
27
  # private
@@ -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
@@ -1,3 +1,3 @@
1
1
  module RooOnRails
2
- VERSION = '1.12.0'.freeze
2
+ VERSION = '1.13.0'.freeze
3
3
  end
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.12.0
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-09-27 00:00:00.000000000 Z
11
+ date: 2017-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv-rails