xcpretty 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cbb8fbc6280ad5d7fdfba29fe7f9b69d0e079133
4
- data.tar.gz: 394e1ef6f6f488b659e0364c15c2f554b4dccc61
3
+ metadata.gz: 6059730a79aa8637f3e4125e42d048f480439450
4
+ data.tar.gz: ed84469a746cef435bd094a967e5462d9f7c17ad
5
5
  SHA512:
6
- metadata.gz: 9004708350e44edb04f20797ceb471541e737e4ecb480cf38639c7fb1eb56841c877d46e6752e4e8dfd663460ec73d59211ce456c11e3650974d59107fa13c11
7
- data.tar.gz: f37ddf3eac02d7f87f0c41070232a1448edde7b973834f4930ed50ecc6fa424f4442775416481ad179689edfa466281216bcfff190df3f11ff1b4a4338d4beaa
6
+ metadata.gz: 43cf2b910a3e9c0b59e4b28e6d16a297962ba8dc50e52c58beae023604970e5b9d9be8e58eeac6840e8d8532c41710e9e5b6869b0b192b4f01dfad9d118a9f6e
7
+ data.tar.gz: c87cc661a69527f62b1e3aec2fc47fdc84f1fc0fbb4ac566239d01f50e35be2ba52a6d41587befe12f2020e9dd6bb903464fc633ae8fe22182e5a1243e41824b
data/.hound.yml CHANGED
@@ -4,3 +4,7 @@ StringLiterals:
4
4
  Lint/UnusedMethodArgument:
5
5
  Description: 'Checks for unused method arguments.'
6
6
  Enabled: false
7
+
8
+ Style/HashSyntax:
9
+ Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => 1, :b => 2 }.'
10
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## master
4
+
5
+ ###### Enhancements
6
+
7
+ * Added support for Analyzing target output
8
+ | [Cédric Luthi](https://github.com/0xced)
9
+ | [#146](https://github.com/supermarin/xcpretty/pull/146)
10
+
11
+ * Improved logging of `ld` error messages
12
+ | [Felix Krause](https://github.com/KrauseFx)
13
+ | [#153](https://github.com/supermarin/xcpretty/pull/153)
14
+
3
15
  ## 0.1.10
4
16
 
5
17
  ###### Enhancements
@@ -9,55 +9,56 @@ module XCPretty
9
9
  module FormatMethods
10
10
  EMPTY = ''.freeze
11
11
 
12
- def format_analyze(file_name, file_path); EMPTY; end
13
- def format_build_target(target, project, configuration); EMPTY; end
14
- def format_check_dependencies; EMPTY; end
15
- def format_clean(project, target, configuration); EMPTY; end
16
- def format_clean_target(target, project, configuration); EMPTY; end
17
- def format_clean_remove; EMPTY; end
18
- def format_compile(file_name, file_path); EMPTY; end
19
- def format_compile_command(compiler_command, file_path); EMPTY; end
20
- def format_compile_xib(file_name, file_path); EMPTY; end
21
- def format_copy_header_file(source, target); EMPTY; end
22
- def format_copy_plist_file(source, target); EMPTY; end
23
- def format_copy_strings_file(file_name); EMPTY; end
24
- def format_cpresource(file); EMPTY; end
25
- def format_generate_dsym(dsym); EMPTY; end
26
- def format_linking(file, build_variant, arch); EMPTY; end
27
- def format_libtool(library); EMPTY; end
28
- def format_passing_test(suite, test, time); EMPTY; end
29
- def format_pending_test(suite, test); EMPTY; end
30
- def format_measuring_test(suite, test, time); EMPTY; end
31
- def format_failing_test(suite, test, time, file_path); EMPTY; end
32
- def format_process_pch(file); EMPTY; end
33
- def format_process_pch_command(file_path); EMPTY; end
34
- def format_phase_script_execution(script_name); EMPTY; end
35
- def format_process_info_plist(file_name, file_path); EMPTY; end
36
- def format_codesign(file); EMPTY; end
37
- def format_preprocess(file); EMPTY; end
38
- def format_pbxcp(file); EMPTY; end
39
- def format_shell_command(command, arguments); EMPTY; end
40
- def format_test_run_started(name); EMPTY; end
41
- def format_test_run_finished(name, time); EMPTY; end
42
- def format_test_suite_started(name); EMPTY; end
43
- def format_test_summary(message, failures_per_suite); EMPTY; end
44
- def format_touch(file_path, file_name); EMPTY; end
45
- def format_tiffutil(file); EMPTY; end
46
- def format_write_file(file); EMPTY; end
47
- def format_write_auxiliary_files; EMPTY; end
12
+ def format_analyze(file_name, file_path); EMPTY; end
13
+ def format_build_target(target, project, configuration); EMPTY; end
14
+ def format_analyze_target(target, project, configuration); EMPTY; end
15
+ def format_check_dependencies; EMPTY; end
16
+ def format_clean(project, target, configuration); EMPTY; end
17
+ def format_clean_target(target, project, configuration); EMPTY; end
18
+ def format_clean_remove; EMPTY; end
19
+ def format_compile(file_name, file_path); EMPTY; end
20
+ def format_compile_command(compiler_command, file_path); EMPTY; end
21
+ def format_compile_xib(file_name, file_path); EMPTY; end
22
+ def format_copy_header_file(source, target); EMPTY; end
23
+ def format_copy_plist_file(source, target); EMPTY; end
24
+ def format_copy_strings_file(file_name); EMPTY; end
25
+ def format_cpresource(file); EMPTY; end
26
+ def format_generate_dsym(dsym); EMPTY; end
27
+ def format_linking(file, build_variant, arch); EMPTY; end
28
+ def format_libtool(library); EMPTY; end
29
+ def format_passing_test(suite, test, time); EMPTY; end
30
+ def format_pending_test(suite, test); EMPTY; end
31
+ def format_measuring_test(suite, test, time); EMPTY; end
32
+ def format_failing_test(suite, test, time, file_path); EMPTY; end
33
+ def format_process_pch(file); EMPTY; end
34
+ def format_process_pch_command(file_path); EMPTY; end
35
+ def format_phase_script_execution(script_name); EMPTY; end
36
+ def format_process_info_plist(file_name, file_path); EMPTY; end
37
+ def format_codesign(file); EMPTY; end
38
+ def format_preprocess(file); EMPTY; end
39
+ def format_pbxcp(file); EMPTY; end
40
+ def format_shell_command(command, arguments); EMPTY; end
41
+ def format_test_run_started(name); EMPTY; end
42
+ def format_test_run_finished(name, time); EMPTY; end
43
+ def format_test_suite_started(name); EMPTY; end
44
+ def format_test_summary(message, failures_per_suite); EMPTY; end
45
+ def format_touch(file_path, file_name); EMPTY; end
46
+ def format_tiffutil(file); EMPTY; end
47
+ def format_write_file(file); EMPTY; end
48
+ def format_write_auxiliary_files; EMPTY; end
48
49
 
49
50
  # COMPILER / LINKER ERRORS AND WARNINGS
50
51
  def format_compile_error(file_name, file_path, reason,
51
- line, cursor); EMPTY; end
52
- def format_error(message); EMPTY; end
53
- def format_undefined_symbols(message, symbol, reference); EMPTY; end
54
- def format_duplicate_symbols(message, file_paths); EMPTY; end
55
- def format_warning(message); message; end
52
+ line, cursor); EMPTY; end
53
+ def format_error(message); EMPTY; end
54
+ def format_undefined_symbols(message, symbol, reference); EMPTY; end
55
+ def format_duplicate_symbols(message, file_paths); EMPTY; end
56
+ def format_warning(message); message; end
56
57
 
57
58
  # TODO: see how we can unify format_error and format_compile_error,
58
59
  # the same for warnings
59
60
  def format_compile_warning(file_name, file_path, reason,
60
- line, cursor); EMPTY; end
61
+ line, cursor); EMPTY; end
61
62
  end
62
63
 
63
64
  class Formatter
@@ -27,6 +27,10 @@ module XCPretty
27
27
  format("Building", "#{project}/#{target} [#{configuration}]")
28
28
  end
29
29
 
30
+ def format_analyze_target(target, project, configuration)
31
+ format("Analyzing", "#{project}/#{target} [#{configuration}]")
32
+ end
33
+
30
34
  def format_clean_target(target, project, configuration)
31
35
  format("Cleaning", "#{project}/#{target} [#{configuration}]")
32
36
  end
@@ -15,6 +15,12 @@ module XCPretty
15
15
  # $3 configuration
16
16
  BUILD_TARGET_MATCHER = /^=== BUILD TARGET\s(.*)\sOF PROJECT\s(.*)\sWITH.*CONFIGURATION\s(.*)\s===/
17
17
 
18
+ # @regex Captured groups
19
+ # $1 target
20
+ # $2 project
21
+ # $3 configuration
22
+ ANALYZE_TARGET_MATCHER = /^=== ANALYZE TARGET\s(.*)\sOF PROJECT\s(.*)\sWITH.*CONFIGURATION\s(.*)\s===/
23
+
18
24
  # @regex Nothing returned here for now
19
25
  CHECK_DEPENDENCIES_MATCHER = /^Check dependencies/
20
26
 
@@ -43,7 +49,7 @@ module XCPretty
43
49
  # @regex Captured groups
44
50
  # $1 file_path
45
51
  # $2 file_name (e.g. KWNull.m)
46
- COMPILE_MATCHER = /^CompileC\s.+?\s((?:\\.|[^ ])+\/((?:\\.|[^ ])+\.(?:m|mm|c|cc|cpp|cxx)))\s.*/
52
+ COMPILE_MATCHER = /^CompileC\s.+?\s((?:\\.|[^ ])+\/((?:\\.|[^ ])+\.(?:m|mm|c|cc|cpp|cxx|swift)))\s.*/
47
53
 
48
54
  # @regex Captured groups
49
55
  # $1 compiler_command
@@ -204,7 +210,7 @@ module XCPretty
204
210
  FATAL_ERROR_MATCHER = /^(fatal error:.*)$/
205
211
 
206
212
  # $1 = whole error
207
- LD_ERROR_MATCHER = /^(ld:.*not found for.*)/
213
+ LD_ERROR_MATCHER = /^(ld:.*)/
208
214
 
209
215
  # @regex Captured groups
210
216
  # $1 file path
@@ -258,6 +264,8 @@ module XCPretty
258
264
  formatter.format_analyze($2, $1)
259
265
  when BUILD_TARGET_MATCHER
260
266
  formatter.format_build_target($1, $2, $3)
267
+ when ANALYZE_TARGET_MATCHER
268
+ formatter.format_analyze_target($1, $2, $3)
261
269
  when CLEAN_REMOVE_MATCHER
262
270
  formatter.format_clean_remove
263
271
  when CLEAN_TARGET_MATCHER
@@ -1,3 +1,3 @@
1
1
  module XCPretty
2
- VERSION = "0.1.10"
2
+ VERSION = "0.1.11"
3
3
  end
@@ -22,6 +22,7 @@ SAMPLE_OLD_SPECTA_FAILURE = "/Users/musalj/code/OSS/ReactiveCocoa/ReactiveCocoaF
22
22
  SAMPLE_SPECTA_FAILURE = " Test Case '-[SKWelcomeViewControllerSpecSpec SKWelcomeViewController_When_a_user_opens_the_app_from_a_clean_installation_displays_the_welcome_screen]' started. \n/Users/vickeryj/Code/ipad-register/KIFTests/Specs/SKWelcomeViewControllerSpec.m:11: error: -[SKWelcomeViewControllerSpecSpec SKWelcomeViewController_When_a_user_opens_the_app_from_a_clean_installation_displays_the_welcome_screen] : The step timed out after 2.00 seconds: Failed to find accessibility element with the label \"The asimplest way to make smarter business decisions\""
23
23
 
24
24
  SAMPLE_BUILD = "=== BUILD TARGET The Spacer OF PROJECT Pods WITH THE DEFAULT CONFIGURATION Debug ==="
25
+ SAMPLE_ANALYZE_TARGET = "=== ANALYZE TARGET The Spacer OF PROJECT Pods WITH THE DEFAULT CONFIGURATION Debug ==="
25
26
  SAMPLE_CLEAN = "=== CLEAN TARGET Pods-ObjectiveSugar OF PROJECT Pods WITH CONFIGURATION Debug ==="
26
27
  SAMPLE_ANOTHER_CLEAN = "=== CLEAN TARGET Pods OF PROJECT Pods WITH CONFIGURATION Debug ==="
27
28
  SAMPLE_CLEAN_REMOVE = %Q(
@@ -552,6 +553,10 @@ ld: 1 duplicate symbol for architecture i386
552
553
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
553
554
  )
554
555
 
556
+ SAMPLE_BITCODE_LD = %Q(
557
+ ld: '/Users/.../GoogleAnalytics-iOS-SDK/libGoogleAnalyticsServices.a(TAGHit.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
558
+ )
559
+
555
560
  SAMPLE_LD_SYMBOLS_ERROR = 'ld: symbol(s) not found for architecture x86_64'
556
561
  SAMPLE_LD_LIBRARY_ERROR = 'ld: library not found for -lPods-Yammer'
557
562
 
@@ -20,6 +20,11 @@ module XCPretty
20
20
  "> Building Pods/The Spacer [Debug]"
21
21
  end
22
22
 
23
+ it "formats analyze target/project/configuration with target" do
24
+ @formatter.format_analyze_target("The Spacer", "Pods", "Debug").should ==
25
+ "> Analyzing Pods/The Spacer [Debug]"
26
+ end
27
+
23
28
  it "formats clean target/project/configuration" do
24
29
  @formatter.format_clean_target("Pods-ObjectiveSugar", "Pods", "Debug").should ==
25
30
  "> Cleaning Pods/Pods-ObjectiveSugar [Debug]"
@@ -28,6 +28,11 @@ module XCPretty
28
28
  @parser.parse(SAMPLE_BUILD)
29
29
  end
30
30
 
31
+ it "parses analyze target" do
32
+ @formatter.should receive(:format_analyze_target).with("The Spacer", "Pods", "Debug")
33
+ @parser.parse(SAMPLE_ANALYZE_TARGET)
34
+ end
35
+
31
36
  it "parses clean remove" do
32
37
  @formatter.should receive(:format_clean_remove)
33
38
  @parser.parse(SAMPLE_CLEAN_REMOVE)
@@ -84,6 +89,11 @@ module XCPretty
84
89
  @parser.parse(SAMPLE_ANOTHER_COMPILE.sub('.m', '.mm'))
85
90
  end
86
91
 
92
+ it 'parses compiling Swift source files' do
93
+ @formatter.should receive(:format_compile).with("KWNull.swift", "Classes/Core/KWNull.swift")
94
+ @parser.parse(SAMPLE_ANOTHER_COMPILE.sub('.m', '.swift'))
95
+ end
96
+
87
97
  it "parses compiling C and C++ files" do
88
98
  ['.c', '.cc', '.cpp', '.cxx'].each do |file_extension|
89
99
  @formatter.should receive(:format_compile).with("KWNull" + file_extension, "Classes/Core/KWNull" + file_extension)
@@ -154,6 +164,11 @@ module XCPretty
154
164
  @parser.parse(SAMPLE_OLD_SPECTA_FAILURE)
155
165
  end
156
166
 
167
+ it "parses ld bitcode errors" do
168
+ @formatter.should receive(:format_error).with(SAMPLE_BITCODE_LD.strip)
169
+ @parser.parse(SAMPLE_BITCODE_LD)
170
+ end
171
+
157
172
  it "parses passing ocunit tests" do
158
173
  @formatter.should receive(:format_passing_test).with('RACCommandSpec',
159
174
  'enabled_signal_should_send_YES_while_executing_is_YES_and_allowsConcurrentExecution_is_YES',
data/xcpretty.gemspec CHANGED
@@ -29,5 +29,5 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency "bundler", "~> 1.3"
30
30
  spec.add_development_dependency "rake"
31
31
  spec.add_development_dependency "rspec", "~> 2"
32
- spec.add_development_dependency "cucumber"
32
+ spec.add_development_dependency "cucumber", "~> 1"
33
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcpretty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
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-04-24 00:00:00.000000000 Z
12
+ date: 2015-08-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -57,16 +57,16 @@ dependencies:
57
57
  name: cucumber
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ">="
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '0'
62
+ version: '1'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ">="
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '0'
69
+ version: '1'
70
70
  description: "\n Xcodebuild formatter designed to be piped with `xcodebuild`,\n and
71
71
  thus keeping 100% compatibility.\n\n It has modes for CI, running tests (RSpec
72
72
  dot-style),\n and it can also mine Bitcoins.\n "