Module: MacSetup
- Defined in:
- lib/mac_setup.rb,
lib/mac_setup/shell.rb,
lib/mac_setup/plugin.rb,
lib/mac_setup/secrets.rb,
lib/mac_setup/version.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/script_installer.rb,
lib/mac_setup/secrets_installer.rb,
lib/mac_setup/symlink_installer.rb,
lib/mac_setup/brewfile_installer.rb,
lib/mac_setup/git_repo_installer.rb,
lib/mac_setup/homebrew_installer.rb,
lib/mac_setup/services_installer.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, GitRepoInstaller, HomebrewInstaller, HomebrewRunner, Plugin, ScriptInstaller, Secrets, SecretsInstaller, ServicesInstaller, Shell, Symlink, SymlinkInstaller, 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
]
- DEFAULT_PLUGINS =
[
Plugins::MacAppStore,
Plugins::Keybase
]
- VERSION =
"0.8.0"
Class Method Summary
collapse
Class Method Details
.bootstrap(dotfiles_repo) ⇒ Object
.encrypt ⇒ Object
53
54
55
|
# File 'lib/mac_setup.rb', line 53
def encrypt
Secrets.encrypt(dotfiles_path)
end
|
.log(message) ⇒ Object
61
62
63
64
65
66
67
68
69
|
# File 'lib/mac_setup.rb', line 61
def log(message)
if block_given?
print "#{message}..."
yield
puts "Ok."
else
puts message
end
end
|
.plugins(config) ⇒ Object
77
78
79
80
|
# File 'lib/mac_setup.rb', line 77
def plugins(config)
DEFAULT_PLUGINS + config.plugins.map { |plugin_name| Plugin.load(plugin_name) }
end
|
.shorten_path(path) ⇒ Object
57
58
59
|
# File 'lib/mac_setup.rb', line 57
def shorten_path(path)
path.sub(/#{ENV['HOME']}/, "~")
end
|