Module: MacSetup
- Defined in:
- lib/mac_setup.rb,
lib/mac_setup/shell.rb,
lib/mac_setup/version.rb,
lib/mac_setup/configuration.rb,
lib/mac_setup/system_status.rb,
lib/mac_setup/script_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/command_line_tools_installer.rb
Defined Under Namespace
Classes: BrewfileInstaller, CommandLineToolsInstaller, Configuration, GitRepoInstaller, HomebrewInstaller, ScriptInstaller, ServicesInstaller, Shell, Symlink, SymlinkInstaller, SystemStatus
Constant Summary
collapse
- DOTFILES_PATH =
File.expand_path("~/.dotfiles")
- INSTALLERS =
[
SymlinkInstaller,
BrewfileInstaller,
ServicesInstaller,
GitRepoInstaller,
ScriptInstaller
]
- VERSION =
"0.5.0"
Class Method Summary
collapse
Class Method Details
.bootstrap(dotfiles_repo) ⇒ Object
30
31
32
33
34
35
|
# File 'lib/mac_setup.rb', line 30
def self.bootstrap(dotfiles_repo)
CommandLineToolsInstaller.run
GitRepoInstaller.install_repo(dotfiles_repo, DOTFILES_PATH)
SymlinkInstaller.install_dotfile("mac_setup")
HomebrewInstaller.run
end
|
.install(config_path, _options) ⇒ Object
23
24
25
26
27
28
|
# File 'lib/mac_setup.rb', line 23
def self.install(config_path, _options)
config = Configuration.new(File.expand_path(config_path))
status = SystemStatus.new
INSTALLERS.each { |installer| installer.run(config, status) }
end
|
.shorten_path(path) ⇒ Object
37
38
39
|
# File 'lib/mac_setup.rb', line 37
def self.shorten_path(path)
path.sub(/#{ENV['HOME']}/, "~")
end
|