Sha256: 0f2f019d4f5bc02fac8620b8b4b4a0f005defc2d98de103a56bc909e078ed673

Contents?: true

Size: 1.67 KB

Versions: 3

Compression:

Stored size: 1.67 KB

Contents

require 'complex_config/shortcuts'
require 'tins/xt/secure_write'
require 'fileutils'

module Hackmac
  module Config
    extend FileUtils
    extend ComplexConfig::Provider::Shortcuts

    DEFAULT = <<~end
      ---
      efi:
        source: 'https://github.com/flori/EFI-some.git'
      usb:
        os: '/Applications/Install macOS Mojave.app'
      devices:
        main:
          name: 'OSX_EFI'
        backup:
          name: 'BACKUP_EFI'
      github:
        user: null
        access_token: null
      kext:
        efi_path: 'EFI/CLOVER/kexts/Other'
        sources:
          AppleALC:
            github: 'acidanthera/AppleALC'
          IntelMausi:
            github: 'acidanthera/IntelMausi'
          Lilu:
            github: 'acidanthera/Lilu'
          #USBInjectAll:
          #  github: 'Sniki/OS-X-USB-Inject-All'
          VirtualSMC:
            github: 'acidanthera/VirtualSMC'
            debug: false
            plugins:
              - SMCProcessor
              - SMCSuperIO
          BrcmPatchRAM2:
            download:
              name:    'BrcmPatchRAM'
              version: '2.2.10'
              url:     'https://bitbucket.org/RehabMan/os-x-brcmpatchram/downloads/RehabMan-BrcmPatchRAM-2018-0505.zip'
            plugins:
              - BrcmFirmwareData
          WhateverGreen:
            github: 'acidanthera/WhateverGreen'
    end

    def self.load
      path = File.expand_path('~/.config/hackmac')
      mkdir_p path
      ComplexConfig::Provider.config_dir = path
      config_path = File.join(path, 'hackmac.yml')
      unless File.exist?(config_path)
        File.secure_write(config_path, DEFAULT)
      end
      complex_config.hackmac
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hackmac-0.8.2 lib/hackmac/config.rb
hackmac-0.8.1 lib/hackmac/config.rb
hackmac-0.8.0 lib/hackmac/config.rb