Skip to content

Commit b28dcfe

Browse files
committed
Rip the heart out of the nuget code to get this to compile
1 parent 8d91810 commit b28dcfe

27 files changed

+350
-837
lines changed

Diff for: src/chocolatey/chocolatey.csproj

+5-7
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@
171171
<Compile Include="infrastructure.app\commands\ChocolateyExportCommand.cs" />
172172
<Compile Include="infrastructure.app\commands\ChocolateyInfoCommand.cs" />
173173
<Compile Include="infrastructure.app\commands\ChocolateyHelpCommand.cs" />
174+
<Compile Include="infrastructure\mockups\PackageOperationEventArgs.cs" />
175+
<Compile Include="infrastructure\mockups\IPackageManager.cs" />
176+
<Compile Include="infrastructure\mockups\IPackageRepository.cs" />
177+
<Compile Include="infrastructure\mockups\PhysicalFileSystem.cs" />
174178
<Compile Include="infrastructure\cryptography\DefaultEncryptionUtility.cs" />
175179
<Compile Include="infrastructure\adapters\IEncryptionUtility.cs" />
176180
<Compile Include="infrastructure.app\validations\GlobalConfigurationValidation.cs" />
@@ -205,6 +209,7 @@
205209
<Compile Include="infrastructure\logging\LogMessage.cs" />
206210
<Compile Include="infrastructure\logging\LogSinkLog.cs" />
207211
<Compile Include="infrastructure\registration\AssemblyResolution.cs" />
212+
<Compile Include="infrastructure\mockups\IPackage.cs" />
208213
<Compile Include="infrastructure\synchronization\GlobalMutex.cs" />
209214
<Compile Include="infrastructure\logging\TraceLog.cs" />
210215
<Compile Include="infrastructure\registration\SecurityProtocol.cs" />
@@ -240,8 +245,6 @@
240245
<Compile Include="infrastructure.app\domain\PinCommandType.cs" />
241246
<Compile Include="infrastructure.app\domain\SourceCommandType.cs" />
242247
<Compile Include="infrastructure.app\events\PostRunMessage.cs" />
243-
<Compile Include="infrastructure.app\nuget\ChocolateyNugetCredentialProvider.cs" />
244-
<Compile Include="infrastructure.app\nuget\ChocolateyClientCertificateProvider.cs" />
245248
<Compile Include="infrastructure.app\nuget\NugetPush.cs" />
246249
<Compile Include="infrastructure.app\runners\GenericRunner.cs" />
247250
<Compile Include="infrastructure.app\services\AutomaticUninstallerService.cs" />
@@ -277,15 +280,10 @@
277280
<Compile Include="infrastructure.app\domain\installers\MsiInstaller.cs" />
278281
<Compile Include="infrastructure.app\domain\installers\NsisInstaller.cs" />
279282
<Compile Include="infrastructure.app\domain\RegistryApplicationKey.cs" />
280-
<Compile Include="infrastructure.app\nuget\ChocolateyLocalPackageRepository.cs" />
281283
<Compile Include="infrastructure.app\nuget\ChocolateyNugetLogger.cs" />
282284
<Compile Include="infrastructure.app\events\PreRunMessage.cs" />
283-
<Compile Include="infrastructure.app\nuget\ChocolateyPackagePathResolver.cs" />
284-
<Compile Include="infrastructure.app\nuget\ChocolateyPhysicalFileSystem.cs" />
285285
<Compile Include="infrastructure.app\nuget\DictionaryPropertyProvider.cs" />
286286
<Compile Include="infrastructure.app\nuget\NugetCommon.cs" />
287-
<Compile Include="infrastructure.app\nuget\NuGetFileSystemExtensions.cs" />
288-
<Compile Include="infrastructure.app\nuget\NugetList.cs" />
289287
<Compile Include="infrastructure.app\nuget\NugetPack.cs" />
290288
<Compile Include="infrastructure.app\runners\ConsoleApplication.cs" />
291289
<Compile Include="infrastructure.app\services\ChocolateyPackageInformationService.cs" />

Diff for: src/chocolatey/infrastructure.app/commands/ChocolateyPinCommand.cs

+6-5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ namespace chocolatey.infrastructure.app.commands
2727
using infrastructure.commands;
2828
using infrastructure.configuration;
2929
using logging;
30+
using mockups;
3031
using nuget;
3132
using NuGet.Common;
3233
using NuGet.Versioning;
@@ -147,7 +148,7 @@ public virtual void noop(ChocolateyConfiguration configuration)
147148

148149
public virtual void run(ChocolateyConfiguration configuration)
149150
{
150-
var packageManager = NugetCommon.GetPackageManager(configuration, _nugetLogger,
151+
/*var packageManager = NugetCommon.GetPackageManager(configuration, _nugetLogger,
151152
new PackageDownloader(),
152153
installSuccessAction: null,
153154
uninstallSuccessAction: null,
@@ -161,9 +162,9 @@ public virtual void run(ChocolateyConfiguration configuration)
161162
case PinCommandType.remove:
162163
set_pin(packageManager, configuration);
163164
break;
164-
}
165+
}*/
165166
}
166-
167+
/*
167168
public virtual void list_pins(IPackageManager packageManager, ChocolateyConfiguration config)
168169
{
169170
var input = config.Input;
@@ -189,7 +190,7 @@ public virtual void set_pin(IPackageManager packageManager, ChocolateyConfigurat
189190
var addingAPin = config.PinCommand.Command == PinCommandType.add;
190191
this.Log().Info("Trying to {0} a pin for {1}".format_with(config.PinCommand.Command.to_string(), config.PinCommand.Name));
191192
var versionUnspecified = string.IsNullOrWhiteSpace(config.Version);
192-
SemanticVersion semanticVersion = versionUnspecified ? null : new SemanticVersion(config.Version);
193+
SemanticVersion semanticVersion = versionUnspecified ? null : new SemanticVersion(SemanticVersion.Parse(config.Version));
193194
IPackage installedPackage = packageManager.LocalRepository.FindPackage(config.PinCommand.Name, semanticVersion);
194195
if (installedPackage == null)
195196
{
@@ -222,7 +223,7 @@ public virtual void set_pin(IPackageManager packageManager, ChocolateyConfigurat
222223
this.Log().Warn(NO_CHANGE_MESSAGE);
223224
}
224225
}
225-
226+
*/
226227
public virtual bool may_require_admin_access()
227228
{
228229
var config = Config.get_configuration_settings();

Diff for: src/chocolatey/infrastructure.app/domain/ChocolateyPackageInformation.cs

+3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616

1717
namespace chocolatey.infrastructure.app.domain
1818
{
19+
using mockups;
1920
using NuGet;
21+
using NuGet.Versioning;
22+
using results;
2023

2124
public sealed class ChocolateyPackageInformation
2225
{

Diff for: src/chocolatey/infrastructure.app/nuget/ChocolateyClientCertificateProvider.cs

-72
This file was deleted.

Diff for: src/chocolatey/infrastructure.app/nuget/ChocolateyLocalPackageRepository.cs

-84
This file was deleted.

0 commit comments

Comments
 (0)