Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit 394fddc

Browse files
devleadskofman1
authored andcommitted
Add Cake NuGet client user agent (#297)
*fixes NuGet/NuGetGallery#5238
1 parent 99a899d commit 394fddc

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/Stats.ImportAzureCdnStatistics/knownclients.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@
157157
- regex: '(NuGet Test Client)/?(\d+)?\.?(\d+)?\.?(\d+)?'
158158
family_replacement: 'NuGet Test Client'
159159

160+
# Cake NuGet Client
161+
- regex: '(Cake NuGet Client)/(\d+)\.(\d+)\.?(\d+)?'
162+
family_replacement: 'Cake NuGet Client'
163+
160164
# NuGet - Keep this one at the bottom of this file as a catch-all resolver
161165
- regex: '(NuGet)/?(\d+)\.(\d+)\.?(\d+)?'
162166
family_replacement: 'NuGet'

tests/Tests.Stats.ImportAzureCdnStatistics/UserAgentParserFacts.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public TheFromPackageStatisticMethod(ITestOutputHelper testOutputHelper)
6565
[InlineData("NuGet MSBuild Task/4.0.0 (Microsoft Windows 10.0.15063)", "NuGet MSBuild Task", "4", "0", "0")]
6666
[InlineData("NuGet .NET Core MSBuild Task/4.4.0 (Microsoft Windows 10.0.15063)", "NuGet .NET Core MSBuild Task", "4", "4", "0")]
6767
[InlineData("NuGet Desktop MSBuild Task/4.4.0 (Microsoft Windows 10.0.15063)", "NuGet Desktop MSBuild Task", "4", "4", "0")]
68+
[InlineData("Cake NuGet Client/4.3.0 (Microsoft Windows 10.0.15063)", "Cake NuGet Client", "4", "3", "0")]
6869
public void RecognizesCustomClients(string userAgent, string expectedClient, string expectedMajor, string expectedMinor, string expectedPatch)
6970
{
7071
var parsed = _parser.ParseUserAgent(userAgent);

0 commit comments

Comments
 (0)