Module: Stable::Bootstrap
- Defined in:
- lib/stable/bootstrap.rb
Overview
Bootstrap utilities for setting up Stable environment
Class Method Summary collapse
Class Method Details
.disable_rvm_autolibs! ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/stable/bootstrap.rb', line 20 def self.disable_rvm_autolibs! return unless system('which rvm > /dev/null') # Only run once marker = File.join(Paths.root, '.rvm_autolibs_disabled') return if File.exist?(marker) puts 'Configuring RVM (disabling autolibs)...' system("bash -lc 'rvm autolibs disable'") system("bash -lc 'echo rvm_silence_path_mismatch_check_flag=1 >> ~/.rvmrc'") FileUtils.touch(marker) end |
.run! ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/stable/bootstrap.rb', line 8 def self.run! FileUtils.mkdir_p(Paths.root) FileUtils.mkdir_p(Paths.caddy_dir) FileUtils.mkdir_p(Paths.certs_dir) File.write(Paths.apps_file, "--- []\n") unless File.exist?(Paths.apps_file) File.write(Paths.caddyfile, '') unless File.exist?(Paths.caddyfile) disable_rvm_autolibs! end |