Sha256: 2cecbf42e022134ad020c9d225eba793bf44ba0bce00bba51b9ff18f4a03cfdd

Contents?: true

Size: 474 Bytes

Versions: 7

Compression:

Stored size: 474 Bytes

Contents

require 'r10k/deployment/config'

module R10K
  class Deployment
    class MockConfig

      attr_accessor :hash

      def initialize(hash)
        @hash = hash.merge(deploy: {})
      end

      def configfile
        "/some/nonexistent/config_file"
      end

      # Perform a scan for key and check for both string and symbol keys
      def setting(key)
        @hash[key]
      end

      alias [] setting

      def settings
        @hash
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
r10k-2.3.1 spec/r10k-mocks/mock_config.rb
r10k-2.3.0 spec/r10k-mocks/mock_config.rb
r10k-2.2.2 spec/r10k-mocks/mock_config.rb
r10k-2.2.1 spec/r10k-mocks/mock_config.rb
r10k-2.2.0 spec/r10k-mocks/mock_config.rb
r10k-2.1.1 spec/r10k-mocks/mock_config.rb
r10k-2.1.0 spec/r10k-mocks/mock_config.rb