Class: Boxen::Preflight::OS

Inherits:
Boxen::Preflight show all
Defined in:
lib/boxen/preflight/os.rb

Constant Summary collapse

SUPPORTED_RELEASES =
%w(10.8 10.9 10.10 10.11 10.12 10.13)

Instance Attribute Summary

Attributes inherited from Check

#config

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

Returns:

  • (Boolean)


6
7
8
# File 'lib/boxen/preflight/os.rb', line 6

def ok?
  osx? && (skip_os_check? || supported_release?)
end

#runObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/boxen/preflight/os.rb', line 10

def run
  abort <<~HEREDOC
    You must be running one of the following Mac OS versions:

    #{pretty_list_output(SUPPORTED_RELEASES)}

    While not recommended, it is possible to ignore this warning and
    continue anyway. Just prefix your Boxen command with
    `SKIP_OS_CHECK=1`.
  HEREDOC
end