Class: XCPretty::Simple

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

Constant Summary collapse

PASS =
""
FAIL =
""
PENDING =
""
COMPLETION =
""
MEASURE =
''
ASCII_PASS =
"."
ASCII_FAIL =
"x"
ASCII_PENDING =
"P"
ASCII_COMPLETION =
">"
ASCII_MEASURE =
'T'
INDENT =
"    "

Constants inherited from Formatter

Formatter::ASCII_ERROR, Formatter::ASCII_WARNING, Formatter::ERROR, Formatter::WARNING

Constants included from FormatMethods

FormatMethods::EMPTY

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

#finish, #format_compile_error, #format_compile_warning, #format_duplicate_symbols, #format_error, #format_file_missing_error, #format_ld_warning, #format_other, #format_test_summary, #format_undefined_symbols, #format_will_not_be_code_signed, #initialize, #optional_newline, #pretty_format, #use_unicode?

Methods included from FormatMethods

#format_clean, #format_clean_remove, #format_compile_command, #format_compile_error, #format_compile_warning, #format_duplicate_symbols, #format_error, #format_file_missing_error, #format_ld_warning, #format_other, #format_process_pch_command, #format_shell_command, #format_test_run_finished, #format_test_summary, #format_undefined_symbols, #format_write_auxiliary_files, #format_write_file

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_aggregate_target(target, project, configuration) ⇒ Object



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

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

#format_analyze(file_name, file_path) ⇒ Object



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

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

#format_analyze_target(target, project, configuration) ⇒ Object



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

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

#format_build_target(target, project, configuration) ⇒ Object



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

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

#format_check_dependenciesObject



149
150
151
# File 'lib/xcpretty/formatters/simple.rb', line 149

def format_check_dependencies
  format('Check Dependencies')
end

#format_clean_target(target, project, configuration) ⇒ Object



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

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

#format_codesign(file) ⇒ Object



117
118
119
# File 'lib/xcpretty/formatters/simple.rb', line 117

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

#format_compile(file_name, file_path) ⇒ Object



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

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

#format_compile_storyboard(file_name, file_path) ⇒ Object



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

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

#format_compile_xib(file_name, file_path) ⇒ Object



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

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

#format_copy_header_file(source, target) ⇒ Object



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

def format_copy_header_file(source, target)
  format("Copying", File.basename(source))
end

#format_copy_plist_file(source, target) ⇒ Object



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

def format_copy_plist_file(source, target)
  format("Copying", File.basename(source))
end

#format_copy_strings_file(file) ⇒ Object



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

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

#format_cpresource(resource) ⇒ Object



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

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

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



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

def format_failing_test(suite, test_case, reason, file)
  INDENT + format_test("#{test_case}, #{reason}", :fail)
end

#format_generate_dsym(dsym) ⇒ Object



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

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

#format_libtool(library) ⇒ Object



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

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

#format_linking(target, build_variants, arch) ⇒ Object



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

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

#format_measuring_test(suite, test_case, time) ⇒ Object



95
96
97
98
99
# File 'lib/xcpretty/formatters/simple.rb', line 95

def format_measuring_test(suite, test_case, time)
  INDENT + format_test(
    "#{test_case} measured (#{colored_time(time)} seconds)", :measure
  )
end

#format_passing_test(suite, test_case, time) ⇒ Object



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

def format_passing_test(suite, test_case, time)
  INDENT + format_test("#{test_case} (#{colored_time(time)} seconds)",
                       :pass)
end

#format_pbxcp(file) ⇒ Object



125
126
127
# File 'lib/xcpretty/formatters/simple.rb', line 125

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

#format_pending_test(suite, test_case) ⇒ Object



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

def format_pending_test(suite, test_case)
  INDENT + format_test("#{test_case} [PENDING]", :pending)
end

#format_phase_script_execution(script_name) ⇒ Object



105
106
107
# File 'lib/xcpretty/formatters/simple.rb', line 105

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

#format_phase_success(phase_name) ⇒ Object



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

def format_phase_success(phase_name)
  format(phase_name.capitalize, "Succeeded")
end

#format_preprocess(file) ⇒ Object



121
122
123
# File 'lib/xcpretty/formatters/simple.rb', line 121

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

#format_process_info_plist(file_name, file_path) ⇒ Object



109
110
111
# File 'lib/xcpretty/formatters/simple.rb', line 109

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

#format_process_pch(file) ⇒ Object



113
114
115
# File 'lib/xcpretty/formatters/simple.rb', line 113

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

#format_test_run_started(name) ⇒ Object



129
130
131
# File 'lib/xcpretty/formatters/simple.rb', line 129

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

#format_test_suite_started(name) ⇒ Object



133
134
135
# File 'lib/xcpretty/formatters/simple.rb', line 133

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

#format_tiffutil(file_name) ⇒ Object



141
142
143
# File 'lib/xcpretty/formatters/simple.rb', line 141

def format_tiffutil(file_name)
  format("Validating", file_name)
end

#format_touch(file_path, file_name) ⇒ Object



137
138
139
# File 'lib/xcpretty/formatters/simple.rb', line 137

def format_touch(file_path, file_name)
  format("Touching", file_name)
end

#format_warning(message) ⇒ Object



145
146
147
# File 'lib/xcpretty/formatters/simple.rb', line 145

def format_warning(message)
  INDENT + yellow(message)
end