Sha256: 7208bdaf070dc8002dcdb709229e827f98ffd61f71080b62b2ca59a046842c84

Contents?: true

Size: 611 Bytes

Versions: 124

Compression:

Stored size: 611 Bytes

Contents

require "cc/cli/file_store"
require "uuid"

module CC
  module CLI
    class GlobalConfig < FileStore
      FILE_NAME = "/config.yml".freeze

      DEFAULT_CONFIG = {
        "check-version" => true,
      }.freeze

      # Config entries

      def check_version
        data["check-version"]
      end
      alias check_version? check_version

      def check_version=(value)
        data["check-version"] = value == true
      end

      def uuid
        data["uuid"] ||= UUID.new.generate
      end

      private

      def load_data
        @data = DEFAULT_CONFIG.merge(super)
      end
    end
  end
end

Version data entries

124 entries across 124 versions & 2 rubygems

Version Path
codeclimate-0.85.27 lib/cc/cli/global_config.rb
codeclimate-0.85.26 lib/cc/cli/global_config.rb
codeclimate-0.85.25 lib/cc/cli/global_config.rb
codeclimate-0.85.24 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.54 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.53 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.52 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.51 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.50 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.49 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.48 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.47 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.46 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.45 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.44 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.43 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.42 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.41 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.40 lib/cc/cli/global_config.rb
codeclimate-fede-0.85.39 lib/cc/cli/global_config.rb