Class: XCPretty::Simple

Inherits:
Formatter show all
Defined in:
lib/xcpretty/formatters/simple.rb

Constant Summary collapse

PASS =
"✓"
FAIL =
"✗"
ERROR =
"⌦ "
ASCII_PASS =
"."
ASCII_FAIL =
"x"
ASCII_ERROR =
"[!]"
COMPLETION =
"▸"
ASCII_COMPLETION =
">"

Constants included from FormatMethods

FormatMethods::EMPTY_STRING

Constants included from ANSI

ANSI::COLORS, ANSI::EFFECT, ANSI::FORMATTED_MATCHER

Instance Attribute Summary

Attributes inherited from Formatter

#parser

Attributes included from ANSI

#colorize

Instance Method Summary collapse

Methods inherited from Formatter

#format_test_summary, #initialize, #optional_newline, #pretty_format, #use_unicode?

Methods included from FormatMethods

#format_check_dependencies, #format_clean, #format_clean_remove, #format_test_run_finished, #format_test_summary

Methods included from ANSI

#ansi_parse, #applied_effects, #colorize?, #cyan, #green, #red, #strip, #white, #yellow

Constructor Details

This class inherits a constructor from XCPretty::Formatter

Instance Method Details

#format_analyze(file_name, file_path) ⇒ Object



18
19
20
# File 'lib/xcpretty/formatters/simple.rb', line 18

def format_analyze(file_name, file_path)
  format("Analyzing", file_name)
end

#format_build_target(target, project, configuration) ⇒ Object



22
23
24
# File 'lib/xcpretty/formatters/simple.rb', line 22

def format_build_target(target, project, configuration)
  format("Building", "#{project}/#{target} [#{configuration}]")
end

#format_clean_target(target, project, configuration) ⇒ Object



26
27
28
# File 'lib/xcpretty/formatters/simple.rb', line 26

def format_clean_target(target, project, configuration)
  format("Cleaning", "#{project}/#{target} [#{configuration}]")
end

#format_codesign(file) ⇒ Object



86
87
88
# File 'lib/xcpretty/formatters/simple.rb', line 86

def format_codesign(file)
  format("Signing", file)
end

#format_compile(file_name, file_path) ⇒ Object



30
31
32
# File 'lib/xcpretty/formatters/simple.rb', line 30

def format_compile(file_name, file_path)
  format("Compiling", file_name)
end

#format_compile_error(file, file_path, reason, line, cursor) ⇒ Object



50
51
52
# File 'lib/xcpretty/formatters/simple.rb', line 50

def format_compile_error(file, file_path, reason, line, cursor)
  "\n#{file_path}: #{red(reason)}\n\n#{line}\n#{cyan(cursor)}\n\n"
end

#format_compile_xib(file_name, file_path) ⇒ Object



34
35
36
# File 'lib/xcpretty/formatters/simple.rb', line 34

def format_compile_xib(file_name, file_path)
  format("Compiling", file_name)
end

#format_copy_strings_file(file) ⇒ Object



38
39
40
# File 'lib/xcpretty/formatters/simple.rb', line 38

def format_copy_strings_file(file)
  format("Copying", file)
end

#format_cpresource(resource) ⇒ Object



42
43
44
# File 'lib/xcpretty/formatters/simple.rb', line 42

def format_cpresource(resource)
  format("Copying", resource)
end

#format_error(message) ⇒ Object



46
47
48
# File 'lib/xcpretty/formatters/simple.rb', line 46

def format_error(message)
  status_symbol(:error) + " " + red(message)
end

#format_failing_test(suite, test_case, reason, file) ⇒ Object



66
67
68
# File 'lib/xcpretty/formatters/simple.rb', line 66

def format_failing_test(suite, test_case, reason, file)
  format_test("#{test_case}, #{reason}", false)
end

#format_generate_dsym(dsym) ⇒ Object



54
55
56
# File 'lib/xcpretty/formatters/simple.rb', line 54

def format_generate_dsym(dsym)
  format("Generating '#{dsym}'")
end

#format_libtool(library) ⇒ Object



58
59
60
# File 'lib/xcpretty/formatters/simple.rb', line 58

def format_libtool(library)
  format("Building library", library)
end

#format_linking(target, build_variants, arch) ⇒ Object



62
63
64
# File 'lib/xcpretty/formatters/simple.rb', line 62

def format_linking(target, build_variants, arch)
  format("Linking", target)
end

#format_passing_test(suite, test_case, time) ⇒ Object



70
71
72
# File 'lib/xcpretty/formatters/simple.rb', line 70

def format_passing_test(suite, test_case, time)
  format_test("#{test_case} (#{time} seconds)")
end

#format_pbxcp(file) ⇒ Object



94
95
96
# File 'lib/xcpretty/formatters/simple.rb', line 94

def format_pbxcp(file)
  format("Copying", file)
end

#format_phase_script_execution(script_name) ⇒ Object



74
75
76
# File 'lib/xcpretty/formatters/simple.rb', line 74

def format_phase_script_execution(script_name)
  format("Running script", "'#{script_name}'")
end

#format_preprocess(file) ⇒ Object



90
91
92
# File 'lib/xcpretty/formatters/simple.rb', line 90

def format_preprocess(file)
  format("Preprocessing", file)
end

#format_process_info_plist(file_name, file_path) ⇒ Object



78
79
80
# File 'lib/xcpretty/formatters/simple.rb', line 78

def format_process_info_plist(file_name, file_path)
  format("Processing", file_name)
end

#format_process_pch(file) ⇒ Object



82
83
84
# File 'lib/xcpretty/formatters/simple.rb', line 82

def format_process_pch(file)
  format("Precompiling", file)
end

#format_test_run_started(name) ⇒ Object



98
99
100
# File 'lib/xcpretty/formatters/simple.rb', line 98

def format_test_run_started(name)
  heading("Test Suite", name, "started")
end

#format_test_suite_started(name) ⇒ Object



102
103
104
# File 'lib/xcpretty/formatters/simple.rb', line 102

def format_test_suite_started(name)
  heading("", name, "")
end