Module: ConfCtl
- Defined in:
- lib/confctl.rb,
lib/confctl/cli.rb,
lib/confctl/nix.rb,
lib/confctl/hook.rb,
lib/confctl/gcroot.rb,
lib/confctl/logger.rb,
lib/confctl/swpins.rb,
lib/confctl/machine.rb,
lib/confctl/pattern.rb,
lib/confctl/version.rb,
lib/confctl/conf_dir.rb,
lib/confctl/nix_copy.rb,
lib/confctl/settings.rb,
lib/confctl/nix_build.rb,
lib/confctl/conf_cache.rb,
lib/confctl/exceptions.rb,
lib/confctl/nix_format.rb,
lib/confctl/utils/file.rb,
lib/confctl/line_buffer.rb,
lib/confctl/swpins/core.rb,
lib/confctl/swpins/spec.rb,
lib/confctl/user_script.rb,
lib/confctl/erb_template.rb,
lib/confctl/machine_list.rb,
lib/confctl/user_scripts.rb,
lib/confctl/health_checks.rb,
lib/confctl/machine_status.rb,
lib/confctl/module_options.rb,
lib/confctl/swpins/channel.rb,
lib/confctl/system_command.rb,
lib/confctl/generation/host.rb,
lib/confctl/git_repo_mirror.rb,
lib/confctl/machine_control.rb,
lib/confctl/std_line_buffer.rb,
lib/confctl/generation/build.rb,
lib/confctl/swpins/specs/git.rb,
lib/confctl/parallel_executor.rb,
lib/confctl/swpins/change_set.rb,
lib/confctl/swpins/specs/base.rb,
lib/confctl/generation/unified.rb,
lib/confctl/health_checks/base.rb,
lib/confctl/nix_collect_garbage.rb,
lib/confctl/swpins/channel_list.rb,
lib/confctl/swpins/cluster_name.rb,
lib/confctl/generation/host_list.rb,
lib/confctl/swpins/deployed_info.rb,
lib/confctl/swpins/specs/git_rev.rb,
lib/confctl/generation/build_list.rb,
lib/confctl/nix_literal_expression.rb,
lib/confctl/swpins/specs/directory.rb,
lib/confctl/generation/unified_list.rb,
lib/confctl/swpins/cluster_name_list.rb,
lib/confctl/health_checks/run_command.rb,
lib/confctl/health_checks/systemd/properties.rb,
lib/confctl/health_checks/systemd/property_list.rb,
lib/confctl/health_checks/systemd/property_check.rb
Defined Under Namespace
Modules: Cli, GCRoot, Generation, HealthChecks, Hook, Pattern, Swpins, SystemCommand, UserScripts, Utils Classes: ConfCache, ConfDir, ErbTemplate, Error, GitRepoMirror, LineBuffer, Logger, Machine, MachineControl, MachineList, MachineStatus, ModuleOptions, Nix, NixBuild, NixCollectGarbage, NixCopy, NixFormat, NixLiteralExpression, ParallelExecutor, Settings, StdLineBuffer, UserScript
Constant Summary collapse
- VERSION =
'2.0.0'.freeze
Class Method Summary collapse
-
.cache_dir ⇒ String
Path to global cache directory.
-
.nix_asset(name) ⇒ String
Path to a nix asset.
-
.root ⇒ String
Root of confctl repository.
-
.safe_host_name(host) ⇒ String
Return host name without slashes.
Class Method Details
.cache_dir ⇒ String
Path to global cache directory
15 16 17 18 19 20 |
# File 'lib/confctl.rb', line 15 def self.cache_dir @cache_dir ||= File.join( ENV['XDG_CACHE_HOME'] || File.join(Dir.home, '.cache'), 'confctl' ) end |
.nix_asset(name) ⇒ String
Path to a nix asset
25 26 27 |
# File 'lib/confctl.rb', line 25 def self.nix_asset(name) File.join(root, 'nix', name) end |
.root ⇒ String
Root of confctl repository
9 10 11 |
# File 'lib/confctl.rb', line 9 def self.root @root ||= File.realpath(File.join(File.dirname(__FILE__), '../')) end |
.safe_host_name(host) ⇒ String
Return host name without slashes
31 32 33 |
# File 'lib/confctl.rb', line 31 def self.safe_host_name(host) host.gsub('/', ':') end |