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/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/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, GitRepoInstaller, HomebrewInstaller, HomebrewRunner, Plugin, 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
]
- DEFAULT_PLUGINS =
[
Plugins::MacAppStore,
Plugins::Keybase,
Plugins::Dotfiles
]
- VERSION =
"0.8.3"
Class Method Summary
collapse
Class Method Details
.bootstrap(dotfiles_repo) ⇒ Object
.encrypt ⇒ Object
57
58
59
|
# File 'lib/mac_setup.rb', line 57
def encrypt
Secrets.encrypt(dotfiles_path)
end
|
.log(message) ⇒ Object
65
66
67
68
69
70
71
72
73
|
# File 'lib/mac_setup.rb', line 65
def log(message)
if block_given?
print "#{message}..."
yield
puts "Ok."
else
puts message
end
end
|
.plugins(config) ⇒ Object
81
82
83
84
|
# File 'lib/mac_setup.rb', line 81
def plugins(config)
DEFAULT_PLUGINS + config.plugins.map { |plugin_name| Plugin.load(plugin_name) }
end
|
.shorten_path(path) ⇒ Object
61
62
63
|
# File 'lib/mac_setup.rb', line 61
def shorten_path(path)
path.to_s.sub(/#{ENV['HOME']}/, "~")
end
|