phobos 1.2.1 → 1.3.0
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +2 -0
- data/lib/phobos.rb +1 -1
- data/lib/phobos/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: a091bb89b4a3006aafa88611a19c964697e420f8
|
|
4
|
+
data.tar.gz: 55cb3fe0c4c345863109a6687d7c6e8322b030c8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b35b61fbae213afd28a08f933663129cef50e6adb5ff7fe639e7022cb41153122ceb1e9916c58aa2f2e01a99428756d70dff66f442302c9e57a31dda3ff4817a
|
|
7
|
+
data.tar.gz: 8633c0846461ad1c73dda4836adbca1fb4bc9ef270d7e755f54d1b9b2d56f4068510c6ef6b09ba4b743000dec9db76cf11c62ac1cbf78828523054a76299ea3a
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
+
## 1.3.0 (2017-06-15)
|
|
8
|
+
|
|
9
|
+
- [enhancement] Add support for erb syntax in phobos config file #26
|
|
10
|
+
|
|
7
11
|
## 1.2.1 (2016-10-12)
|
|
8
12
|
|
|
9
13
|
- [bugfix] Ensure JSON layout for log files
|
data/README.md
CHANGED
|
@@ -289,6 +289,8 @@ When using Phobos __executors__ you don't care about how listeners are created,
|
|
|
289
289
|
### <a name="usage-configuration-file"></a> Configuration file
|
|
290
290
|
The configuration file is organized in 6 sections. Take a look at the example file, [config/phobos.yml.example](https://github.com/klarna/phobos/blob/master/config/phobos.yml.example).
|
|
291
291
|
|
|
292
|
+
The file will be parsed through ERB so ERB syntax/file extension is supported beside the YML format.
|
|
293
|
+
|
|
292
294
|
__logger__ configures the logger for all Phobos components, it automatically outputs to `STDOUT` and it saves the log in the configured file
|
|
293
295
|
|
|
294
296
|
__kafka__ provides configurations for every `Kafka::Client` created over the application. All [options supported by `ruby-kafka`][ruby-kafka-client] can be provided.
|
data/lib/phobos.rb
CHANGED
|
@@ -29,7 +29,7 @@ module Phobos
|
|
|
29
29
|
|
|
30
30
|
def configure(yml_path)
|
|
31
31
|
ENV['RAILS_ENV'] = ENV['RACK_ENV'] ||= 'development'
|
|
32
|
-
@config = DeepStruct.new(YAML.
|
|
32
|
+
@config = DeepStruct.new(YAML.load(ERB.new(File.read(File.expand_path(yml_path))).result))
|
|
33
33
|
@config.class.send(:define_method, :producer_hash) { Phobos.config.producer&.to_hash }
|
|
34
34
|
@config.class.send(:define_method, :consumer_hash) { Phobos.config.consumer&.to_hash }
|
|
35
35
|
configure_logger
|
data/lib/phobos/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: phobos
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Túlio Ornelas
|
|
@@ -13,7 +13,7 @@ authors:
|
|
|
13
13
|
autorequire:
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
|
-
date:
|
|
16
|
+
date: 2017-06-15 00:00:00.000000000 Z
|
|
17
17
|
dependencies:
|
|
18
18
|
- !ruby/object:Gem::Dependency
|
|
19
19
|
name: bundler
|