Module: MacSetup
- Defined in:
- lib/mac_setup.rb,
lib/mac_setup/shell.rb,
lib/mac_setup/plugin.rb,
lib/mac_setup/result.rb,
lib/mac_setup/secrets.rb,
lib/mac_setup/version.rb,
lib/mac_setup/plugins/asdf.rb,
lib/mac_setup/configuration.rb,
lib/mac_setup/system_status.rb,
lib/mac_setup/homebrew_runner.rb,
lib/mac_setup/plugins/keybase.rb,
lib/mac_setup/plugins/dotfiles.rb,
lib/mac_setup/script_installer.rb,
lib/mac_setup/secrets_installer.rb,
lib/mac_setup/symlink_installer.rb,
lib/mac_setup/brewfile_installer.rb,
lib/mac_setup/defaults_installer.rb,
lib/mac_setup/git_repo_installer.rb,
lib/mac_setup/homebrew_installer.rb,
lib/mac_setup/services_installer.rb,
lib/mac_setup/symlink_path_builder.rb,
lib/mac_setup/plugins/mac_app_store.rb,
lib/mac_setup/command_line_tools_installer.rb
Defined Under Namespace
Modules: Plugins
Classes: BrewfileInstaller, CommandLineToolsInstaller, Configuration, DefaultsInstaller, GitRepoInstaller, HomebrewInstaller, HomebrewRunner, Plugin, Result, ScriptInstaller, Secrets, SecretsInstaller, ServicesInstaller, Shell, Symlink, SymlinkInstaller, SymlinkPathBuilder, SystemStatus
Constant Summary
collapse
- DEFAULT_DOTFILES_PATH =
File.expand_path("~/.dotfiles")
- DEFAULT_CONFIG_PATH =
File.join(DEFAULT_DOTFILES_PATH, "mac_setup/config.yml")
- INSTALLERS =
[
GitRepoInstaller,
SymlinkInstaller,
HomebrewRunner,
ScriptInstaller,
DefaultsInstaller
]
- DEFAULT_PLUGINS =
[
Plugins::MacAppStore,
Plugins::Keybase,
Plugins::Dotfiles,
Plugins::Asdf
]
- VERSION =
"0.9.0"
Class Method Summary
collapse
Class Method Details
.bootstrap(dotfiles_repo) ⇒ Object
.encrypt ⇒ Object
65
66
67
|
# File 'lib/mac_setup.rb', line 65
def encrypt
Secrets.encrypt(dotfiles_path)
end
|
.log(message) ⇒ Object
73
74
75
76
77
78
79
80
81
|
# File 'lib/mac_setup.rb', line 73
def log(message)
if block_given?
print "#{message}..."
yield
puts "Ok."
else
puts message
end
end
|
.plugins(config) ⇒ Object
89
90
91
92
|
# File 'lib/mac_setup.rb', line 89
def plugins(config)
DEFAULT_PLUGINS + config.plugins.map { |plugin_name| Plugin.load(plugin_name) }
end
|
.shorten_path(path) ⇒ Object
69
70
71
|
# File 'lib/mac_setup.rb', line 69
def shorten_path(path)
path.to_s.sub(/#{ENV['HOME']}/, "~")
end
|