xcpretty 0.1.12 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.hound.yml +2 -10
  3. data/.rubocop.yml +239 -0
  4. data/.travis.yml +1 -8
  5. data/CHANGELOG.md +35 -0
  6. data/Gemfile +1 -0
  7. data/README.md +23 -76
  8. data/Rakefile +10 -8
  9. data/bin/xcpretty +14 -14
  10. data/features/simple_format.feature +39 -17
  11. data/features/steps/formatting_steps.rb +33 -4
  12. data/features/steps/html_steps.rb +1 -0
  13. data/features/steps/json_steps.rb +2 -1
  14. data/features/steps/junit_steps.rb +4 -3
  15. data/features/steps/report_steps.rb +1 -0
  16. data/features/support/env.rb +4 -3
  17. data/features/test_format.feature +4 -4
  18. data/lib/xcpretty/ansi.rb +14 -13
  19. data/lib/xcpretty/formatters/formatter.rb +24 -8
  20. data/lib/xcpretty/formatters/knock.rb +2 -1
  21. data/lib/xcpretty/formatters/rspec.rb +1 -0
  22. data/lib/xcpretty/formatters/simple.rb +18 -3
  23. data/lib/xcpretty/formatters/tap.rb +3 -2
  24. data/lib/xcpretty/parser.rb +38 -15
  25. data/lib/xcpretty/printer.rb +1 -0
  26. data/lib/xcpretty/reporters/html.rb +7 -5
  27. data/lib/xcpretty/reporters/json_compilation_database.rb +6 -10
  28. data/lib/xcpretty/reporters/junit.rb +6 -3
  29. data/lib/xcpretty/snippet.rb +0 -2
  30. data/lib/xcpretty/syntax.rb +38 -31
  31. data/lib/xcpretty/term.rb +14 -0
  32. data/lib/xcpretty/version.rb +2 -1
  33. data/lib/xcpretty.rb +5 -6
  34. data/spec/fixtures/constants.rb +15 -2
  35. data/spec/fixtures/custom_formatter.rb +2 -1
  36. data/spec/spec_helper.rb +2 -1
  37. data/spec/support/matchers/colors.rb +1 -0
  38. data/spec/xcpretty/ansi_spec.rb +1 -0
  39. data/spec/xcpretty/formatters/formatter_spec.rb +27 -16
  40. data/spec/xcpretty/formatters/rspec_spec.rb +1 -0
  41. data/spec/xcpretty/formatters/simple_spec.rb +22 -3
  42. data/spec/xcpretty/parser_spec.rb +39 -10
  43. data/spec/xcpretty/printer_spec.rb +15 -13
  44. data/spec/xcpretty/syntax_spec.rb +24 -48
  45. data/spec/xcpretty/term_spec.rb +26 -0
  46. data/xcpretty.gemspec +15 -11
  47. metadata +42 -14
  48. data/vendor/json_pure/COPYING +0 -57
  49. data/vendor/json_pure/LICENSE +0 -340
  50. data/vendor/json_pure/generator.rb +0 -443
  51. data/vendor/json_pure/parser.rb +0 -364
@@ -2,19 +2,29 @@ Feature: Showing build output in simple format
2
2
 
3
3
  Scenario: Showing file compilation
4
4
  Given I have a file to compile
5
- When I pipe to xcpretty with "--simple"
5
+ When I pipe to xcpretty with "--simple --no-color"
6
6
  Then I should see a successful compilation message
7
7
 
8
8
  Scenario: Showing xib compilation
9
9
  Given I have a xib to compile
10
+ When I pipe to xcpretty with "--simple --no-color"
11
+ Then I should see a successful compilation message
12
+
13
+ Scenario: Showing storyboard compilation
14
+ Given I have a storyboard to compile
10
15
  When I pipe to xcpretty with "--simple"
11
16
  Then I should see a successful compilation message
12
17
 
13
18
  Scenario: Showing precompilation
14
19
  Given I have a precompiled header
15
- When I pipe to xcpretty with "--simple"
20
+ When I pipe to xcpretty with "--simple --no-color"
16
21
  Then I should see a successful precompilation message
17
22
 
23
+ Scenario: Showing phase success
24
+ Given I have completed a build
25
+ When I pipe to xcpretty with "--simple"
26
+ Then I should see a "build" completion message
27
+
18
28
  Scenario: Showing file compilation with color
19
29
  Given I have a file to compile
20
30
  When I pipe to xcpretty with "--simple --color"
@@ -25,6 +35,11 @@ Feature: Showing build output in simple format
25
35
  When I pipe to xcpretty with "--simple --color"
26
36
  Then I should see a yellow completion icon
27
37
 
38
+ Scenario: Showing storyboard compilation with color
39
+ Given I have a storyboard to compile
40
+ When I pipe to xcpretty with "--simple --color"
41
+ Then I should see a yellow completion icon
42
+
28
43
  Scenario: Showing precompilation
29
44
  Given I have a precompiled header
30
45
  When I pipe to xcpretty with "--simple --color"
@@ -32,22 +47,22 @@ Feature: Showing build output in simple format
32
47
 
33
48
  Scenario: Showing analyze
34
49
  Given I have a file to analyze
35
- When I pipe to xcpretty with "--simple"
50
+ When I pipe to xcpretty with "--simple --no-color"
36
51
  Then I should see a successful analyze message
37
52
 
38
53
  Scenario: Showing shallow analyze
39
54
  Given I have a file to shallow analyze
40
- When I pipe to xcpretty with "--simple"
55
+ When I pipe to xcpretty with "--simple --no-color"
41
56
  Then I should see a successful analyze message
42
57
 
43
58
  Scenario: Showing tiff file validation
44
59
  Given I have a tiff file to validate
45
- When I pipe to xcpretty with "--simple"
60
+ When I pipe to xcpretty with "--simple --no-color"
46
61
  Then I should see a successful tiff validation message
47
62
 
48
63
  Scenario: Showing touch file
49
64
  Given I have a file to touch
50
- When I pipe to xcpretty with "--simple"
65
+ When I pipe to xcpretty with "--simple --no-color"
51
66
  Then I should see a successful touch message
52
67
 
53
68
  Scenario: Showing analyze with color
@@ -72,29 +87,29 @@ Feature: Showing build output in simple format
72
87
 
73
88
  Scenario: Showing the start of a test run
74
89
  Given the tests have started running
75
- When I pipe to xcpretty with "--simple"
90
+ When I pipe to xcpretty with "--simple --no-color"
76
91
  Then I should see that test suite has started
77
92
 
78
93
  Scenario: Showing the start of a test suite
79
94
  Given I start a test suite
80
- When I pipe to xcpretty with "--simple"
95
+ When I pipe to xcpretty with "--simple --no-color"
81
96
  Then I should see the name of suite only
82
97
 
83
98
  Scenario: Showing the end of a test suite
84
99
  Given the test suite has finished
85
- When I pipe to xcpretty with "--simple"
100
+ When I pipe to xcpretty with "--simple --no-color"
86
101
  Then I should see that the test suite finished
87
102
 
88
103
  Scenario: Showing failed test output
89
104
  Given I have a failing test in my suite
90
105
  And the test suite has finished
91
- When I pipe to xcpretty with "--simple"
106
+ When I pipe to xcpretty with "--simple --no-color"
92
107
  Then I should see the name of a failed test
93
108
  And I should see the path of a failed test
94
109
 
95
110
  Scenario: Showing successful test output
96
111
  Given I have a passing test in my suite
97
- When I pipe to xcpretty with "--simple"
112
+ When I pipe to xcpretty with "--simple --no-color"
98
113
  Then I should see the name of a passing test
99
114
  And I should not see the name of the test group
100
115
  And I should not see the path of a passing test
@@ -111,12 +126,12 @@ Feature: Showing build output in simple format
111
126
 
112
127
  Scenario: Showing pending test output
113
128
  Given I have a pending test in my suite
114
- When I pipe to xcpretty with "--simple"
129
+ When I pipe to xcpretty with "--simple --no-color"
115
130
  Then I should see the name of a pending test
116
131
 
117
132
  Scenario: Showing measuring test output
118
133
  Given I have a measuring test in my suite
119
- When I pipe to xcpretty with "--simple"
134
+ When I pipe to xcpretty with "--simple --no-color"
120
135
  Then I should see the name of a measuring test
121
136
 
122
137
  Scenario: Showing failed test output with color
@@ -139,28 +154,35 @@ Feature: Showing build output in simple format
139
154
 
140
155
  Scenario: Showing code signing
141
156
  Given I have a file to code sign
142
- When I pipe to xcpretty with "--simple"
157
+ When I pipe to xcpretty with "--simple --no-color"
143
158
  Then I should see a successful code signing message
144
159
 
145
160
  Scenario: Showing code signing a framework
146
161
  Given I have a framework to code sign
147
- When I pipe to xcpretty with "--simple"
162
+ When I pipe to xcpretty with "--simple --no-color"
148
163
  Then I should see a successful code signing message
149
164
 
150
165
  Scenario: Showing preprocess
151
166
  Given I have a file to preprocess
152
- When I pipe to xcpretty with "--simple"
167
+ When I pipe to xcpretty with "--simple --no-color"
153
168
  Then I should see a successful preprocessing message
154
169
 
155
170
  Scenario: Showing a PBXCp copy
156
171
  Given I have a file to copy with PBXCp
157
- When I pipe to xcpretty with "--simple"
172
+ When I pipe to xcpretty with "--simple --no-color"
158
173
  Then I should see a successful copying message
159
174
 
160
175
  Scenario: Build fails when Pod install hasn't been run
161
176
  Given podfile.lock wasn't in sync
162
177
  When I pipe to xcpretty with "--simple --color"
163
178
  Then I should see a red error message
179
+ And I should see that sandbox is not in sync with Podfile.lock
180
+
181
+ Scenario: Compilation fails because missing files in the project
182
+ Given there was a missing file
183
+ When I pipe to xcpretty with "--simple --color"
184
+ Then I should see a red error message
185
+ And I should see which file is missing
164
186
 
165
187
  Scenario: Compilation fails because of syntax errors
166
188
  Given there was a syntax error
@@ -7,6 +7,10 @@ Given(/^I have a xib to compile$/) do
7
7
  add_run_input SAMPLE_COMPILE_XIB
8
8
  end
9
9
 
10
+ Given(/^I have a storyboard to compile$/) do
11
+ add_run_input SAMPLE_COMPILE_STORYBOARD
12
+ end
13
+
10
14
  Given(/^I have a precompiled header$/) do
11
15
  add_run_input SAMPLE_PRECOMPILE
12
16
  end
@@ -76,6 +80,10 @@ Given(/^there was a syntax error$/) do
76
80
  add_run_input SAMPLE_COMPILE_ERROR
77
81
  end
78
82
 
83
+ Given(/^there was a missing file$/) do
84
+ add_run_input SAMPLE_FILE_MISSING_ERROR
85
+ end
86
+
79
87
  Given(/^there were warnings in the code$/) do
80
88
  add_run_input SAMPLE_FORMAT_WARNING
81
89
  end
@@ -108,12 +116,24 @@ Given(/^I have an unrelated image in the output folder/) do
108
116
  copy_file_to_screenshot_dir(SAMPLE_UNRELATED_IMAGE_FILE)
109
117
  end
110
118
 
119
+ Given(/^I have completed a build$/) do
120
+ add_run_input SAMPLE_BUILD_SUCCEEDED
121
+ end
122
+
123
+ Given(/^I have completed a clean$/) do
124
+ add_run_input SAMPLE_CLEAN_SUCCEEDED
125
+ end
126
+
127
+ Then(/^I should see a "(\w+)" completion message$/) do |phase|
128
+ run_output.should start_with("▸ #{phase.capitalize} Succeeded")
129
+ end
130
+
111
131
  Then(/^I should see text beginning with "(.*?)"$/) do |text|
112
- run_output.lines.to_a.detect {|line| line.start_with? text }.should_not be_nil
132
+ run_output.lines.to_a.detect { |line| line.start_with? text }.should_not be_nil
113
133
  end
114
134
 
115
135
  Then(/^I should see text containing "(.*?)" and beginning with "(.*?)"$/) do |inner, start|
116
- run_output.lines.to_a.detect {|line| line.start_with?(start) && line.include?(inner)}.should_not be_nil
136
+ run_output.lines.to_a.detect { |line| line.start_with?(start) && line.include?(inner) }.should_not be_nil
117
137
  end
118
138
 
119
139
  Then(/^I should (green|red) text beginning with "(.*?)"$/) do |color, text|
@@ -251,7 +271,15 @@ Then(/^I should not see the name of the test group$/) do
251
271
  end
252
272
 
253
273
  Then(/^I should see a red error message$/) do
254
- run_output.should include(red(" " + SAMPLE_PODS_ERROR.gsub('error: ', '')))
274
+ run_output.should include(red(" error: ")[0..-5]) # trim \e[0m
275
+ end
276
+
277
+ Then(/^I should see that sandbox is not in sync with Podfile.lock$/) do
278
+ run_output.should include("The sandbox is not in sync with the Podfile.lock")
279
+ end
280
+
281
+ Then(/^I should see which file is missing$/) do
282
+ run_output.should include(SAMPLE_FILE_MISSING_ERROR.split('directory: ')[1].delete("'"))
255
283
  end
256
284
 
257
285
  Then(/^I should see a yellow warning message$/) do
@@ -272,7 +300,7 @@ Then(/^I should see a cyan cursor$/) do
272
300
  end
273
301
 
274
302
  Then(/^I should see the undefined symbold message$/) do
275
- run_output.should include(red(" Undefined symbols for architecture x86_64"))
303
+ run_output.should include(red(" Undefined symbols for architecture x86_64"))
276
304
  end
277
305
 
278
306
  Then(/^I should see the symbol and reference that caused failure$/) do
@@ -299,3 +327,4 @@ end
299
327
  Then(/^I should see text matching "(.*?)"$/) do |text|
300
328
  run_output.lines.to_a.last.strip.should == text
301
329
  end
330
+
@@ -29,3 +29,4 @@ end
29
29
  Then(/^I should not see a screenshot in HTML$/) do
30
30
  html_report_body.get_elements("//*[contains(@class, 'screenshot')]/").to_a.size.should == 0
31
31
  end
32
+
@@ -31,6 +31,7 @@ Then(/^the JSON compilation database should contain an entry with a directory$/)
31
31
  end
32
32
 
33
33
  Then(/^the JSON compilation database should be complete$/) do
34
- entries = json_db.select {|entry| entry['command'] && entry['file'] && entry['directory']}
34
+ entries = json_db.select { |entry| entry['command'] && entry['file'] && entry['directory'] }
35
35
  entries.length.should == JSON_DB_FIXTURE_COMMAND_COUNT
36
36
  end
37
+
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  Then(/^I should see a pending test node in my report$/) do
15
15
  junit_report_root.elements.to_a.detect do |node|
16
- node.elements.to_a.detect {|child| child.name == 'skipped'}
16
+ node.elements.to_a.detect { |child| child.name == 'skipped' }
17
17
  end.should_not be_nil
18
18
  end
19
19
 
@@ -23,16 +23,17 @@ end
23
23
 
24
24
  Then(/^I should see (\d+) tests in my report$/) do |test_count|
25
25
  junit_report_root.attributes["tests"].should == test_count
26
- junit_report_root.elements.to_a.count.should == test_count.to_i
26
+ junit_report_root.elements.to_a.size.should == test_count.to_i
27
27
  end
28
28
 
29
29
  Then(/^I should see (\d+) test suites$/) do |count|
30
30
  suites = junit_report.root.elements.to_a
31
31
  suites.size.should == count.to_i
32
- suites.select {|s| s.name == 'testsuite' }.size.should == count.to_i
32
+ suites.count { |s| s.name == 'testsuite' }.should == count.to_i
33
33
  end
34
34
 
35
35
  Then(/^I should have a test report at "(.*?)"$/) do |path|
36
36
  doc = REXML::Document.new(File.open(path, 'r').read)
37
37
  doc.root.should_not be_nil
38
38
  end
39
+
@@ -19,3 +19,4 @@ end
19
19
  Then(/^I should have a test report in a custom path$/) do
20
20
  step("I should have a test report at \"#{custom_report_path}\"")
21
21
  end
22
+
@@ -1,4 +1,4 @@
1
- $:.unshift File.expand_path('../../..', __FILE__)
1
+ $LOAD_PATH.unshift File.expand_path('../../..', __FILE__)
2
2
 
3
3
  require 'tempfile'
4
4
  require 'spec/fixtures/constants'
@@ -20,7 +20,7 @@ end
20
20
 
21
21
  include XCPretty::ANSI
22
22
 
23
- TEST_RUN_START_MATCHER = /Test Suite .+ started/
23
+ TEST_RUN_START_MATCHER = /Test Suite .+ started/
24
24
  TEST_SUITE_COMPLETION_MATCHER = /Executed \d+ tests, with \d+ failures \(\d+ unexpected\) in \d+\.\d+ \(\d+\.\d+\) seconds/
25
25
  TEST_SUITE_START_MATCHER = /[\w]*(Spec|Tests)$/
26
26
  TEST_PATH_MATCHER = %r{[\w/\-\s]+:\d+}
@@ -53,7 +53,7 @@ def run_output
53
53
  end
54
54
 
55
55
  def html_report
56
- @html_report ||= REXML::Document.new(File.open(XCPretty::HTML::FILEPATH, 'r').read.sub("<!DOCTYPE html>",""))
56
+ @html_report ||= REXML::Document.new(File.open(XCPretty::HTML::FILEPATH, 'r').read.sub("<!DOCTYPE html>", ""))
57
57
  end
58
58
 
59
59
  def html_report_body
@@ -114,3 +114,4 @@ After do
114
114
  FileUtils.rm_rf(XCPretty::JSONCompilationDatabase::FILE_PATH)
115
115
  File.delete(@screenshot_file_path) if @screenshot_file_path
116
116
  end
117
+
@@ -2,22 +2,22 @@ Feature: Showing RSpec-style test output
2
2
 
3
3
  Scenario: Showing failed tests
4
4
  Given I have a failing test in my suite
5
- When I pipe to xcpretty with "--test"
5
+ When I pipe to xcpretty with "--test --no-color"
6
6
  Then I should see a failed test icon
7
7
 
8
8
  Scenario: Showing passing tests
9
9
  Given I have a passing test in my suite
10
- When I pipe to xcpretty with "--test"
10
+ When I pipe to xcpretty with "--test --no-color"
11
11
  Then I should see a passing test icon in ASCII
12
12
 
13
13
  Scenario: Showing pending tests
14
14
  Given I have a pending test in my suite
15
- When I pipe to xcpretty with "--test"
15
+ When I pipe to xcpretty with "--test --no-color"
16
16
  Then I should see a pending test icon in ASCII
17
17
 
18
18
  Scenario: Showing measuring tests
19
19
  Given I have a measuring test in my suite
20
- When I pipe to xcpretty with "--test"
20
+ When I pipe to xcpretty with "--test --no-color"
21
21
  Then I should see a measuring test icon in ASCII
22
22
 
23
23
  Scenario: Showing some tests failed with color
data/lib/xcpretty/ansi.rb CHANGED
@@ -1,25 +1,25 @@
1
1
  module XCPretty
2
2
  module ANSI
3
-
3
+
4
4
  attr_accessor :colorize
5
5
 
6
6
  FORMATTED_MATCHER = %r{\e\[(\d+)[;]?(\d+)?m(.*)\e\[0m}
7
7
 
8
8
  EFFECT = {
9
- :reset => '0',
10
- :bold => '1',
11
- :underline => '4'
9
+ reset: '0',
10
+ bold: '1',
11
+ underline: '4'
12
12
  }
13
13
 
14
14
  COLORS = {
15
- :black => '30',
16
- :red => '31',
17
- :green => '32',
18
- :yellow => '33',
19
- :blue => '34',
20
- :cyan => '36',
21
- :white => '37',
22
- :plain => '39'
15
+ black: '30',
16
+ red: '31',
17
+ green: '32',
18
+ yellow: '33',
19
+ blue: '34',
20
+ cyan: '36',
21
+ white: '37',
22
+ plain: '39'
23
23
  }
24
24
 
25
25
  def colorize?
@@ -63,9 +63,10 @@ module XCPretty
63
63
 
64
64
  def ansi_parse(text, color, effect=nil)
65
65
  return text unless colorize?
66
- colors_code = COLORS[color] || ''
66
+ colors_code = COLORS[color] || ''
67
67
  effect_code = EFFECT[effect] ? ';' + EFFECT[effect] : ''
68
68
  "\e[#{colors_code}#{effect_code}m#{text}\e[#{EFFECT[:reset]}m"
69
69
  end
70
70
  end
71
71
  end
72
+
@@ -18,6 +18,7 @@ module XCPretty
18
18
  def format_clean_remove; EMPTY; end
19
19
  def format_compile(file_name, file_path); EMPTY; end
20
20
  def format_compile_command(compiler_command, file_path); EMPTY; end
21
+ def format_compile_storyboard(file_name, file_path); EMPTY; end
21
22
  def format_compile_xib(file_name, file_path); EMPTY; end
22
23
  def format_copy_header_file(source, target); EMPTY; end
23
24
  def format_copy_plist_file(source, target); EMPTY; end
@@ -32,6 +33,7 @@ module XCPretty
32
33
  def format_failing_test(suite, test, time, file_path); EMPTY; end
33
34
  def format_process_pch(file); EMPTY; end
34
35
  def format_process_pch_command(file_path); EMPTY; end
36
+ def format_phase_success(phase_name); EMPTY; end
35
37
  def format_phase_script_execution(script_name); EMPTY; end
36
38
  def format_process_info_plist(file_name, file_path); EMPTY; end
37
39
  def format_codesign(file); EMPTY; end
@@ -51,6 +53,7 @@ module XCPretty
51
53
  def format_compile_error(file_name, file_path, reason,
52
54
  line, cursor); EMPTY; end
53
55
  def format_error(message); EMPTY; end
56
+ def format_file_missing_error(error, file_path); EMPTY; end
54
57
  def format_undefined_symbols(message, symbol, reference); EMPTY; end
55
58
  def format_duplicate_symbols(message, file_paths); EMPTY; end
56
59
  def format_warning(message); message; end
@@ -91,13 +94,17 @@ module XCPretty
91
94
  # Will be printed by default. Override with '' if you don't want summary
92
95
  def format_test_summary(executed_message, failures_per_suite)
93
96
  failures = format_failures(failures_per_suite)
94
- final_message = failures.empty? ? green(executed_message) : red(executed_message)
97
+ if failures.empty?
98
+ final_message = green(executed_message)
99
+ else
100
+ final_message = red(executed_message)
101
+ end
95
102
 
96
103
  text = [failures, final_message].join("\n\n\n").strip
97
104
  "\n\n#{text}"
98
105
  end
99
106
 
100
- ERROR = ' '
107
+ ERROR = ' '
101
108
  ASCII_ERROR = '[x]'
102
109
 
103
110
  WARNING = '⚠️ '
@@ -108,23 +115,31 @@ module XCPretty
108
115
  end
109
116
 
110
117
  def format_compile_error(file, file_path, reason, line, cursor)
111
- "\n#{red(error_symbol + " ")}#{file_path}: #{red(reason)}\n\n" +
118
+ "\n#{red(error_symbol + " ")}#{file_path}: #{red(reason)}\n\n" \
112
119
  "#{line}\n#{cyan(cursor)}\n\n"
113
120
  end
114
121
 
122
+ def format_file_missing_error(reason, file_path)
123
+ "\n#{red(error_symbol + " " + reason)} #{file_path}\n\n"
124
+ end
125
+
115
126
  def format_compile_warning(file, file_path, reason, line, cursor)
116
- "\n#{yellow(warning_symbol + ' ')}#{file_path}: #{yellow(reason)}\n\n" +
127
+ "\n#{yellow(warning_symbol + ' ')}#{file_path}: #{yellow(reason)}\n\n" \
117
128
  "#{line}\n#{cyan(cursor)}\n\n"
118
129
  end
119
130
 
131
+ def format_ld_warning(reason)
132
+ "#{yellow(warning_symbol + ' ' + reason)}"
133
+ end
134
+
120
135
  def format_undefined_symbols(message, symbol, reference)
121
- "\n#{red(error_symbol + " " + message)}\n" +
122
- "> Symbol: #{symbol}\n" +
136
+ "\n#{red(error_symbol + " " + message)}\n" \
137
+ "> Symbol: #{symbol}\n" \
123
138
  "> Referenced from: #{reference}\n\n"
124
139
  end
125
140
 
126
141
  def format_duplicate_symbols(message, file_paths)
127
- "\n#{red(error_symbol + " " + message)}\n" +
142
+ "\n#{red(error_symbol + " " + message)}\n" \
128
143
  "> #{file_paths.map { |path| path.split('/').last }.join("\n> ")}\n"
129
144
  end
130
145
 
@@ -142,7 +157,7 @@ module XCPretty
142
157
  end
143
158
 
144
159
  def format_failure(f)
145
- " #{f[:test_case]}, #{red(f[:reason])}\n #{cyan(f[:file_path])}\n" +
160
+ " #{f[:test_case]}, #{red(f[:reason])}\n #{cyan(f[:file_path])}\n" \
146
161
  " ```\n" +
147
162
  Syntax.highlight(Snippet.from_filepath(f[:file_path])) +
148
163
  " ```"
@@ -158,3 +173,4 @@ module XCPretty
158
173
 
159
174
  end
160
175
  end
176
+
@@ -31,4 +31,5 @@ module XCPretty
31
31
 
32
32
  end
33
33
 
34
- end
34
+ end
35
+
@@ -30,3 +30,4 @@ module XCPretty
30
30
  end
31
31
 
32
32
  end
33
+
@@ -8,11 +8,11 @@ module XCPretty
8
8
  PASS = "✓"
9
9
  FAIL = "✗"
10
10
  PENDING = "⧖"
11
+ COMPLETION = "▸"
11
12
  MEASURE = '◷'
12
13
 
13
14
  ASCII_PASS = "."
14
15
  ASCII_FAIL = "x"
15
- COMPLETION = "▸"
16
16
  ASCII_PENDING = "P"
17
17
  ASCII_COMPLETION = ">"
18
18
  ASCII_MEASURE = 'T'
@@ -43,6 +43,10 @@ module XCPretty
43
43
  format("Compiling", file_name)
44
44
  end
45
45
 
46
+ def format_compile_storyboard(file_name, file_path)
47
+ format("Compiling", file_name)
48
+ end
49
+
46
50
  def format_copy_header_file(source, target)
47
51
  format("Copying", File.basename(source))
48
52
  end
@@ -76,7 +80,8 @@ module XCPretty
76
80
  end
77
81
 
78
82
  def format_passing_test(suite, test_case, time)
79
- INDENT + format_test("#{test_case} (#{colored_time(time)} seconds)", :pass)
83
+ INDENT + format_test("#{test_case} (#{colored_time(time)} seconds)",
84
+ :pass)
80
85
  end
81
86
 
82
87
  def format_pending_test(suite, test_case)
@@ -89,6 +94,10 @@ module XCPretty
89
94
  )
90
95
  end
91
96
 
97
+ def format_phase_success(phase_name)
98
+ format(phase_name.capitalize, "Succeeded")
99
+ end
100
+
92
101
  def format_phase_script_execution(script_name)
93
102
  format("Running script", "'#{script_name}'")
94
103
  end
@@ -133,6 +142,10 @@ module XCPretty
133
142
  INDENT + yellow(message)
134
143
  end
135
144
 
145
+ def format_check_dependencies
146
+ format('Check Dependencies')
147
+ end
148
+
136
149
  private
137
150
 
138
151
  def heading(prefix, text, description)
@@ -140,7 +153,8 @@ module XCPretty
140
153
  end
141
154
 
142
155
  def format(command, argument_text="", success=true)
143
- [status_symbol(success ? :completion : :fail), white(command), argument_text].join(" ").strip
156
+ symbol = status_symbol(success ? :completion : :fail)
157
+ [symbol, white(command), argument_text].join(" ").strip
144
158
  end
145
159
 
146
160
  def format_test(test_case, status)
@@ -179,3 +193,4 @@ module XCPretty
179
193
 
180
194
  end
181
195
  end
196
+
@@ -4,7 +4,7 @@ module XCPretty
4
4
 
5
5
  attr_reader :counter
6
6
 
7
- def initialize unicode, color
7
+ def initialize(unicode, color)
8
8
  super
9
9
  @counter = 0
10
10
  end
@@ -36,4 +36,5 @@ module XCPretty
36
36
  end
37
37
  end
38
38
 
39
- end
39
+ end
40
+