phobos 1.2.1 → 1.3.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: 5cc3592f2958a67c3217a1fc5452fcecc67c25ef
4
- data.tar.gz: a28aaa30d0b2d71adfb3f13ec90ae3e42f9a7f78
3
+ metadata.gz: a091bb89b4a3006aafa88611a19c964697e420f8
4
+ data.tar.gz: 55cb3fe0c4c345863109a6687d7c6e8322b030c8
5
5
  SHA512:
6
- metadata.gz: 4b833fc7eca3e529cc937e2f46ed1ac61413629b10a0334246ac389256b68756d89ab60576f4e5a4cc9f1640e41254708b394d2f3d7057f3e509cfd271e0477c
7
- data.tar.gz: 16e65cc6c55bfbfb209583c4d93b74e107d636098b34b364a0ab651fca73c67b1613a4d0aa9038e8914187e81694327618a8433cdd39baef6c2d6bae0d1be6dc
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.load_file(File.expand_path(yml_path)))
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
@@ -1,3 +1,3 @@
1
1
  module Phobos
2
- VERSION = '1.2.1'
2
+ VERSION = '1.3.0'
3
3
  end
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.2.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: 2016-10-12 00:00:00.000000000 Z
16
+ date: 2017-06-15 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: bundler