class XCPretty::Simple
Constants
- ASCII_COMPLETION
- ASCII_FAIL
- ASCII_MEASURE
- ASCII_PASS
- ASCII_PENDING
- COMPLETION
- FAIL
- INDENT
- MEASURE
- PASS
- PENDING
Public Instance Methods
format_aggregate_target(target, project, configuration)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 26 def format_build_target(target, project, configuration) format("Building", "#{project}/#{target} [#{configuration}]") end
format_check_dependencies()
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 149 def format_check_dependencies format('Check Dependencies') end
format_clean_target(target, project, configuration)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 38 def format_clean_target(target, project, configuration) format("Cleaning", "#{project}/#{target} [#{configuration}]") end
format_codesign(file)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 117 def format_codesign(file) format("Signing", file) end
format_compile(file_name, file_path)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 62 def format_copy_strings_file(file) format("Copying", file) end
format_cpresource(resource)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 66 def format_cpresource(resource) format("Copying", resource) end
format_failing_test(suite, test_case, reason, file)
click to toggle source
# 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)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 70 def format_generate_dsym(dsym) format("Generating '#{dsym}'") end
format_libtool(library)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 74 def format_libtool(library) format("Building library", library) end
format_linking(target, build_variants, arch)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 125 def format_pbxcp(file) format("Copying", file) end
format_pending_test(suite, test_case)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 101 def format_phase_success(phase_name) format(phase_name.capitalize, "Succeeded") end
format_preprocess(file)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 121 def format_preprocess(file) format("Preprocessing", file) end
format_process_info_plist(file_name, file_path)
click to toggle source
# 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)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 113 def format_process_pch(file) format("Precompiling", file) end
format_test_run_started(name)
click to toggle source
# 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)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 133 def format_test_suite_started(name) heading("", name, "") end
format_tiffutil(file_name)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 141 def format_tiffutil(file_name) format("Validating", file_name) end
format_touch(file_path, file_name)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 137 def format_touch(file_path, file_name) format("Touching", file_name) end
format_warning(message)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 145 def format_warning(message) INDENT + yellow(message) end
Private Instance Methods
colored_time(time)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 187 def colored_time(time) case time.to_f when 0..0.025 time when 0.026..0.100 yellow(time) else red(time) end end
format(command, argument_text="", success=true)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 159 def format(command, argument_text="", success=true) symbol = status_symbol(success ? :completion : :fail) [symbol, white(command), argument_text].join(" ").strip end
format_test(test_case, status)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 164 def format_test(test_case, status) [status_symbol(status), test_case].join(" ").strip end
heading(prefix, text, description)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 155 def heading(prefix, text, description) [prefix, white(text), description].join(" ").strip end
status_symbol(status)
click to toggle source
# File lib/xcpretty/formatters/simple.rb, line 168 def status_symbol(status) case status when :pass green(use_unicode? ? PASS : ASCII_PASS) when :fail red(use_unicode? ? FAIL : ASCII_FAIL) when :pending yellow(use_unicode? ? PENDING : ASCII_PENDING) when :error red(use_unicode? ? ERROR : ASCII_ERROR) when :completion yellow(use_unicode? ? COMPLETION : ASCII_COMPLETION) when :measure yellow(use_unicode? ? MEASURE : ASCII_MEASURE) else "" end end