lib/xcpretty/formatters/simple.rb in xcpretty-0.1.12 vs lib/xcpretty/formatters/simple.rb in xcpretty-0.2.0

- old
+ new

@@ -6,15 +6,15 @@ class Simple < Formatter PASS = "✓" FAIL = "✗" PENDING = "⧖" + COMPLETION = "▸" MEASURE = '◷' ASCII_PASS = "." ASCII_FAIL = "x" - COMPLETION = "▸" ASCII_PENDING = "P" ASCII_COMPLETION = ">" ASCII_MEASURE = 'T' INDENT = " " @@ -41,10 +41,14 @@ def format_compile_xib(file_name, file_path) format("Compiling", file_name) end + def format_compile_storyboard(file_name, file_path) + format("Compiling", file_name) + end + def format_copy_header_file(source, target) format("Copying", File.basename(source)) end def format_copy_plist_file(source, target) @@ -74,11 +78,12 @@ def format_failing_test(suite, test_case, reason, file) INDENT + format_test("#{test_case}, #{reason}", :fail) end def format_passing_test(suite, test_case, time) - INDENT + format_test("#{test_case} (#{colored_time(time)} seconds)", :pass) + INDENT + format_test("#{test_case} (#{colored_time(time)} seconds)", + :pass) end def format_pending_test(suite, test_case) INDENT + format_test("#{test_case} [PENDING]", :pending) end @@ -87,10 +92,14 @@ INDENT + format_test( "#{test_case} measured (#{colored_time(time)} seconds)", :measure ) end + def format_phase_success(phase_name) + format(phase_name.capitalize, "Succeeded") + end + def format_phase_script_execution(script_name) format("Running script", "'#{script_name}'") end def format_process_info_plist(file_name, file_path) @@ -131,18 +140,23 @@ def format_warning(message) INDENT + yellow(message) end + def format_check_dependencies + format('Check Dependencies') + end + private def heading(prefix, text, description) [prefix, white(text), description].join(" ").strip end def format(command, argument_text="", success=true) - [status_symbol(success ? :completion : :fail), white(command), argument_text].join(" ").strip + symbol = status_symbol(success ? :completion : :fail) + [symbol, white(command), argument_text].join(" ").strip end def format_test(test_case, status) [status_symbol(status), test_case].join(" ").strip end @@ -177,5 +191,6 @@ end end end end +