danger-xcode_summary 0.1.0 → 0.1.1

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: 40f3d04704e9bb77f8327487287a2831656ce32e
4
- data.tar.gz: 031bd83de379c5c9dad8b66fda4e1b1b45a412d7
3
+ metadata.gz: 7160cc7c92845abecec316007f22b340e478d388
4
+ data.tar.gz: ee0d0752692b8ac7b177a1004fb4ac29c9e63ef7
5
5
  SHA512:
6
- metadata.gz: 2cc6e6288f4d3cac6436a8f8071eb89af94ebfdc02433b1da9e4de5279b20b0a4a658413009ceab9d2820dca84637d3e880e42e59f0fd493c2cae09916fe6abb
7
- data.tar.gz: 7f0e85c16312e54fdbd791d08e7cdb76d05897359d2b537176a28f8f3431e8d378fdb19a320fbab1c4b8ca018155c252ee96ed9136afb09fa9587eaacdf01ec3
6
+ metadata.gz: 8384d1ebcfda002f5a9a19b4b8f4594189460fc1d8bde87c2f8b616df68071b61353c20d76ec4ad872e692a25adb097231eb0167c5fd062a380f7f9c9d0fd88b
7
+ data.tar.gz: 96be4fdf6814c92709af16c0ce74f568dd8465fd56f1c5be90d75c627f0e773719a35c23cc8192faf4da84a091f26923c8d146095bc4761aa7d32d4e2d5fc146
data/Gemfile CHANGED
@@ -4,5 +4,5 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  gem 'danger'
7
- gem 'yard'
8
7
  gem 'rubocop'
8
+ gem 'yard'
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # danger-xcode_summary
2
2
 
3
3
  [![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](LICENSE.txt)
4
- [![Gem](https://img.shields.io/gem/v/danger-xcode_summary?style=flat)](http://rubygems.org/gems/danger-xcode_summary)
4
+ [![Gem Version](https://badge.fury.io/rb/danger-xcode_summary.svg)](https://badge.fury.io/rb/danger-xcode_summary)
5
5
  [![Build Status](https://travis-ci.org/diogot/danger-xcode_summary.svg?branch=master)](https://travis-ci.org/diogot/danger-xcode_summary)
6
6
 
7
7
  A [Danger](http://danger.systems) plugin that shows all build errors, warnings and unit tests results generated from `xcodebuild`.
@@ -1,3 +1,3 @@
1
1
  module XcodeSummary
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
@@ -133,10 +133,16 @@ module Danger
133
133
  return nil if should_ignore_warning?(path)
134
134
 
135
135
  path_link = format_path(path)
136
- "**#{path_link}**: #{escape_reason(h[:reason])} <br />" \
137
- "```\n" \
138
- "#{h[:line]}\n" \
139
- '```'
136
+
137
+ warning = "**#{path_link}**: #{escape_reason(h[:reason])} <br />"
138
+ if h[:line] && !h[:line].empty?
139
+ "#{warning}" \
140
+ "```\n" \
141
+ "#{h[:line]}\n" \
142
+ '```'
143
+ else
144
+ warning
145
+ end
140
146
  end
141
147
 
142
148
  def format_format_file_missing_error(h)
@@ -0,0 +1,37 @@
1
+ {
2
+ "warnings": [
3
+
4
+ ],
5
+ "ld_warnings": [
6
+
7
+ ],
8
+ "compile_warnings": [
9
+ {
10
+ "file_name": "AppDelegate.swift",
11
+ "file_path": "/Users/marcelofabri/Developer/MyAwesomeProject/MyAwesomeProject/Classes/AppDelegate.swift:10001:",
12
+ "reason": "File should contain 400 lines or less: currently contains 10001",
13
+ "line": "",
14
+ "cursor": "^"
15
+ }
16
+ ],
17
+ "errors": [
18
+
19
+ ],
20
+ "compile_errors": [
21
+
22
+ ],
23
+ "file_missing_errors": [
24
+
25
+ ],
26
+ "undefined_symbols_errors": [
27
+
28
+ ],
29
+ "duplicate_symbols_errors": [
30
+
31
+ ],
32
+ "tests_failures": {
33
+ },
34
+ "tests_summary_messages": [
35
+ "\t Executed 4 tests, with 0 failures (0 unexpected) in 0.012 (0.017) seconds\n"
36
+ ]
37
+ }
@@ -51,6 +51,15 @@ module Danger
51
51
  ]
52
52
  end
53
53
 
54
+ it 'formats compile warnings with empty line' do
55
+ @xcode_summary.report('spec/fixtures/summary_with_empty_line.json')
56
+ expect(@dangerfile.status_report[:warnings]).to eq [
57
+ # rubocop:disable LineLength
58
+ "**<a href='https://github.com/diogot/danger-xcode_summary/blob/129jef029jf029fj2039fj203f92/Users/marcelofabri/Developer/MyAwesomeProject/MyAwesomeProject/Classes/AppDelegate.swift#L10001'>/Users/marcelofabri/Developer/MyAwesomeProject/MyAwesomeProject/Classes/AppDelegate.swift#L10001</a>**: File should contain 400 lines or less: currently contains 10001 <br />"
59
+ # rubocop:enable LineLength
60
+ ]
61
+ end
62
+
54
63
  it 'ignores file when ignored_files matches' do
55
64
  @xcode_summary.ignored_files = '**/Pods/**'
56
65
  @xcode_summary.report('spec/fixtures/summary.json')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-xcode_summary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diogo Tridapalli
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-09-30 00:00:00.000000000 Z
12
+ date: 2017-01-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: danger-plugin-api
@@ -147,6 +147,7 @@ files:
147
147
  - lib/xcode_summary/plugin.rb
148
148
  - spec/fixtures/summary.json
149
149
  - spec/fixtures/summary_messages.json
150
+ - spec/fixtures/summary_with_empty_line.json
150
151
  - spec/fixtures/test_errors.json
151
152
  - spec/spec_helper.rb
152
153
  - spec/xcode_summary_spec.rb
@@ -170,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
171
  version: '0'
171
172
  requirements: []
172
173
  rubyforge_project:
173
- rubygems_version: 2.6.0
174
+ rubygems_version: 2.6.8
174
175
  signing_key:
175
176
  specification_version: 4
176
177
  summary: A [Danger](http://danger.systems) plugin that shows all build errors, warnings
@@ -178,6 +179,7 @@ summary: A [Danger](http://danger.systems) plugin that shows all build errors, w
178
179
  test_files:
179
180
  - spec/fixtures/summary.json
180
181
  - spec/fixtures/summary_messages.json
182
+ - spec/fixtures/summary_with_empty_line.json
181
183
  - spec/fixtures/test_errors.json
182
184
  - spec/spec_helper.rb
183
185
  - spec/xcode_summary_spec.rb