confidante 0.2.0 → 0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 678e803092f7eca50c5fdb3e30702c8eb2c07f3f
4
- data.tar.gz: 4b5555c36ec0a0ff609cd41d7756753bda085281
3
+ metadata.gz: e801b8e293dd1570def7707656f9b244d10083ee
4
+ data.tar.gz: cd06788d86b92cbc310e7d0f6d95a19bcffbbd83
5
5
  SHA512:
6
- metadata.gz: f7a90fb1d38661e092679fc01791de9a2f175d1574cf48a5e630a547a4fdf8a4d2836fcc53a5cab9a4699a08a8dd49e047bb7a8308d851333cea2087f0980eae
7
- data.tar.gz: e16dc70ee1da23f6f444a73b1a020881b21384c3f75ed64e19090fb09a55c10bea69d03ea7952c35b5d3b375e7bde86cf4cdd99c566efe23aab0fa45e501fed5
6
+ metadata.gz: 3fca41706b486701957382836b4b61d0304a0f38e48f01787a28e5d67cbeb7003924eecd10ef2636b96003de9e7e872913cadaf6b7365607fe0f0ad50b3d35e9
7
+ data.tar.gz: 96c7a515d4a8f31ce096248871db405f7c59f91b8fc3da8dc0d9b39ff1bc45119edd372e618987dca876809d9d9f92f481a6c8a012eb553241d3441d3e9a6342
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- confidante (0.2.0)
4
+ confidante (0.3.0)
5
5
  activesupport (~> 5.1, >= 5.1.1)
6
6
  hiera (~> 3.3, >= 3.3.1)
7
7
 
@@ -4,7 +4,7 @@ require 'active_support/core_ext/hash/keys'
4
4
 
5
5
  module Confidante
6
6
  class Configuration
7
- def initialize(opts)
7
+ def initialize(opts = {})
8
8
  options = {
9
9
  overrides: {},
10
10
  scope: {},
@@ -37,9 +37,9 @@ module Confidante
37
37
  @hiera.lookup(
38
38
  method.to_s,
39
39
  nil,
40
- {cwd: Dir.pwd}
41
- .merge(@scope)
42
- .merge({overrides: @overrides}))
40
+ {'cwd' => Dir.pwd}
41
+ .merge(@scope.stringify_keys)
42
+ .merge({'overrides' => @overrides.stringify_keys}))
43
43
  end
44
44
  end
45
45
  end
@@ -1,3 +1,3 @@
1
1
  module Confidante
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
data/lib/confidante.rb CHANGED
@@ -5,4 +5,7 @@ require 'hiera/backend/env_backend'
5
5
  require 'hiera/backend/overrides_backend'
6
6
 
7
7
  module Confidante
8
+ def self.configuration(opts = {})
9
+ Confidante::Configuration.new(opts)
10
+ end
8
11
  end
@@ -12,7 +12,7 @@ class Hiera
12
12
  "Looking up #{key} in environment backend with #{resolution_type}")
13
13
 
14
14
  Backend.parse_answer(
15
- ENV[key.upcase] || throw(:no_such_key),
15
+ ENV[key.to_s.upcase] || throw(:no_such_key),
16
16
  scope)
17
17
  end
18
18
  end
@@ -12,7 +12,7 @@ class Hiera
12
12
  "Looking up #{key} in overrides backend with #{resolution_type}")
13
13
 
14
14
  Backend.parse_answer(
15
- scope[:overrides][key.to_sym] || throw(:no_such_key),
15
+ scope['overrides'][key.to_s] || throw(:no_such_key),
16
16
  scope)
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: confidante
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson