Sha256: 24d58eea9963a2520d87b40880f793dd8f519193329b9fdb1c8ab8025460e17e

Contents?: true

Size: 615 Bytes

Versions: 31

Compression:

Stored size: 615 Bytes

Contents

# frozen_string_literal: true

require 'hiera'

class Hiera
  module Backend
    # rubocop:disable Naming/ClassAndModuleCamelCase
    class Env_backend
      def initialize
        Hiera.debug('Hiera environment backend starting')
      end

      def lookup(key, scope, _order_override, resolution_type, _context)
        Hiera.debug(
          "Looking up #{key} in environment backend with #{resolution_type}"
        )

        Backend.parse_answer(
          ENV[key.to_s.upcase] || throw(:no_such_key),
          scope
        )
      end
    end
    # rubocop:enable Naming/ClassAndModuleCamelCase
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
confidante-0.29.0.pre.9 lib/hiera/backend/env_backend.rb
confidante-0.29.0.pre.8 lib/hiera/backend/env_backend.rb
confidante-0.29.0.pre.7 lib/hiera/backend/env_backend.rb
confidante-0.29.0.pre.6 lib/hiera/backend/env_backend.rb
confidante-0.29.0.pre.5 lib/hiera/backend/env_backend.rb
confidante-0.29.0.pre.4 lib/hiera/backend/env_backend.rb
confidante-0.29.0.pre.3 lib/hiera/backend/env_backend.rb
confidante-0.29.0.pre.2 lib/hiera/backend/env_backend.rb
confidante-0.29.0.pre.1 lib/hiera/backend/env_backend.rb
confidante-0.28.0 lib/hiera/backend/env_backend.rb
confidante-0.28.0.pre.23 lib/hiera/backend/env_backend.rb
confidante-0.28.0.pre.22 lib/hiera/backend/env_backend.rb
confidante-0.28.0.pre.21 lib/hiera/backend/env_backend.rb
confidante-0.28.0.pre.20 lib/hiera/backend/env_backend.rb
confidante-0.28.0.pre.19 lib/hiera/backend/env_backend.rb
confidante-0.28.0.pre.17 lib/hiera/backend/env_backend.rb
confidante-0.28.0.pre.16 lib/hiera/backend/env_backend.rb
confidante-0.28.0.pre.15 lib/hiera/backend/env_backend.rb
confidante-0.28.0.pre.14 lib/hiera/backend/env_backend.rb
confidante-0.28.0.pre.13 lib/hiera/backend/env_backend.rb