orchestration 0.4.1 → 0.4.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7cd01f40026116b804917069fba7d1e5c44d8aeee5a544b45e0815fb62f69ed5
4
- data.tar.gz: cc69537b606cb64b5fa681af09f629cac90c7e2d4c2d98bcf173c3306b214588
3
+ metadata.gz: d589d50ab6d3d03c9822ba9b93ef34cf5ff8da72cf533fda977ff4636b02971f
4
+ data.tar.gz: fa76ff6d543d6b1b9163ae65eec399485afa6cd6c64e197075f63061cb9bc048
5
5
  SHA512:
6
- metadata.gz: 9ac9f6b9d04f74ed0cdea5e653296b300f9e1c04184340ede3dbb4a1e726ab4c32e2b3f6bc4e3bdddfc79315d2eaa8cb0ab1fe8877a3131f55179ca787268d86
7
- data.tar.gz: a66c75b212e0992130b1e289781d516fe5b4be7bd5176c1a9a91c86bf927a9853ee8da7ed26192ecbf307d6cb66aa16dd579b5dd370bdd8e4f598df1b4d7ec38
6
+ metadata.gz: c628f61477317a5d0f59a74f20edf79f7f2f30558afcb39cd4a31d545b41b142873f8346fdf1fc20012d1fd77a7ac02261a3e3657372f48ed390355f73c02842
7
+ data.tar.gz: 1bd874621d3b9bac7f06d771c8f1c77fbeaafb0646a073f39e08b2262d4e1db22bfa57b80ac3312c32cbb59381959e217e39c8a9789d82e61e82b2a230c6c417
data/.gitignore CHANGED
@@ -30,3 +30,5 @@ TODO
30
30
 
31
31
  docker/.build/
32
32
  docker/.context.tar
33
+
34
+ .DS_Store
data/README.md CHANGED
@@ -29,7 +29,7 @@ The below screenshot demonstrates _Orchestration_ being installed in a brand new
29
29
  Add _Orchestration_ to your Gemfile:
30
30
 
31
31
  ```ruby
32
- gem 'orchestration', '~> 0.4.0'
32
+ gem 'orchestration', '~> 0.4.2'
33
33
  ```
34
34
 
35
35
  Install:
@@ -237,9 +237,9 @@ See related documentation:
237
237
 
238
238
  | Variable | Meaning | Default Value |
239
239
  |-|-|-|
240
- | `WEB_HOST` | Host to reach application (relevant to application container) | `localhost` |
241
- | `WEB_PORT` | Port to reach application (relevant to application container) | `8080` |
242
- | `WEB_HEALTHCHECK_PATH` | Path of expected successful response | `/` |
240
+ | `WEB_HOST` | Host to reach application (from inside application container) | `localhost` |
241
+ | `WEB_PORT` | Port to reach application (from inside application container) | `8080` |
242
+ | `WEB_HEALTHCHECK_PATH` | Path expected to return a successful response | `/` |
243
243
  | `WEB_HEALTHCHECK_READ_TIMEOUT` | Number of seconds to wait for data before failing healthcheck | `10` |
244
244
  | `WEB_HEALTHCHECK_OPEN_TIMEOUT` | Number of seconds to wait for connection before failing healthcheck | `10` |
245
245
  | `WEB_HEALTHCHECK_SUCCESS_CODES` | Comma-separated list of HTTP status codes that will be deemed a success | `200,202,204` |
@@ -271,14 +271,27 @@ An [entrypoint](https://docs.docker.com/engine/reference/builder/#entrypoint) sc
271
271
  <a name="rabbitmq-configuration"></a>
272
272
  ## RabbitMQ Configuration
273
273
 
274
- The [Bunny](https://github.com/ruby-amqp/bunny) _RabbitMQ_ gem does not recognise `config/rabbitmq.yml`. If your application uses _RabbitMQ_ then you must manually update your code to reference this file, e.g.:
274
+ The [Bunny](https://github.com/ruby-amqp/bunny) _RabbitMQ_ gem does not recognise `config/rabbitmq.yml` or `RABBITMQ_URL`. If your application uses _RabbitMQ_ then you must manually update your code to reference this file, e.g.:
275
275
 
276
276
  ```ruby
277
277
  connection = Bunny.new(config_for(:rabbit_mq)['url'])
278
278
  connection.start
279
279
  ```
280
280
 
281
- The environment variable `RABBITMQ_URL` can be used to configure _Bunny_ in production (similar to `DATABASE_URL` and `MONGO_URL`).
281
+ _Orchestration_ generates the following `config/rabbitmq.yml`:
282
+
283
+ ```
284
+ development:
285
+ url: amqp://127.0.0.1:51070
286
+
287
+ test:
288
+ url: amqp://127.0.0.1:51068
289
+
290
+ production:
291
+ url: <%= ENV['RABBITMQ_URL'] %>
292
+ ```
293
+
294
+ Using this approach, the environment variable `RABBITMQ_URL` can be used to configure _Bunny_ in production (similar to `DATABASE_URL` and `MONGO_URL`).
282
295
 
283
296
  This is a convention of the _Orchestration_ gem intended to make _RabbitMQ_ configuration consistent with other services.
284
297
 
@@ -60,10 +60,9 @@ module Orchestration
60
60
  return @terminal.write(:skip, relative_path(path))
61
61
  end
62
62
 
63
+ backup(path, previous_content) if options.fetch(:backup, false)
63
64
  File.write(path, content)
64
65
  @terminal.write(:update, relative_path(path))
65
-
66
- backup(path, previous_content) if options.fetch(:backup, false)
67
66
  end
68
67
 
69
68
  def skip?(present, content, previous_content, options)
@@ -75,6 +74,8 @@ module Orchestration
75
74
  end
76
75
 
77
76
  def backup(path, previous_content)
77
+ return if previous_content.nil?
78
+
78
79
  backup_path = Pathname.new("#{path}.bak")
79
80
  File.write(backup_path, previous_content)
80
81
  @terminal.write(:backup, relative_path(backup_path))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orchestration
4
- VERSION = '0.4.1'
4
+ VERSION = '0.4.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orchestration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Farrell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-26 00:00:00.000000000 Z
11
+ date: 2019-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: database_url