Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
12229264
Unverified
Commit
12229264
authored
Sep 10, 2019
by
Jenn Magder
Committed by
GitHub
Sep 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show CocoaPods version in hint text (#40117)
parent
3f98fb79
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
user_messages.dart
packages/flutter_tools/lib/src/base/user_messages.dart
+2
-2
cocoapods_validator.dart
...ages/flutter_tools/lib/src/macos/cocoapods_validator.dart
+2
-1
cocoapods_validator_test.dart
...ls/test/general.shard/macos/cocoapods_validator_test.dart
+11
-0
No files found.
packages/flutter_tools/lib/src/base/user_messages.dart
View file @
12229264
...
...
@@ -167,8 +167,8 @@ class UserMessages {
'
$consequence
\n
'
'To upgrade:
\n
'
'
$upgradeInstructions
'
;
String
cocoaPodsOutdated
(
String
recVersion
,
String
consequence
,
String
upgradeInstructions
)
=>
'CocoaPods out of date (
$recVersion
is recommended).
\n
'
String
cocoaPodsOutdated
(
String
currentVersion
,
String
recVersion
,
String
consequence
,
String
upgradeInstructions
)
=>
'CocoaPods
$currentVersion
out of date (
$recVersion
is recommended).
\n
'
'
$consequence
\n
'
'To upgrade:
\n
'
'
$upgradeInstructions
'
;
...
...
packages/flutter_tools/lib/src/macos/cocoapods_validator.dart
View file @
12229264
...
...
@@ -45,8 +45,9 @@ class CocoaPodsValidator extends DoctorValidator {
userMessages
.
cocoaPodsUnknownVersion
(
unknownCocoaPodsConsequence
,
cocoaPodsUpgradeInstructions
)));
}
else
{
status
=
ValidationType
.
partial
;
final
String
currentVersionText
=
await
cocoaPods
.
cocoaPodsVersionText
;
messages
.
add
(
ValidationMessage
.
hint
(
userMessages
.
cocoaPodsOutdated
(
cocoaPods
.
cocoaPodsRecommendedVersion
,
noCocoaPodsConsequence
,
cocoaPodsUpgradeInstructions
)));
userMessages
.
cocoaPodsOutdated
(
c
urrentVersionText
,
c
ocoaPods
.
cocoaPodsRecommendedVersion
,
noCocoaPodsConsequence
,
cocoaPodsUpgradeInstructions
)));
}
}
...
...
packages/flutter_tools/test/general.shard/macos/cocoapods_validator_test.dart
View file @
12229264
...
...
@@ -62,9 +62,20 @@ void main() {
testUsingContext
(
'Emits partial status when CocoaPods version is too low'
,
()
async
{
when
(
cocoaPods
.
evaluateCocoaPodsInstallation
)
.
thenAnswer
((
_
)
async
=>
CocoaPodsStatus
.
belowRecommendedVersion
);
const
String
currentVersion
=
'1.4.0'
;
when
(
cocoaPods
.
cocoaPodsVersionText
)
.
thenAnswer
((
_
)
async
=>
currentVersion
);
const
String
recommendedVersion
=
'1.8.0'
;
when
(
cocoaPods
.
cocoaPodsRecommendedVersion
)
.
thenAnswer
((
_
)
=>
recommendedVersion
);
const
CocoaPodsValidator
workflow
=
CocoaPodsValidator
();
final
ValidationResult
result
=
await
workflow
.
validate
();
expect
(
result
.
type
,
ValidationType
.
partial
);
expect
(
result
.
messages
.
length
,
1
);
final
ValidationMessage
message
=
result
.
messages
.
first
;
expect
(
message
.
type
,
ValidationMessageType
.
hint
);
expect
(
message
.
message
,
contains
(
'CocoaPods
$currentVersion
out of date'
));
expect
(
message
.
message
,
contains
(
'(
$recommendedVersion
is recommended)'
));
},
overrides:
<
Type
,
Generator
>{
CocoaPods:
()
=>
cocoaPods
,
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment