Sha256: 7ad7f6f6eac3f3a65e83273cbc67995ecc8b80b30fce0eb78633cdac375d94c8

Contents?: true

Size: 923 Bytes

Versions: 2

Compression:

Stored size: 923 Bytes

Contents

require 'require_all'

module ConfCtl
  module Generation; end
  module Utils; end

  # Root of confctl repository
  # @return [String]
  def self.root
    @root ||= File.realpath(File.join(File.dirname(__FILE__), '../'))
  end

  # Path to global cache directory
  # @return [String]
  def self.cache_dir
    @cache_dir ||= File.join(
      ENV['XDG_CACHE_HOME'] || File.join(Dir.home, '.cache'),
      'confctl'
    )
  end

  # Path to a nix asset
  # @param name [String]
  # @return [String]
  def self.nix_asset(name)
    File.join(root, 'nix', name)
  end

  # Return host name without slashes
  # @return [String]
  def self.safe_host_name(host)
    host.gsub('/', ':')
  end
end

require_rel 'confctl/*.rb'
require_rel 'confctl/health_checks'
require_rel 'confctl/health_checks/systemd'
require_rel 'confctl/utils'
require_rel 'confctl/generation'

ConfCtl::UserScripts.load_scripts
ConfCtl::UserScripts.setup_all

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
confctl-2.0.0 lib/confctl.rb
confctl-1.0.0 lib/confctl.rb