Skip to content
This repository was archived by the owner on May 3, 2023. It is now read-only.

Commit d4431a5

Browse files
godreiBence1001
andauthored
Step 6 filter devices for platform (#153)
* Filter valid devices based on platform * Fix existing test cases and auto gen rubocop todos. * Explicitly check device types. * Test platform device type mapping. * Improve exception logging. * Improve result_string and run_and_handle_portal_function function names. * Update rubocop gem version and regenerate rubocop todos. * Typo fix. * Make Xcode.parse_xcodebuild_version_out public. (+1 squashed commit) Squashed commits: [b2be9bb] Use Apple Development and Distribution codesign identity from Xcode 13 in case of Xcode managed signing. * Install bundler during check workflow. * Skipp test_xcode_managed above Xcode 12. * Revert "Make Xcode.parse_xcodebuild_version_out public. (+1 squashed commit)" This reverts commit ce17c93. * Upgrade to bundler 2.2.24. Co-authored-by: Bence Zsigmond Nagy <nbzs1001@gmail.com>
1 parent 7144190 commit d4431a5

File tree

13 files changed

+298
-123
lines changed

13 files changed

+298
-123
lines changed

.rubocop_todo.yml

Lines changed: 129 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,127 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2021-02-24 19:09:31 +0100 using RuboCop version 0.61.1.
3+
# on 2021-07-21 08:44:28 UTC using RuboCop version 1.18.3.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 42
10-
# Cop supports --auto-correct.
11-
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
12-
# SupportedHashRocketStyles: key, separator, table
13-
# SupportedColonStyles: key, separator, table
14-
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
15-
Layout/AlignHash:
16-
Exclude:
17-
- 'lib/autoprovision/portal/app_client.rb'
18-
19-
# Offense count: 15
9+
# Offense count: 13
2010
# Cop supports --auto-correct.
2111
Layout/EmptyLineAfterGuardClause:
2212
Exclude:
2313
- 'lib/autoprovision/auth_data.rb'
2414
- 'lib/autoprovision/certificate_helper.rb'
2515
- 'lib/autoprovision/device.rb'
2616
- 'lib/autoprovision/portal/app_client.rb'
27-
- 'lib/autoprovision/portal/common.rb'
2817
- 'lib/autoprovision/project_helper.rb'
2918
- 'log/log.rb'
3019
- 'params.rb'
3120

32-
# Offense count: 1
21+
# Offense count: 42
3322
# Cop supports --auto-correct.
34-
Layout/EmptyLinesAroundExceptionHandlingKeywords:
23+
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
24+
# SupportedHashRocketStyles: key, separator, table
25+
# SupportedColonStyles: key, separator, table
26+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
27+
Layout/HashAlignment:
3528
Exclude:
36-
- 'main.rb'
29+
- 'lib/autoprovision/portal/app_client.rb'
3730

38-
# Offense count: 3
31+
# Offense count: 1
3932
# Cop supports --auto-correct.
4033
# Configuration parameters: Width, IgnoredPatterns.
4134
Layout/IndentationWidth:
4235
Exclude:
4336
- 'log/log.rb'
44-
- 'main.rb'
4537

4638
# Offense count: 1
4739
# Cop supports --auto-correct.
48-
# Configuration parameters: EnforcedStyle.
49-
# SupportedStyles: final_newline, final_blank_line
50-
Layout/TrailingBlankLines:
40+
# Configuration parameters: AllowInHeredoc.
41+
Layout/TrailingWhitespace:
5142
Exclude:
52-
- 'main.rb'
43+
- 'spec/device_client_spec.rb'
5344

54-
# Offense count: 32
45+
# Offense count: 29
46+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
5547
Metrics/AbcSize:
56-
Max: 65
48+
Max: 64
5749

5850
# Offense count: 2
59-
# Configuration parameters: CountComments, ExcludedMethods.
60-
# ExcludedMethods: refine
51+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
52+
# IgnoredMethods: refine
6153
Metrics/BlockLength:
62-
Max: 38
54+
Max: 78
6355

6456
# Offense count: 4
65-
# Configuration parameters: CountComments.
57+
# Configuration parameters: CountComments, CountAsOne.
6658
Metrics/ClassLength:
6759
Max: 331
6860

69-
# Offense count: 16
61+
# Offense count: 17
62+
# Configuration parameters: IgnoredMethods.
7063
Metrics/CyclomaticComplexity:
71-
Max: 18
64+
Max: 22
7265

7366
# Offense count: 35
74-
# Configuration parameters: CountComments, ExcludedMethods.
67+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
7568
Metrics/MethodLength:
7669
Max: 61
7770

7871
# Offense count: 2
79-
# Configuration parameters: CountKeywordArgs.
72+
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
8073
Metrics/ParameterLists:
8174
Max: 8
8275

83-
# Offense count: 13
76+
# Offense count: 16
77+
# Configuration parameters: IgnoredMethods.
8478
Metrics/PerceivedComplexity:
85-
Max: 22
79+
Max: 24
80+
81+
# Offense count: 1
82+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
83+
# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
84+
Naming/MethodParameterName:
85+
Exclude:
86+
- 'lib/autoprovision/portal/common.rb'
87+
88+
# Offense count: 7
89+
# Cop supports --auto-correct.
90+
# Configuration parameters: PreferredName.
91+
Naming/RescuedExceptionsVariableName:
92+
Exclude:
93+
- 'lib/autoprovision/portal/common.rb'
94+
- 'lib/autoprovision/portal/device_client.rb'
95+
- 'lib/autoprovision/portal/profile_client.rb'
96+
- 'lib/autoprovision/profile_helper.rb'
97+
- 'step.rb'
98+
99+
# Offense count: 32
100+
# Cop supports --auto-correct.
101+
# Configuration parameters: EnforcedStyle.
102+
# SupportedStyles: separated, grouped
103+
Style/AccessorGrouping:
104+
Exclude:
105+
- 'lib/autoprovision/auth_data.rb'
106+
- 'lib/autoprovision/certificate_helper.rb'
107+
- 'lib/autoprovision/certificate_info.rb'
108+
- 'lib/autoprovision/device.rb'
109+
- 'lib/autoprovision/profile_info.rb'
110+
- 'lib/autoprovision/project_helper.rb'
111+
- 'params.rb'
86112

87113
# Offense count: 1
88114
# Cop supports --auto-correct.
89115
Style/BlockComments:
90116
Exclude:
91117
- 'spec/spec_helper.rb'
92118

119+
# Offense count: 2
120+
# Cop supports --auto-correct.
121+
Style/CaseLikeIf:
122+
Exclude:
123+
- 'lib/autoprovision/portal/app_client.rb'
124+
93125
# Offense count: 1
94126
# Configuration parameters: MinBodyLength.
95127
Style/GuardClause:
@@ -103,7 +135,41 @@ Style/IfUnlessModifier:
103135
- 'lib/autoprovision/certificate_helper.rb'
104136
- 'lib/autoprovision/profile_helper.rb'
105137

106-
# Offense count: 7
138+
# Offense count: 1
139+
# Cop supports --auto-correct.
140+
# Configuration parameters: IgnoredMethods.
141+
Style/MethodCallWithoutArgsParentheses:
142+
Exclude:
143+
- 'spec/device_client_spec.rb'
144+
145+
# Offense count: 3
146+
# Configuration parameters: AllowedMethods.
147+
# AllowedMethods: respond_to_missing?
148+
Style/OptionalBooleanParameter:
149+
Exclude:
150+
- 'lib/autoprovision/portal/profile_client.rb'
151+
- 'lib/autoprovision/profile_helper.rb'
152+
153+
# Offense count: 2
154+
# Cop supports --auto-correct.
155+
Style/RedundantAssignment:
156+
Exclude:
157+
- 'lib/autoprovision/device.rb'
158+
- 'lib/autoprovision/utils.rb'
159+
160+
# Offense count: 1
161+
# Cop supports --auto-correct.
162+
Style/RedundantFileExtensionInRequire:
163+
Exclude:
164+
- 'spec/project_helper_spec.rb'
165+
166+
# Offense count: 2
167+
# Cop supports --auto-correct.
168+
Style/RedundantSelfAssignment:
169+
Exclude:
170+
- 'lib/autoprovision/portal/device_client.rb'
171+
172+
# Offense count: 6
107173
# Cop supports --auto-correct.
108174
# Configuration parameters: EnforcedStyle.
109175
# SupportedStyles: implicit, explicit
@@ -112,19 +178,38 @@ Style/RescueStandardError:
112178
- 'lib/autoprovision/portal/device_client.rb'
113179
- 'lib/autoprovision/portal/profile_client.rb'
114180
- 'lib/autoprovision/profile_helper.rb'
115-
- 'main.rb'
116181
- 'step.rb'
117182

118-
# Offense count: 4
183+
# Offense count: 6
119184
# Cop supports --auto-correct.
120-
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
121-
# SupportedStyles: single_quotes, double_quotes
122-
Style/StringLiterals:
185+
# Configuration parameters: Mode.
186+
Style/StringConcatenation:
123187
Exclude:
124-
- 'main.rb'
188+
- 'lib/autoprovision/auth_helper.rb'
189+
- 'lib/autoprovision/keychain_helper.rb'
190+
- 'lib/autoprovision/profile_helper.rb'
191+
- 'lib/autoprovision/project_helper.rb'
192+
- 'spec/project_helper_spec.rb'
125193

126-
# Offense count: 235
127-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
194+
# Offense count: 1
195+
# Cop supports --auto-correct.
196+
# Configuration parameters: EnforcedStyleForMultiline.
197+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
198+
Style/TrailingCommaInArrayLiteral:
199+
Exclude:
200+
- 'spec/device_client_spec.rb'
201+
202+
# Offense count: 2
203+
# Cop supports --auto-correct.
204+
# Configuration parameters: WordRegex.
205+
# SupportedStyles: percent, brackets
206+
Style/WordArray:
207+
EnforcedStyle: percent
208+
MinSize: 3
209+
210+
# Offense count: 56
211+
# Cop supports --auto-correct.
212+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
128213
# URISchemes: http, https
129-
Metrics/LineLength:
214+
Layout/LineLength:
130215
Max: 225

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ gem 'xcodeproj'
77

88
group :test do
99
gem 'rspec'
10-
gem 'rubocop', '0.61.1'
10+
gem 'rubocop', '~> 1.18'
1111
end

Gemfile.lock

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ GEM
139139
http-cookie (1.0.4)
140140
domain_name (~> 0.5)
141141
httpclient (2.8.3)
142-
jaro_winkler (1.5.4)
143142
jmespath (1.4.0)
144143
json (2.5.1)
145144
jwt (2.2.3)
@@ -153,13 +152,13 @@ GEM
153152
openssl (2.2.0)
154153
os (1.1.1)
155154
parallel (1.20.1)
156-
parser (3.0.1.1)
155+
parser (3.0.2.0)
157156
ast (~> 2.4.1)
158157
plist (3.6.0)
159-
powerpack (0.1.3)
160158
public_suffix (4.0.6)
161159
rainbow (3.0.0)
162160
rake (13.0.3)
161+
regexp_parser (2.1.1)
163162
representable (3.1.1)
164163
declarative (< 0.1.0)
165164
trailblazer-option (>= 0.1.1, < 0.2.0)
@@ -180,14 +179,17 @@ GEM
180179
diff-lcs (>= 1.2.0, < 2.0)
181180
rspec-support (~> 3.10.0)
182181
rspec-support (3.10.2)
183-
rubocop (0.61.1)
184-
jaro_winkler (~> 1.5.1)
182+
rubocop (1.18.3)
185183
parallel (~> 1.10)
186-
parser (>= 2.5, != 2.5.1.1)
187-
powerpack (~> 0.1)
184+
parser (>= 3.0.0.0)
188185
rainbow (>= 2.2.2, < 4.0)
186+
regexp_parser (>= 1.8, < 3.0)
187+
rexml
188+
rubocop-ast (>= 1.7.0, < 2.0)
189189
ruby-progressbar (~> 1.7)
190-
unicode-display_width (~> 1.4.0)
190+
unicode-display_width (>= 1.4.0, < 3.0)
191+
rubocop-ast (1.8.0)
192+
parser (>= 3.0.1.1)
191193
ruby-progressbar (1.11.0)
192194
ruby2_keywords (0.0.4)
193195
rubyzip (2.3.0)
@@ -234,8 +236,8 @@ DEPENDENCIES
234236
openssl
235237
plist
236238
rspec
237-
rubocop (= 0.61.1)
239+
rubocop (~> 1.18)
238240
xcodeproj
239241

240242
BUNDLED WITH
241-
1.17.3
243+
2.2.24

bitrise.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ workflows:
1010
- content: |-
1111
#!/bin/bash
1212
set -e
13+
gem install bundler -v 2.2.24 --force
1314
bundle install
1415
- script:
1516
title: rubocop

0 commit comments

Comments
 (0)