Module: Dots::Bootstrap
Constant Summary collapse
- PROGRAMS =
These are the programs we are going to download from Homebrew.
%w(git ruby python vim pip hub)
- PACKAGES =
%w(httpie aws)
Instance Method Summary collapse
-
#install_bundle ⇒ Object
Install the latest version of all gems to the global gemset.
-
#install_packages ⇒ Object
Install Python packages from pip.
-
#install_programs ⇒ Object
Install C binaries, Python programs, and other useful tools from Homebrew.
Instance Method Details
#install_bundle ⇒ Object
Install the latest version of all gems to the global gemset. These gems are configured in ~/.Gemfile.
27 28 29 |
# File 'lib/ruby/dots/bootstrap.rb', line 27 def install_bundle system "cd && #{install_bundler} && #{install_global_gemset}" end |
#install_packages ⇒ Object
Install Python packages from pip. Pip!
32 33 34 |
# File 'lib/ruby/dots/bootstrap.rb', line 32 def install_packages system "pip install #{PACKAGES.join(' ')}" end |
#install_programs ⇒ Object
Install C binaries, Python programs, and other useful tools from Homebrew.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ruby/dots/bootstrap.rb', line 11 def install_programs if installed? "brew" programs_to_install = PROGRAMS.reduce([]) { |programs, program| programs << program unless installed? program }.join " " system "brew install #{programs_to_install}" \ unless programs_to_install.empty? install_packages else install_homebrew and install_programs end end |