Sha256: 9be5f3b1f6ed2328ca3b94a22e8fe4b4e6920b3b9872ceacda7683828b3da39a

Contents?: true

Size: 955 Bytes

Versions: 3

Compression:

Stored size: 955 Bytes

Contents

require 'minimart/output'

module Minimart
  # General configuration settings for Minimart.
  class Configuration

    class << self
      # IO interface for minimart
      # @return [Minimart::Output]
      def output
        @output || Minimart::Output.new($stdout)
      end

      # Set which IO output should use
      # @param [IO] io
      def output=(io)
        @output = Minimart::Output.new(io)
      end

      def chef_server_config=(config)
        @chef_server = config
      end

      def chef_server_config
        (@chef_server || {}).merge(ssl: {verify: verify_ssl})
      end

      def github_config=(config)
        @github_config = config
      end

      def github_config
        (@github_config || {}).merge(connection_options: {ssl: {verify: verify_ssl}})
      end

      def verify_ssl
        @verify_ssl.nil? ? true : @verify_ssl
      end

      def verify_ssl=(val)
        @verify_ssl = val
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
minimart-1.0.2 lib/minimart/configuration.rb
minimart-1.0.1 lib/minimart/configuration.rb
minimart-0.0.1 lib/minimart/configuration.rb