class RocketFuel::Precheck::CommandLineToolCheck

Constants

DEFAULT_RECEIPT_PATH
TEN_ELEVEN_RECEIPT_PATH
TEN_NINE_RECEIPT_PATH

Public Instance Methods

check?() click to toggle source
# File lib/rocket_fuel/precheck/command_line_tool_check.rb, line 18
def check?
  RocketFuel::SystemDetails.platform_family?(:mac)
end
ok?() click to toggle source
# File lib/rocket_fuel/precheck/command_line_tool_check.rb, line 14
def ok?
  installed?
end

Protected Instance Methods

clt_prints?() click to toggle source
# File lib/rocket_fuel/precheck/command_line_tool_check.rb, line 36
def clt_prints?
  RocketFuel::SystemCall.make("xcode-select -p")
end
failure_message() click to toggle source
# File lib/rocket_fuel/precheck/command_line_tool_check.rb, line 24
def failure_message
  'Command Line Tools NOT found.'
end
installed?() click to toggle source
# File lib/rocket_fuel/precheck/command_line_tool_check.rb, line 32
def installed?
  FileTest.exist?(receipt_file) || clt_prints?
end
receipt_file() click to toggle source
# File lib/rocket_fuel/precheck/command_line_tool_check.rb, line 40
def receipt_file
  if RocketFuel::SystemDetails.os.minor_version =~ /\A10.11/
    TEN_ELEVEN_RECEIPT_PATH
  elsif RocketFuel::SystemDetails.os.minor_version =~ /\A10.(9|(10))/
    TEN_NINE_RECEIPT_PATH
  else
    DEFAULT_RECEIPT_PATH
  end
end
success_message() click to toggle source
# File lib/rocket_fuel/precheck/command_line_tool_check.rb, line 28
def success_message
  'Command Line Tools found.'
end