Skip to content

Commit f03890a

Browse files
authored
Merge pull request #53 from diogot/updates
Updates
2 parents 454b534 + cb006a9 commit f03890a

File tree

7 files changed

+79
-73
lines changed

7 files changed

+79
-73
lines changed

.rubocop.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
Style/ClassCheck:
33
EnforcedStyle: kind_of?
44

5-
# It's better to be more explicit about the type
6-
Style/BracesAroundHashParameters:
7-
Enabled: false
8-
95
# specs sometimes have useless assignments, which is fine
106
Lint/UselessAssignment:
117
Exclude:
@@ -54,8 +50,8 @@ Metrics/CyclomaticComplexity:
5450
Max: 17
5551

5652
# Configuration parameters: AllowURI, URISchemes.
57-
Metrics/LineLength:
58-
Max: 120
53+
Layout/LineLength:
54+
Max: 130
5955

6056
# Configuration parameters: CountKeywordArgs.
6157
Metrics/ParameterLists:

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ rvm:
77
- 2.6.0
88
- 2.5.3
99
- 2.4.5
10-
- 2.3.8
1110

1211
script:
13-
- bundle exec rake spec
12+
- bundle exec rake spec

Gemfile.lock

Lines changed: 59 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,43 @@ PATH
77
GEM
88
remote: https://rubygems.org/
99
specs:
10-
addressable (2.6.0)
11-
public_suffix (>= 2.0.2, < 4.0)
12-
ast (2.4.0)
13-
claide (1.0.2)
10+
addressable (2.7.0)
11+
public_suffix (>= 2.0.2, < 5.0)
12+
ast (2.4.1)
13+
claide (1.0.3)
1414
claide-plugins (0.9.2)
1515
cork
1616
nap
1717
open4 (~> 1.3)
18-
coderay (1.1.2)
18+
coderay (1.1.3)
1919
colored2 (3.1.2)
2020
cork (0.3.0)
2121
colored2 (~> 3.1)
22-
danger (6.0.9)
22+
danger (8.0.2)
2323
claide (~> 1.0)
2424
claide-plugins (>= 0.9.2)
2525
colored2 (~> 3.1)
2626
cork (~> 0.1)
27-
faraday (~> 0.9)
27+
faraday (>= 0.9.0, < 2.0)
2828
faraday-http-cache (~> 2.0)
29-
git (~> 1.5)
29+
git (~> 1.7)
3030
kramdown (~> 2.0)
3131
kramdown-parser-gfm (~> 1.0)
3232
no_proxy_fix
3333
octokit (~> 4.7)
3434
terminal-table (~> 1)
3535
danger-plugin-api (1.0.0)
3636
danger (> 2.0)
37-
diff-lcs (1.3)
38-
faraday (0.15.4)
37+
diff-lcs (1.4.4)
38+
faraday (1.0.1)
3939
multipart-post (>= 1.2, < 3)
40-
faraday-http-cache (2.0.0)
41-
faraday (~> 0.8)
42-
ffi (1.11.1)
40+
faraday-http-cache (2.2.0)
41+
faraday (>= 0.8)
42+
ffi (1.13.1)
4343
formatador (0.2.5)
44-
git (1.5.0)
45-
guard (2.15.0)
44+
git (1.7.0)
45+
rchardet (~> 1.8)
46+
guard (2.16.2)
4647
formatador (>= 0.2.4)
4748
listen (>= 2.7, < 4.0)
4849
lumberjack (>= 1.0.12, < 2.0)
@@ -56,67 +57,75 @@ GEM
5657
guard (~> 2.1)
5758
guard-compat (~> 1.1)
5859
rspec (>= 2.99.0, < 4.0)
59-
jaro_winkler (1.5.3)
60-
kramdown (2.1.0)
60+
kramdown (2.3.0)
61+
rexml
6162
kramdown-parser-gfm (1.1.0)
6263
kramdown (~> 2.0)
6364
listen (3.0.7)
6465
rb-fsevent (>= 0.9.3)
6566
rb-inotify (>= 0.9.7)
66-
lumberjack (1.0.13)
67-
method_source (0.9.2)
67+
lumberjack (1.2.6)
68+
method_source (1.0.0)
6869
multipart-post (2.1.1)
6970
nap (1.1.0)
7071
nenv (0.3.0)
7172
no_proxy_fix (0.1.2)
72-
notiffany (0.1.1)
73+
notiffany (0.1.3)
7374
nenv (~> 0.1)
7475
shellany (~> 0.0)
75-
octokit (4.14.0)
76+
octokit (4.18.0)
77+
faraday (>= 0.9)
7678
sawyer (~> 0.8.0, >= 0.5.3)
7779
open4 (1.3.4)
78-
parallel (1.17.0)
79-
parser (2.6.3.0)
80-
ast (~> 2.4.0)
81-
pry (0.12.2)
82-
coderay (~> 1.1.0)
83-
method_source (~> 0.9.0)
84-
public_suffix (3.1.1)
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)
8587
rainbow (3.0.0)
86-
rake (10.5.0)
87-
rb-fsevent (0.10.3)
88-
rb-inotify (0.10.0)
88+
rake (13.0.1)
89+
rb-fsevent (0.10.4)
90+
rb-inotify (0.10.1)
8991
ffi (~> 1.0)
90-
rspec (3.8.0)
91-
rspec-core (~> 3.8.0)
92-
rspec-expectations (~> 3.8.0)
93-
rspec-mocks (~> 3.8.0)
94-
rspec-core (3.8.2)
95-
rspec-support (~> 3.8.0)
96-
rspec-expectations (3.8.4)
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)
97102
diff-lcs (>= 1.2.0, < 2.0)
98-
rspec-support (~> 3.8.0)
99-
rspec-mocks (3.8.1)
103+
rspec-support (~> 3.9.0)
104+
rspec-mocks (3.9.1)
100105
diff-lcs (>= 1.2.0, < 2.0)
101-
rspec-support (~> 3.8.0)
102-
rspec-support (3.8.2)
103-
rubocop (0.73.0)
104-
jaro_winkler (~> 1.5.1)
106+
rspec-support (~> 3.9.0)
107+
rspec-support (3.9.3)
108+
rubocop (0.86.0)
105109
parallel (~> 1.10)
106-
parser (>= 2.6)
110+
parser (>= 2.7.0.1)
107111
rainbow (>= 2.2.2, < 4.0)
112+
regexp_parser (>= 1.7)
113+
rexml
114+
rubocop-ast (>= 0.0.3, < 1.0)
108115
ruby-progressbar (~> 1.7)
109-
unicode-display_width (>= 1.4.0, < 1.7)
116+
unicode-display_width (>= 1.4.0, < 2.0)
117+
rubocop-ast (0.1.0)
118+
parser (>= 2.7.0.1)
110119
ruby-progressbar (1.10.1)
111120
sawyer (0.8.2)
112121
addressable (>= 2.3.5)
113122
faraday (> 0.8, < 2.0)
114123
shellany (0.0.1)
115124
terminal-table (1.8.0)
116125
unicode-display_width (~> 1.1, >= 1.1.1)
117-
thor (0.20.3)
118-
unicode-display_width (1.6.0)
119-
yard (0.9.20)
126+
thor (1.0.1)
127+
unicode-display_width (1.7.0)
128+
yard (0.9.25)
120129

121130
PLATFORMS
122131
ruby
@@ -129,7 +138,7 @@ DEPENDENCIES
129138
guard-rspec (~> 4.7)
130139
listen (= 3.0.7)
131140
pry
132-
rake (~> 10.0)
141+
rake (~> 13.0)
133142
rspec (~> 3.4)
134143
rubocop
135144
yard

danger-xcode_summary.gemspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ Gem::Specification.new do |spec|
2121
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
2222
spec.require_paths = ['lib']
2323

24+
spec.required_ruby_version = ">= 2.4.0"
25+
2426
spec.add_runtime_dependency 'danger-plugin-api', '~> 1.0'
2527

2628
# General ruby development
2729
spec.add_development_dependency 'bundler', '~> 1.3'
28-
spec.add_development_dependency 'rake', '~> 10.0'
30+
spec.add_development_dependency 'rake', '~> 13.0'
2931

3032
# Testing support
3133
spec.add_development_dependency 'rspec', '~> 3.4'

lib/xcode_summary/plugin.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ def inline_mode
9898
def ignores_warnings
9999
@ignores_warnings || false
100100
end
101-
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
102104
def plugin
103-
# Pick a Dangerfile plugin for a chosen request_source
104-
# based on https://github.com/danger/danger/blob/master/lib/danger/plugin_support/plugin.rb#L31
105105
plugins = Plugin.all_plugins.select { |plugin| Dangerfile.essential_plugin_classes.include? plugin }
106106
@plugin ||= plugins.select { |p| p.method_defined? :html_link }.map { |p| p.new(@dangerfile) }.compact.first
107107
end

spec/spec_helper.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ def testing_bitbucket_env
6060
'CHANGE_ID' => '4d4c0f31857e3185b51b6865a0700525bc0cb2bb',
6161
'JENKINS_URL' => 'http://jenkins.server.com/',
6262
'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'
6466
}
6567
end
6668

spec/xcode_summary_spec.rb

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,29 +54,29 @@ module Danger
5454
it 'formats compile warnings' do
5555
@xcode_summary.report('spec/fixtures/summary.json')
5656
expect(@dangerfile.status_report[:warnings]).to eq [
57-
# rubocop:disable LineLength
57+
# rubocop:disable Layout/LineLength
5858
"**<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```",
5959
"**<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
6161
]
6262
end
6363

6464
it 'formats compile warnings with empty line' do
6565
@xcode_summary.report('spec/fixtures/summary_with_empty_line.json')
6666
expect(@dangerfile.status_report[:warnings]).to eq [
67-
# rubocop:disable LineLength
67+
# rubocop:disable Layout/LineLength
6868
"**<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
7070
]
7171
end
7272

7373
it 'ignores file when ignored_files matches' do
7474
@xcode_summary.ignored_files = '**/Pods/**'
7575
@xcode_summary.report('spec/fixtures/summary.json')
7676
expect(@dangerfile.status_report[:warnings]).to eq [
77-
# rubocop:disable LineLength
77+
# rubocop:disable Layout/LineLength
7878
"**<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
8080
]
8181
end
8282

@@ -89,10 +89,10 @@ module Danger
8989
it 'formats test errors' do
9090
@xcode_summary.report('spec/fixtures/test_errors.json')
9191
expect(@dangerfile.status_report[:errors]).to eq [
92-
# rubocop:disable LineLength
92+
# rubocop:disable Layout/LineLength
9393
'**MyWeight.MyWeightSpec**: works_with_success, expected to eventually not be nil, got \<nil\> <br /> ' \
9494
"<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
9696
]
9797
end
9898

@@ -198,9 +198,7 @@ module Danger
198198
before do
199199
@dangerfile = testing_bitbucket_dangerfile
200200
@xcode_summary = @dangerfile.xcode_summary
201-
# rubocop:disable LineLength
202201
@xcode_summary.env.request_source.pr_json = JSON.parse(IO.read('spec/fixtures/bitbucket_pr.json'), symbolize_names: true)
203-
# rubocop:enable LineLength
204202
@xcode_summary.project_root = '/Users/diogo/src/danger-xcode_summary'
205203
end
206204

0 commit comments

Comments
 (0)