danger-xcode_summary 0.5.1 → 0.5.2
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 +4 -4
- data/.rubocop.yml +2 -6
- data/.travis.yml +1 -2
- data/Gemfile.lock +60 -51
- data/danger-xcode_summary.gemspec +3 -1
- data/lib/xcode_summary/gem_version.rb +1 -1
- data/lib/xcode_summary/plugin.rb +7 -5
- data/spec/spec_helper.rb +3 -1
- data/spec/xcode_summary_spec.rb +8 -10
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 53f29c0e11a10b8eccb342cc72a8d578f04a8e30290fb6805b4bd0848462bb31
|
|
4
|
+
data.tar.gz: f711a75b72b460f4bb4f8a5b6ca43f1d0fb4d1218e1f5f6019cf7923b70c847e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b83113e47379c130f54d41f431d05f7374814cda752b5235e57dc409dfedea217f5079d81cf4c2cbd2e40aa438da1c5193f83fc24a1c45e0a2232f37a73b1f0c
|
|
7
|
+
data.tar.gz: cb9ff766abbbfcfe7c5bbed3c2a5861e9f42bfdf75c95f7f926b39512671005fe03e444532f9e29d385245fb76d4c06c9b5ab0a08d605887511c87d3f617f227
|
data/.rubocop.yml
CHANGED
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
Style/ClassCheck:
|
|
3
3
|
EnforcedStyle: kind_of?
|
|
4
4
|
|
|
5
|
-
# It's better to be more explicit about the type
|
|
6
|
-
Style/BracesAroundHashParameters:
|
|
7
|
-
Enabled: false
|
|
8
|
-
|
|
9
5
|
# specs sometimes have useless assignments, which is fine
|
|
10
6
|
Lint/UselessAssignment:
|
|
11
7
|
Exclude:
|
|
@@ -54,8 +50,8 @@ Metrics/CyclomaticComplexity:
|
|
|
54
50
|
Max: 17
|
|
55
51
|
|
|
56
52
|
# Configuration parameters: AllowURI, URISchemes.
|
|
57
|
-
|
|
58
|
-
Max:
|
|
53
|
+
Layout/LineLength:
|
|
54
|
+
Max: 130
|
|
59
55
|
|
|
60
56
|
# Configuration parameters: CountKeywordArgs.
|
|
61
57
|
Metrics/ParameterLists:
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
danger-xcode_summary (0.5.
|
|
4
|
+
danger-xcode_summary (0.5.2)
|
|
5
5
|
danger-plugin-api (~> 1.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
addressable (2.
|
|
11
|
-
public_suffix (>= 2.0.2, <
|
|
12
|
-
ast (2.4.
|
|
13
|
-
claide (1.0.
|
|
10
|
+
addressable (2.7.0)
|
|
11
|
+
public_suffix (>= 2.0.2, < 5.0)
|
|
12
|
+
ast (2.4.1)
|
|
13
|
+
claide (1.0.3)
|
|
14
14
|
claide-plugins (0.9.2)
|
|
15
15
|
cork
|
|
16
16
|
nap
|
|
17
17
|
open4 (~> 1.3)
|
|
18
|
-
coderay (1.1.
|
|
18
|
+
coderay (1.1.3)
|
|
19
19
|
colored2 (3.1.2)
|
|
20
20
|
cork (0.3.0)
|
|
21
21
|
colored2 (~> 3.1)
|
|
22
|
-
danger (
|
|
22
|
+
danger (8.0.2)
|
|
23
23
|
claide (~> 1.0)
|
|
24
24
|
claide-plugins (>= 0.9.2)
|
|
25
25
|
colored2 (~> 3.1)
|
|
26
26
|
cork (~> 0.1)
|
|
27
|
-
faraday (
|
|
27
|
+
faraday (>= 0.9.0, < 2.0)
|
|
28
28
|
faraday-http-cache (~> 2.0)
|
|
29
|
-
git (~> 1.
|
|
29
|
+
git (~> 1.7)
|
|
30
30
|
kramdown (~> 2.0)
|
|
31
31
|
kramdown-parser-gfm (~> 1.0)
|
|
32
32
|
no_proxy_fix
|
|
@@ -34,15 +34,16 @@ GEM
|
|
|
34
34
|
terminal-table (~> 1)
|
|
35
35
|
danger-plugin-api (1.0.0)
|
|
36
36
|
danger (> 2.0)
|
|
37
|
-
diff-lcs (1.
|
|
38
|
-
faraday (0.
|
|
37
|
+
diff-lcs (1.4.4)
|
|
38
|
+
faraday (1.0.1)
|
|
39
39
|
multipart-post (>= 1.2, < 3)
|
|
40
|
-
faraday-http-cache (2.
|
|
41
|
-
faraday (
|
|
42
|
-
ffi (1.
|
|
40
|
+
faraday-http-cache (2.2.0)
|
|
41
|
+
faraday (>= 0.8)
|
|
42
|
+
ffi (1.13.1)
|
|
43
43
|
formatador (0.2.5)
|
|
44
|
-
git (1.
|
|
45
|
-
|
|
44
|
+
git (1.7.0)
|
|
45
|
+
rchardet (~> 1.8)
|
|
46
|
+
guard (2.16.2)
|
|
46
47
|
formatador (>= 0.2.4)
|
|
47
48
|
listen (>= 2.7, < 4.0)
|
|
48
49
|
lumberjack (>= 1.0.12, < 2.0)
|
|
@@ -56,57 +57,65 @@ GEM
|
|
|
56
57
|
guard (~> 2.1)
|
|
57
58
|
guard-compat (~> 1.1)
|
|
58
59
|
rspec (>= 2.99.0, < 4.0)
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
kramdown (2.3.0)
|
|
61
|
+
rexml
|
|
61
62
|
kramdown-parser-gfm (1.1.0)
|
|
62
63
|
kramdown (~> 2.0)
|
|
63
64
|
listen (3.0.7)
|
|
64
65
|
rb-fsevent (>= 0.9.3)
|
|
65
66
|
rb-inotify (>= 0.9.7)
|
|
66
|
-
lumberjack (1.
|
|
67
|
-
method_source (0.
|
|
67
|
+
lumberjack (1.2.6)
|
|
68
|
+
method_source (1.0.0)
|
|
68
69
|
multipart-post (2.1.1)
|
|
69
70
|
nap (1.1.0)
|
|
70
71
|
nenv (0.3.0)
|
|
71
72
|
no_proxy_fix (0.1.2)
|
|
72
|
-
notiffany (0.1.
|
|
73
|
+
notiffany (0.1.3)
|
|
73
74
|
nenv (~> 0.1)
|
|
74
75
|
shellany (~> 0.0)
|
|
75
|
-
octokit (4.
|
|
76
|
+
octokit (4.18.0)
|
|
77
|
+
faraday (>= 0.9)
|
|
76
78
|
sawyer (~> 0.8.0, >= 0.5.3)
|
|
77
79
|
open4 (1.3.4)
|
|
78
|
-
parallel (1.
|
|
79
|
-
parser (2.
|
|
80
|
-
ast (~> 2.4.
|
|
81
|
-
pry (0.
|
|
82
|
-
coderay (~> 1.1
|
|
83
|
-
method_source (~>
|
|
84
|
-
public_suffix (
|
|
80
|
+
parallel (1.19.2)
|
|
81
|
+
parser (2.7.1.4)
|
|
82
|
+
ast (~> 2.4.1)
|
|
83
|
+
pry (0.13.1)
|
|
84
|
+
coderay (~> 1.1)
|
|
85
|
+
method_source (~> 1.0)
|
|
86
|
+
public_suffix (4.0.5)
|
|
85
87
|
rainbow (3.0.0)
|
|
86
|
-
rake (
|
|
87
|
-
rb-fsevent (0.10.
|
|
88
|
-
rb-inotify (0.10.
|
|
88
|
+
rake (13.0.1)
|
|
89
|
+
rb-fsevent (0.10.4)
|
|
90
|
+
rb-inotify (0.10.1)
|
|
89
91
|
ffi (~> 1.0)
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
rspec-
|
|
96
|
-
|
|
92
|
+
rchardet (1.8.0)
|
|
93
|
+
regexp_parser (1.7.1)
|
|
94
|
+
rexml (3.2.4)
|
|
95
|
+
rspec (3.9.0)
|
|
96
|
+
rspec-core (~> 3.9.0)
|
|
97
|
+
rspec-expectations (~> 3.9.0)
|
|
98
|
+
rspec-mocks (~> 3.9.0)
|
|
99
|
+
rspec-core (3.9.2)
|
|
100
|
+
rspec-support (~> 3.9.3)
|
|
101
|
+
rspec-expectations (3.9.2)
|
|
97
102
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
98
|
-
rspec-support (~> 3.
|
|
99
|
-
rspec-mocks (3.
|
|
103
|
+
rspec-support (~> 3.9.0)
|
|
104
|
+
rspec-mocks (3.9.1)
|
|
100
105
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
101
|
-
rspec-support (~> 3.
|
|
102
|
-
rspec-support (3.
|
|
103
|
-
rubocop (0.
|
|
104
|
-
jaro_winkler (~> 1.5.1)
|
|
106
|
+
rspec-support (~> 3.9.0)
|
|
107
|
+
rspec-support (3.9.3)
|
|
108
|
+
rubocop (0.86.0)
|
|
105
109
|
parallel (~> 1.10)
|
|
106
|
-
parser (>= 2.
|
|
110
|
+
parser (>= 2.7.0.1)
|
|
107
111
|
rainbow (>= 2.2.2, < 4.0)
|
|
112
|
+
regexp_parser (>= 1.7)
|
|
113
|
+
rexml
|
|
114
|
+
rubocop-ast (>= 0.0.3, < 1.0)
|
|
108
115
|
ruby-progressbar (~> 1.7)
|
|
109
|
-
unicode-display_width (>= 1.4.0, <
|
|
116
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
|
117
|
+
rubocop-ast (0.1.0)
|
|
118
|
+
parser (>= 2.7.0.1)
|
|
110
119
|
ruby-progressbar (1.10.1)
|
|
111
120
|
sawyer (0.8.2)
|
|
112
121
|
addressable (>= 2.3.5)
|
|
@@ -114,9 +123,9 @@ GEM
|
|
|
114
123
|
shellany (0.0.1)
|
|
115
124
|
terminal-table (1.8.0)
|
|
116
125
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
|
117
|
-
thor (0.
|
|
118
|
-
unicode-display_width (1.
|
|
119
|
-
yard (0.9.
|
|
126
|
+
thor (1.0.1)
|
|
127
|
+
unicode-display_width (1.7.0)
|
|
128
|
+
yard (0.9.25)
|
|
120
129
|
|
|
121
130
|
PLATFORMS
|
|
122
131
|
ruby
|
|
@@ -129,7 +138,7 @@ DEPENDENCIES
|
|
|
129
138
|
guard-rspec (~> 4.7)
|
|
130
139
|
listen (= 3.0.7)
|
|
131
140
|
pry
|
|
132
|
-
rake (~>
|
|
141
|
+
rake (~> 13.0)
|
|
133
142
|
rspec (~> 3.4)
|
|
134
143
|
rubocop
|
|
135
144
|
yard
|
|
@@ -21,11 +21,13 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
22
22
|
spec.require_paths = ['lib']
|
|
23
23
|
|
|
24
|
+
spec.required_ruby_version = ">= 2.4.0"
|
|
25
|
+
|
|
24
26
|
spec.add_runtime_dependency 'danger-plugin-api', '~> 1.0'
|
|
25
27
|
|
|
26
28
|
# General ruby development
|
|
27
29
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
|
28
|
-
spec.add_development_dependency 'rake', '~>
|
|
30
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
|
29
31
|
|
|
30
32
|
# Testing support
|
|
31
33
|
spec.add_development_dependency 'rspec', '~> 3.4'
|
data/lib/xcode_summary/plugin.rb
CHANGED
|
@@ -98,6 +98,13 @@ module Danger
|
|
|
98
98
|
def ignores_warnings
|
|
99
99
|
@ignores_warnings || false
|
|
100
100
|
end
|
|
101
|
+
|
|
102
|
+
# Pick a Dangerfile plugin for a chosen request_source and cache it
|
|
103
|
+
# based on https://github.com/danger/danger/blob/master/lib/danger/plugin_support/plugin.rb#L31
|
|
104
|
+
def plugin
|
|
105
|
+
plugins = Plugin.all_plugins.select { |plugin| Dangerfile.essential_plugin_classes.include? plugin }
|
|
106
|
+
@plugin ||= plugins.select { |p| p.method_defined? :html_link }.map { |p| p.new(@dangerfile) }.compact.first
|
|
107
|
+
end
|
|
101
108
|
# rubocop:enable Lint/DuplicateMethods
|
|
102
109
|
|
|
103
110
|
# Reads a file with JSON Xcode summary and reports it.
|
|
@@ -210,11 +217,6 @@ module Danger
|
|
|
210
217
|
end
|
|
211
218
|
|
|
212
219
|
def format_path(path)
|
|
213
|
-
# Pick a Dangerfile plugin for a chosen request_source
|
|
214
|
-
# based on https://github.com/danger/danger/blob/master/lib/danger/plugin_support/plugin.rb#L31
|
|
215
|
-
plugins = Plugin.all_plugins.select { |plugin| Dangerfile.essential_plugin_classes.include? plugin }
|
|
216
|
-
plugin = plugins.select { |p| p.method_defined? :html_link }.map { |p| p.new(@dangerfile) }.compact.first
|
|
217
|
-
|
|
218
220
|
if plugin
|
|
219
221
|
clean_path, line = parse_filename(path)
|
|
220
222
|
path = clean_path + '#L' + line if clean_path && line
|
data/spec/spec_helper.rb
CHANGED
|
@@ -60,7 +60,9 @@ def testing_bitbucket_env
|
|
|
60
60
|
'CHANGE_ID' => '4d4c0f31857e3185b51b6865a0700525bc0cb2bb',
|
|
61
61
|
'JENKINS_URL' => 'http://jenkins.server.com/',
|
|
62
62
|
'DANGER_BITBUCKETCLOUD_USERNAME' => 'username',
|
|
63
|
-
'DANGER_BITBUCKETCLOUD_PASSWORD' => 'password'
|
|
63
|
+
'DANGER_BITBUCKETCLOUD_PASSWORD' => 'password',
|
|
64
|
+
'DANGER_BITBUCKETCLOUD_UUID' => 'c91be865-efc6-49a6-93c5-24e1267c479b',
|
|
65
|
+
'ghprbPullId' => '2080'
|
|
64
66
|
}
|
|
65
67
|
end
|
|
66
68
|
|
data/spec/xcode_summary_spec.rb
CHANGED
|
@@ -54,19 +54,19 @@ module Danger
|
|
|
54
54
|
it 'formats compile warnings' do
|
|
55
55
|
@xcode_summary.report('spec/fixtures/summary.json')
|
|
56
56
|
expect(@dangerfile.status_report[:warnings]).to eq [
|
|
57
|
-
# rubocop:disable LineLength
|
|
57
|
+
# rubocop:disable Layout/LineLength
|
|
58
58
|
"**<a href='https://github.com/diogot/danger-xcode_summary/blob/129jef029jf029fj2039fj203f92/MyWeight/Bla.m#L32'>MyWeight/Bla.m#L32</a>**: Value stored to 'theme' is never read <br />```\n theme = *ptr++;\n```",
|
|
59
59
|
"**<a href='https://github.com/diogot/danger-xcode_summary/blob/129jef029jf029fj2039fj203f92/MyWeight/Pods/ISO8601DateFormatter/ISO8601DateFormatter.m#L176'>MyWeight/Pods/ISO8601DateFormatter/ISO8601DateFormatter.m#L176</a>**: 'NSUndefinedDateComponent' is deprecated: first deprecated in iOS 8.0 - Use NSDateComponentUndefined instead [-Wdeprecated-declarations] <br />```\n month_or_week = NSUndefinedDateComponent,\n```"
|
|
60
|
-
# rubocop:enable LineLength
|
|
60
|
+
# rubocop:enable Layout/LineLength
|
|
61
61
|
]
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
it 'formats compile warnings with empty line' do
|
|
65
65
|
@xcode_summary.report('spec/fixtures/summary_with_empty_line.json')
|
|
66
66
|
expect(@dangerfile.status_report[:warnings]).to eq [
|
|
67
|
-
# rubocop:disable LineLength
|
|
67
|
+
# rubocop:disable Layout/LineLength
|
|
68
68
|
"**<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 />"
|
|
69
|
-
# rubocop:enable LineLength
|
|
69
|
+
# rubocop:enable Layout/LineLength
|
|
70
70
|
]
|
|
71
71
|
end
|
|
72
72
|
|
|
@@ -74,9 +74,9 @@ module Danger
|
|
|
74
74
|
@xcode_summary.ignored_files = '**/Pods/**'
|
|
75
75
|
@xcode_summary.report('spec/fixtures/summary.json')
|
|
76
76
|
expect(@dangerfile.status_report[:warnings]).to eq [
|
|
77
|
-
# rubocop:disable LineLength
|
|
77
|
+
# rubocop:disable Layout/LineLength
|
|
78
78
|
"**<a href='https://github.com/diogot/danger-xcode_summary/blob/129jef029jf029fj2039fj203f92/MyWeight/Bla.m#L32'>MyWeight/Bla.m#L32</a>**: Value stored to 'theme' is never read <br />```\n theme = *ptr++;\n```"
|
|
79
|
-
# rubocop:enable LineLength
|
|
79
|
+
# rubocop:enable Layout/LineLength
|
|
80
80
|
]
|
|
81
81
|
end
|
|
82
82
|
|
|
@@ -89,10 +89,10 @@ module Danger
|
|
|
89
89
|
it 'formats test errors' do
|
|
90
90
|
@xcode_summary.report('spec/fixtures/test_errors.json')
|
|
91
91
|
expect(@dangerfile.status_report[:errors]).to eq [
|
|
92
|
-
# rubocop:disable LineLength
|
|
92
|
+
# rubocop:disable Layout/LineLength
|
|
93
93
|
'**MyWeight.MyWeightSpec**: works_with_success, expected to eventually not be nil, got \<nil\> <br /> ' \
|
|
94
94
|
"<a href='https://github.com/diogot/danger-xcode_summary/blob/129jef029jf029fj2039fj203f92/MyWeight/MyWeightTests/Tests.swift#L86'>MyWeight/MyWeightTests/Tests.swift#L86</a>"
|
|
95
|
-
# rubocop:enable LineLength
|
|
95
|
+
# rubocop:enable Layout/LineLength
|
|
96
96
|
]
|
|
97
97
|
end
|
|
98
98
|
|
|
@@ -198,9 +198,7 @@ module Danger
|
|
|
198
198
|
before do
|
|
199
199
|
@dangerfile = testing_bitbucket_dangerfile
|
|
200
200
|
@xcode_summary = @dangerfile.xcode_summary
|
|
201
|
-
# rubocop:disable LineLength
|
|
202
201
|
@xcode_summary.env.request_source.pr_json = JSON.parse(IO.read('spec/fixtures/bitbucket_pr.json'), symbolize_names: true)
|
|
203
|
-
# rubocop:enable LineLength
|
|
204
202
|
@xcode_summary.project_root = '/Users/diogo/src/danger-xcode_summary'
|
|
205
203
|
end
|
|
206
204
|
|
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.5.
|
|
4
|
+
version: 0.5.2
|
|
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:
|
|
12
|
+
date: 2020-07-05 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: danger-plugin-api
|
|
@@ -45,14 +45,14 @@ dependencies:
|
|
|
45
45
|
requirements:
|
|
46
46
|
- - "~>"
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: '
|
|
48
|
+
version: '13.0'
|
|
49
49
|
type: :development
|
|
50
50
|
prerelease: false
|
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
|
52
52
|
requirements:
|
|
53
53
|
- - "~>"
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: '
|
|
55
|
+
version: '13.0'
|
|
56
56
|
- !ruby/object:Gem::Dependency
|
|
57
57
|
name: rspec
|
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -168,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
168
168
|
requirements:
|
|
169
169
|
- - ">="
|
|
170
170
|
- !ruby/object:Gem::Version
|
|
171
|
-
version:
|
|
171
|
+
version: 2.4.0
|
|
172
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
173
|
requirements:
|
|
174
174
|
- - ">="
|