Class: Boxen::Preflight::Directories
- Inherits:
-
Boxen::Preflight
- Object
- Check
- Boxen::Preflight
- Boxen::Preflight::Directories
- Defined in:
- lib/boxen/preflight/directories.rb
Instance Attribute Summary
Attributes inherited from Check
Instance Method Summary collapse
Methods inherited from Check
#abort, checks, #initialize, register, run, #warn
Constructor Details
This class inherits a constructor from Boxen::Check
Instance Method Details
#ok? ⇒ Boolean
5 6 7 8 9 |
# File 'lib/boxen/preflight/directories.rb', line 5 def ok? homedir_directory_exists? && homedir_owner == config.user && homedir_group == 'staff' end |
#run ⇒ Object
11 12 13 14 |
# File 'lib/boxen/preflight/directories.rb', line 11 def run Boxen::Util.sudo("/bin/mkdir", "-p", config.homedir) && Boxen::Util.sudo("/usr/sbin/chown", "#{config.user}:staff", config.homedir) end |