xcpretty-bb 0.1.12.bb3 → 0.1.12.bb4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a478924a7e77d955cfd050a439f93afd9914d9a0
4
- data.tar.gz: 156e3a474b751c146144b76adf4c9b2463410679
3
+ metadata.gz: 48165ab74fa10573e1ab84d4e9130f13f8f6940d
4
+ data.tar.gz: 7d24fe784c594f4d86ba1289a1bae7982a72ef0a
5
5
  SHA512:
6
- metadata.gz: 60a8cdad35465d760fd91d5b883e52fc33b50bf2f956d4e8450f238b9ae4863617f4b380fbba00449271c3d892f2b10b17608fcaa47d756b9b762be9c13c9eec
7
- data.tar.gz: 596ca0fdd3d232105ffc1681db794bfb150376bf1fb6dbdb9cdc084dae75f38aae43deff27595125fb25a471f1b2096111a0e09a72519c834bd915f5b367a6e1
6
+ metadata.gz: 82ca034935f7dbd1ea470d3b02a81bf0b1b2f225ca189ec0114f85344be4db09ff6a96df4538e13c047f3860ed483cbf4a76f256a6fbea0f40c425eb03211658
7
+ data.tar.gz: 7c9d978b128d66c22a4d7b9524a55bdcbffd0add6dfa98c4b37953dede44f4a348253c80bfc8a325a0d3dfa99133d82d3c3430f53ad459c250613c6dacf5a7b9
@@ -19,6 +19,7 @@ module XCPretty
19
19
  def format_compile(file_name, file_path); EMPTY; end
20
20
  def format_compile_command(compiler_command, file_path); EMPTY; end
21
21
  def format_compile_storyboard(file_name, file_path); EMPTY; end
22
+ def format_compile_storyboard_error(file_name, error); EMPTY; end
22
23
  def format_compile_xib(file_name, file_path); EMPTY; end
23
24
  def format_copy_header_file(source, target); EMPTY; end
24
25
  def format_copy_plist_file(source, target); EMPTY; end
@@ -116,8 +117,8 @@ module XCPretty
116
117
  end
117
118
 
118
119
  def format_phase_script_error(error, output)
119
- indentedOutput = output.join(" ");
120
- "\n#{red(error_symbol + " ")}#{error}: #{red(indentedOutput)}\n\n"
120
+ indented_output = output.join(" ")
121
+ "\n#{red(error_symbol + " ")}#{error}: #{red(indented_output)}\n\n"
121
122
  end
122
123
 
123
124
  def format_compile_error(file, file_path, reason, line, cursor)
@@ -125,6 +126,10 @@ module XCPretty
125
126
  "#{line}\n#{cyan(cursor)}\n\n"
126
127
  end
127
128
 
129
+ def format_compile_storyboard_error(file_name, error)
130
+ format_error(file_name + ": " + error)
131
+ end
132
+
128
133
  def format_file_missing_error(reason, file_path)
129
134
  "\n#{red(error_symbol + " " + reason)} #{file_path}\n\n"
130
135
  end
@@ -180,7 +180,7 @@ module XCPretty
180
180
  module PhaseScript
181
181
  # @regex Captured groups
182
182
  # $1 = phase_details
183
- PHASE_SCRIPT_EXECUTION_MATCHER = /^PhaseScriptExecution\s(.*)\s/
183
+ PHASE_SCRIPT_EXECUTION_MATCHER = /^PhaseScriptExecution\s(.*)/
184
184
 
185
185
  # @regex Captured groups
186
186
  # $1 = file not found
@@ -255,6 +255,11 @@ module XCPretty
255
255
  # $1 reason
256
256
  LINKER_UNDEFINED_SYMBOLS_MATCHER = /^(Undefined symbols for architecture .*):$/
257
257
 
258
+ # @regex Captured groups
259
+ # $1 storyboard
260
+ # $2 error
261
+ COMPILE_STORYBOARD_ERROR_MATCHER = /([^\/]*\.storyboard).*:\serror:\s(.*)$/
262
+
258
263
  # @regex Captured groups
259
264
  # $1 reason
260
265
  PODS_ERROR_MATCHER = /^(error:\s.*)/
@@ -262,6 +267,9 @@ module XCPretty
262
267
  # @regex Captured groups
263
268
  # $1 = reference
264
269
  SYMBOL_REFERENCED_FROM_MATCHER = /\s+"(.*)", referenced from:$/
270
+
271
+ # @regex Captured groups
272
+ GENERIC_ERROR_MATCHER = /error:\s(.*)$/
265
273
  end
266
274
  end
267
275
 
@@ -321,6 +329,8 @@ module XCPretty
321
329
  formatter.format_compile_xib($2, $1)
322
330
  when COMPILE_STORYBOARD_MATCHER
323
331
  formatter.format_compile_storyboard($2, $1)
332
+ when COMPILE_STORYBOARD_ERROR_MATCHER
333
+ formatter.format_compile_storyboard_error($1, $2)
324
334
  when COPY_HEADER_MATCHER
325
335
  formatter.format_copy_header_file($1, $2)
326
336
  when COPY_PLIST_MATCHER
@@ -385,6 +395,8 @@ module XCPretty
385
395
  formatter.format_shell_command($1, $2)
386
396
  when GENERIC_WARNING_MATCHER
387
397
  formatter.format_warning($1)
398
+ when GENERIC_ERROR_MATCHER
399
+ formatter.format_error($1)
388
400
  else
389
401
  ""
390
402
  end
@@ -394,18 +406,18 @@ module XCPretty
394
406
 
395
407
  def update_phase_script_state(text)
396
408
  case text
397
- when PHASE_SCRIPT_EXECUTION_MATCHER
398
- @current_phase_script_output = [text]
399
- when PHASE_SCRIPT_COMMAND_FAILED_MATCHER, PHASE_SCRIPT_NO_SUCH_FILE_OR_DIRECTORY_MATCHER
400
- unless @current_phase_script_output.nil?
401
- @current_phase_script_output << text
402
- current_phase_script_failure[:output] = @current_phase_script_output
403
- current_phase_script_failure[:error] = text
404
- end
405
- else
406
- unless @current_phase_script_output.nil?
407
- @current_phase_script_output << text
408
- end
409
+ when PHASE_SCRIPT_EXECUTION_MATCHER
410
+ @current_phase_script_output = [text]
411
+ when PHASE_SCRIPT_COMMAND_FAILED_MATCHER, PHASE_SCRIPT_NO_SUCH_FILE_OR_DIRECTORY_MATCHER
412
+ unless @current_phase_script_output.nil?
413
+ @current_phase_script_output << text
414
+ current_phase_script_failure[:output] = @current_phase_script_output
415
+ current_phase_script_failure[:error] = text
416
+ end
417
+ else
418
+ unless @current_phase_script_output.nil?
419
+ @current_phase_script_output << text
420
+ end
409
421
  end
410
422
  end
411
423
 
@@ -1,4 +1,4 @@
1
1
  module XCPretty
2
- VERSION = "0.1.12.bb3"
2
+ VERSION = "0.1.12.bb4"
3
3
  end
4
4
 
@@ -127,6 +127,12 @@ TiffUtil eye_icon.tiff
127
127
  cd /Users/musalj/code/OSS/Alcatraz
128
128
  /usr/bin/tiffutil -cathidpicheck /Users/musalj/code/OSS/Alcatraz/Alcatraz/eye_icon@2x.png /Users/musalj/code/OSS/Alcatraz/Alcatraz/eye_icon.png -out /Users/musalj/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin/Contents/Resources/eye_icon.tiff
129
129
  )
130
+ SAMPLE_RUN_SCRIPT_ERROR = %Q(
131
+ PhaseScriptExecution Run\\ Script DerivedData/Build/Intermediates/Blah.build/Debug-iphonesimulator/Blah.build/Script-F07128051BCF177900851764.sh
132
+ cd /Users/blah/iosapps/test/iOS
133
+ /bin/sh -c /Users/blah/iosapps/test/iOS/DerivedData/Build/Intermediates/Blah.build/Debug-iphonesimulator/Blah.build/Script-F07128051BCF177900851764.sh
134
+ /bin/sh: blah: No such file or directory
135
+ )
130
136
  SAMPLE_RUN_SCRIPT = %Q(
131
137
  PhaseScriptExecution Check\\ Pods\\ Manifest.lock /Users/musalj/Library/Developer/Xcode/DerivedData/ObjectiveSugar-ayzdhqmmwtqgysdpznmovjlupqjy/Build/Intermediates/ObjectiveSugar.build/Debug-iphonesimulator/ObjectiveSugar.build/Script-468DABF301EC4EC1A00CC4C2.sh
132
138
  cd /Users/musalj/code/OSS/ObjectiveSugar/Example
@@ -461,6 +467,7 @@ PhaseScriptExecution Check\\ Pods\\ Manifest.lock /Users/musalj/Library/Develope
461
467
  setenv variant normal
462
468
  /bin/sh -c /Users/musalj/Library/Developer/Xcode/DerivedData/ObjectiveSugar-ayzdhqmmwtqgysdpznmovjlupqjy/Build/Intermediates/ObjectiveSugar.build/Debug-iphonesimulator/ObjectiveSugar.build/Script-468DABF301EC4EC1A00CC4C2.sh
463
469
  )
470
+
464
471
  SAMPLE_ANALYZE = %Q(
465
472
  Analyze CocoaChip/CCChip8DisplayView.m
466
473
  cd /Users/dustin/Source/CocoaChip
@@ -485,6 +492,9 @@ CompileStoryboard sample/Main.storyboard
485
492
  export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
486
493
  /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --target-device iphone --target-device ipad --errors --warnings --notices --module sample --minimum-deployment-target 7.0 --output-partial-info-plist /Users/chipp/Library/Developer/Xcode/DerivedData/sample-etjztiverddwaddrudeteewjzfxw/Build/Intermediates/ArchiveIntermediates/sample/IntermediateBuildFilesPath/sample.build/Release-iphoneos/sample.build/SJMetroPickerStoryboard-SBPartialInfo.plist --auto-activate-custom-fonts --output-format human-readable-text --compilation-directory /Users/chipp/Library/Developer/Xcode/DerivedData/sample-etjztiverddwaddrudeteewjzfxw/Build/Intermediates/ArchiveIntermediates/sample/InstallationBuildProductsLocation/Applications/sample.app /Users/chipp/Developer/sample/sample/Main.storyboard
487
494
  )
495
+ SAMPLE_COMPILE_STORYBOARD_ERROR = %Q(
496
+ /Users/blah/iosapps/test/blah-Blah-ios/Blah/Resources/Views/LaunchScreen.storyboard: error: Line 11: error parsing attribute name
497
+ )
488
498
  SAMPLE_CODESIGN = %Q(
489
499
  CodeSign build/Release/CocoaChip.app
490
500
  cd /Users/dustin/Source/CocoaChip
@@ -120,7 +120,7 @@ module XCPretty
120
120
 
121
121
  it "formats Phase Script Execution" do
122
122
  @formatter.format_phase_script_execution("Check Pods Manifest.lock").should ==
123
- "> Running script 'Check Pods Manifest.lock'"
123
+ "> Running phase 'Check Pods Manifest.lock'"
124
124
  end
125
125
 
126
126
  it "formats precompiling output" do
@@ -111,6 +111,11 @@ module XCPretty
111
111
  @parser.parse(SAMPLE_COMPILE_STORYBOARD)
112
112
  end
113
113
 
114
+ it "parses compiling storyboard errors" do
115
+ @formatter.should receive(:format_compile_storyboard_error).with("LaunchScreen.storyboard", "Line 11: error parsing attribute name")
116
+ @parser.parse(SAMPLE_COMPILE_STORYBOARD_ERROR)
117
+ end
118
+
114
119
  it 'parses CopyPlistFile' do
115
120
  @formatter.should receive(:format_copy_plist_file).with(
116
121
  '/path/to/Some.plist', '/some other/File.plist')
@@ -214,10 +219,23 @@ module XCPretty
214
219
  end
215
220
 
216
221
  it "parses PhaseScriptExecution" do
217
- @formatter.should receive(:format_phase_script_execution).with('Check Pods Manifest.lock')
222
+ @formatter.should receive(:format_phase_script_execution).with('Check Pods Manifest.lock /Users/musalj/Library/Developer/Xcode/DerivedData/ObjectiveSugar-ayzdhqmmwtqgysdpznmovjlupqjy/Build/Intermediates/ObjectiveSugar.build/Debug-iphonesimulator/ObjectiveSugar.build/Script-468DABF301EC4EC1A00CC4C2.sh')
218
223
  @parser.parse(SAMPLE_RUN_SCRIPT)
219
224
  end
220
225
 
226
+ it "parses PhaseScriptExecution Error" do
227
+ @formatter.should receive(:format_phase_script_execution).with('Run Script DerivedData/Build/Intermediates/Blah.build/Debug-iphonesimulator/Blah.build/Script-F07128051BCF177900851764.sh')
228
+ @formatter.should receive(:format_phase_script_error).with('/bin/sh: blah: No such file or directory',
229
+ ['PhaseScriptExecution Run\\ Script DerivedData/Build/Intermediates/Blah.build/Debug-iphonesimulator/Blah.build/Script-F07128051BCF177900851764.sh',
230
+ 'cd /Users/blah/iosapps/test/iOS',
231
+ '/bin/sh -c /Users/blah/iosapps/test/iOS/DerivedData/Build/Intermediates/Blah.build/Debug-iphonesimulator/Blah.build/Script-F07128051BCF177900851764.sh',
232
+ '/bin/sh: blah: No such file or directory'])
233
+
234
+ SAMPLE_RUN_SCRIPT_ERROR.each_line do |line|
235
+ @parser.parse(line.chomp)
236
+ end
237
+ end
238
+
221
239
  it "parses process PCH" do
222
240
  @formatter.should receive(:format_process_pch).with("Pods-CocoaLumberjack-prefix.pch")
223
241
  @parser.parse(SAMPLE_PRECOMPILE)
@@ -448,6 +466,11 @@ module XCPretty
448
466
  @formatter.should_not receive(:format_compile_error)
449
467
  @parser.parse("hohohoooo")
450
468
  end
469
+
470
+ it 'parses generic errors' do
471
+ @formatter.should receive(:format_error).with("Hi there. I'm a really nasty error. Can you fix me")
472
+ @parser.parse(" error: Hi there. I'm a really nasty error. Can you fix me")
473
+ end
451
474
  end
452
475
 
453
476
  context "warnings" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcpretty-bb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12.bb3
4
+ version: 0.1.12.bb4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marin Usalj
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-14 00:00:00.000000000 Z
12
+ date: 2015-10-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rouge