container_config 0.1.3 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 487f60c6b0500aa7abf9be5de88e436e644d8832a27e1196c3c4bd9a6388fe24
4
- data.tar.gz: 0e271f9cf5de4fcdc80cdb9cce6961ab61cd3e6c288c2b8b6d718f29355074ff
3
+ metadata.gz: 4e3fa143d884c4e9e718054a02b5964a50f33b8bf8b20412d019f1f823b55bd4
4
+ data.tar.gz: f59be34caf1427460dcacc5a9155a930b90ac8f795fc9cca526072381708255a
5
5
  SHA512:
6
- metadata.gz: bb062a89ec5a80de5293feab518f3723db0bd395f0c4092a6e502c9ec3df6cf1ff81cc40d8326b92b83aa328352b68be084cb4211b2adfc2b18a145436c0c886
7
- data.tar.gz: 82c25ad23ac76f8ba039f6746b775454ba877fa8dbc1b208b7a3a03a537c7b4e273890dfd2ef70d0c2d160cdb75dddf21f718dba79787cccb0aad2f1e4a221c4
6
+ metadata.gz: 105ba644ae63e6408ae1cb158916f85ff845a1997c29bbedce410afaf2d7f76e96e81a8080982127c245db7ac8e0b0bddc3a3a7c6db34ca18ece64e2c2a92692
7
+ data.tar.gz: 4180e29ad6571020d5e5720fefa06ccb1ae9ba71860ad1ed45018bd58314b2f0f013bc2bd5272b7f457b7b10b9bd2188e43b3d45c17207fe85ac48253d6b6967
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.0] - 2021-07-20
4
+
5
+ - Added `db` key to Redis config
6
+
3
7
  ## [0.1.3] - 2021-06-18
4
8
 
5
9
  - Demoted `Could not find value for key` log message to debug level
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- container_config (0.1.3)
4
+ container_config (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -9,10 +9,10 @@ GEM
9
9
  ast (2.4.2)
10
10
  diff-lcs (1.4.4)
11
11
  parallel (1.20.1)
12
- parser (3.0.1.1)
12
+ parser (3.0.2.0)
13
13
  ast (~> 2.4.1)
14
14
  rainbow (3.0.0)
15
- rake (13.0.3)
15
+ rake (13.0.6)
16
16
  regexp_parser (2.1.1)
17
17
  rexml (3.2.5)
18
18
  rspec (3.10.0)
@@ -28,7 +28,7 @@ GEM
28
28
  diff-lcs (>= 1.2.0, < 2.0)
29
29
  rspec-support (~> 3.10.0)
30
30
  rspec-support (3.10.2)
31
- rubocop (1.17.0)
31
+ rubocop (1.18.3)
32
32
  parallel (~> 1.10)
33
33
  parser (>= 3.0.0.0)
34
34
  rainbow (>= 2.2.2, < 4.0)
@@ -37,10 +37,10 @@ GEM
37
37
  rubocop-ast (>= 1.7.0, < 2.0)
38
38
  ruby-progressbar (~> 1.7)
39
39
  unicode-display_width (>= 1.4.0, < 3.0)
40
- rubocop-ast (1.7.0)
40
+ rubocop-ast (1.8.0)
41
41
  parser (>= 3.0.1.1)
42
- rubocop-rake (0.5.1)
43
- rubocop
42
+ rubocop-rake (0.6.0)
43
+ rubocop (~> 1.0)
44
44
  rubocop-rspec (2.4.0)
45
45
  rubocop (~> 1.0)
46
46
  rubocop-ast (>= 1.1.0)
@@ -23,12 +23,14 @@ module ContainerConfig
23
23
  url = ContainerConfig.load("#{key}_URL", **options, default: "redis://#{host}:#{port}")
24
24
  sentinels = sentinel_info(key, **options)
25
25
  password = ContainerConfig.load("#{key}_PASSWORD", **options)
26
+ db = ContainerConfig.load("#{key}_DB", **options, type: :integer, coerce_nil: false)
26
27
 
27
28
  # Ensure we never pass an empty string to Redis since it will be passed to the Redis AUTH
28
29
  # command as-is and will cause an exception
29
30
  password = nil if password.to_s.strip.empty?
30
31
 
31
32
  redis_config = { url: url, password: password }
33
+ redis_config[:db] = db if db
32
34
  redis_config[:sentinels] = sentinels unless sentinels.empty?
33
35
 
34
36
  # Add SSL configuration
@@ -2,5 +2,5 @@
2
2
 
3
3
  module ContainerConfig
4
4
  # ContainerConfig version
5
- VERSION = "0.1.3"
5
+ VERSION = "0.2.0"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: container_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Newell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-18 00:00:00.000000000 Z
11
+ date: 2021-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake