Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

more clean-up after removing distrubted cache; fixing tab spacing for…

… code review
  • Loading branch information...
commit 8e4c1b7bf45562965e1ef3addc1bedc23cbb5b22 1 parent f17ca2a
@half-ogre half-ogre authored
View
7 Scripts/Package.ps1
@@ -1,6 +1,4 @@
param(
- $azureCacheAuthToken = $env:NUGET_GALLERY_AZURE_CACHE_AUTH_TOKEN,
- $azureCacheEndpoint = $env:NUGET_GALLERY_AZURE_CACHE_ENDPOINT,
$azureStorageAccessKey = $env:NUGET_GALLERY_AZURE_STORAGE_ACCESS_KEY,
$azureStorageAccountName = $env:NUGET_GALLERY_AZURE_STORAGE_ACCOUNT_NAME,
$azureStorageBlobUrl = $env:NUGET_GALLERY_AZURE_STORAGE_BLOB_URL,
@@ -22,8 +20,6 @@ $ScriptRoot = (Split-Path -parent $MyInvocation.MyCommand.Definition)
. $ScriptRoot\_Common.ps1
#Validate Sutff
-require-param -value $azureCacheAuthToken -paramName "azureCacheAuthToken"
-require-param -value $azureCacheEndpoint -paramName "azureCacheEndpoint"
require-param -value $azureStorageAccessKey -paramName "azureStorageAccessKey"
require-param -value $azureStorageAccountName -paramName "azureStorageAccountName"
require-param -value $azureStorageBlobUrl -paramName "azureStorageBlobUrl"
@@ -157,9 +153,6 @@ set-machinekey $webConfigPath
#Release Tag stuff
print-message("Setting the release tags")
-set-appsetting -path $webConfigPath -name "Gallery:AzureCacheAuthToken" -value $azureCacheAuthToken
-set-appsetting -path $webConfigPath -name "Gallery:AzureCacheEndpoint" -value $azureCacheEndpoint
-set-appsetting -path $webConfigPath -name "Gallery:ReleaseName" -value "NuGet 1.6 'Hershey'"
set-appsetting -path $webConfigPath -name "Gallery:ReleaseName" -value "NuGet 1.6 'Hershey'"
set-appsetting -path $webConfigPath -name "Gallery:ReleaseTime" -value (Get-Date -format "dd/MM/yyyy HH:mm:ss")
set-appsetting -path $webConfigPath -name "Gallery:ReleaseSha" -value $commitSha
View
3  Website/App_Start/ContainerBindings.cs
@@ -145,8 +145,7 @@ public override void Load()
.InSingletonScope();
break;
case PackageStoreType.AzureStorageBlob:
-
- Bind<ICloudBlobClient>()
+ Bind<ICloudBlobClient>()
.ToMethod(context => new CloudBlobClientWrapper(new CloudBlobClient(
new Uri(configuration.AzureStorageBlobUrl, UriKind.Absolute),
new StorageCredentialsAccountAndKey(configuration.AzureStorageAccountName, configuration.AzureStorageAccessKey))))
View
2  Website/App_Start/IConfiguration.cs
@@ -3,7 +3,7 @@ namespace NuGetGallery
{
public interface IConfiguration
{
- string AzureStorageAccessKey { get; }
+ string AzureStorageAccessKey { get; }
string AzureStorageAccountName { get; }
string AzureStorageBlobUrl { get; }
string FileStorageDirectory { get; }
View
23 Website/App_Start/Routes.cs
@@ -105,17 +105,17 @@ public static void RegisterRoutes(RouteCollection routes)
routes.MapRoute(
RouteName.CreateCuratedPackageForm,
"forms/add-package-to-curated-feed",
- new { controller = CuratedPackagesController.ControllerName, action = "CreateCuratedPackageForm" });
+ new { controller = CuratedPackagesController.ControllerName, action = "CreateCuratedPackageForm" });
routes.MapRoute(
RouteName.CuratedPackage,
"curated-feeds/{curatedFeedName}/curated-packages/{curatedPackageId}",
- new { controller = CuratedPackagesController.ControllerName, action = "CuratedPackage" });
+ new { controller = CuratedPackagesController.ControllerName, action = "CuratedPackage" });
routes.MapRoute(
RouteName.CuratedPackages,
"curated-feeds/{curatedFeedName}/curated-packages",
- new { controller = CuratedPackagesController.ControllerName, action = "CuratedPackages" });
+ new { controller = CuratedPackagesController.ControllerName, action = "CuratedPackages" });
// TODO : Most of the routes are essentially of the format api/v{x}/*. We should refactor the code to vary them by the version.
// V1 Routes
@@ -198,16 +198,15 @@ public static void RegisterRoutes(RouteCollection routes)
defaults: null,
constraints: new { httpMethod = new HttpMethodConstraint("DELETE") });
- // V2 routes
- routes.MapRoute(
- "v2PackageIds",
- "api/v2/package-ids",
- MVC.Api.GetPackageIds());
+ routes.MapRoute(
+ "v2PackageIds",
+ "api/v2/package-ids",
+ MVC.Api.GetPackageIds());
- routes.MapRoute(
- "v2PackageVersions",
- "api/v2/package-versions/{id}",
- MVC.Api.GetPackageVersions());
+ routes.MapRoute(
+ "v2PackageVersions",
+ "api/v2/package-versions/{id}",
+ MVC.Api.GetPackageVersions());
routes.MapServiceRoute(
RouteName.V2ApiCuratedFeed,
View
2  Website/Constants.cs
@@ -29,7 +29,5 @@ public static class Constants
public const string UploadFileNameTemplate = "{0}{1}";
public const string UploadsFolderName = "uploads";
public const string NuGetCommandLinePackageId = "NuGet.CommandLine";
- public const string PackageIdsCacheKey = "PackageIds";
- public const string PackageVersionsCacheKeyFormat = "PackageVersions.{0}";
}
}
View
2  Website/Controllers/AppController.cs
@@ -3,7 +3,7 @@
namespace NuGetGallery
{
- public abstract partial class AppController : Controller
+ public abstract class AppController : Controller
{
protected virtual IIdentity Identity
{
View
4 Website/Controllers/CuratedFeedsController.cs
@@ -4,12 +4,12 @@
namespace NuGetGallery
{
[Authorize]
- public partial class CuratedFeedsController : AppController
+ public partial class CuratedFeedsController : AppController
{
public const string ControllerName = "CuratedFeeds";
[HttpGet]
- public virtual ActionResult CuratedFeed(string name)
+ public virtual ActionResult CuratedFeed(string name)
{
var curatedFeed = GetService<ICuratedFeedByNameQuery>().Execute(name, includePackages: true);
if (curatedFeed == null)
View
10 Website/Controllers/CuratedPackagesController.cs
@@ -4,12 +4,12 @@
namespace NuGetGallery
{
[Authorize]
- public partial class CuratedPackagesController : AppController
+ public partial class CuratedPackagesController : AppController
{
public const string ControllerName = "CuratedPackages";
[ActionName("CreateCuratedPackageForm"), HttpGet]
- public virtual ActionResult GetCreateCuratedPackageForm(string curatedFeedName)
+ public virtual ActionResult GetCreateCuratedPackageForm(string curatedFeedName)
{
var curatedFeed = GetService<ICuratedFeedByNameQuery>().Execute(curatedFeedName);
if (curatedFeed == null)
@@ -23,7 +23,7 @@ public virtual ActionResult GetCreateCuratedPackageForm(string curatedFeedName)
}
[ActionName("CuratedPackage"), HttpDelete]
- public virtual ActionResult DeleteCuratedPackage(
+ public virtual ActionResult DeleteCuratedPackage(
string curatedFeedName,
string curatedPackageId)
{
@@ -46,7 +46,7 @@ public virtual ActionResult GetCreateCuratedPackageForm(string curatedFeedName)
}
[ActionName("CuratedPackage"), AcceptVerbs("patch")]
- public virtual ActionResult PatchCuratedPackage(
+ public virtual ActionResult PatchCuratedPackage(
string curatedFeedName,
string curatedPackageId,
ModifyCuratedPackageRequest request)
@@ -74,7 +74,7 @@ public virtual ActionResult GetCreateCuratedPackageForm(string curatedFeedName)
}
[ActionName("CuratedPackages"), HttpPost]
- public virtual ActionResult PostCuratedPackages(
+ public virtual ActionResult PostCuratedPackages(
string curatedFeedName,
CreateCuratedPackageRequest request)
{
View
42 Website/Infrastructure/JsonNetResult.cs
@@ -4,29 +4,29 @@
namespace NuGetGallery
{
- public class JsonNetResult : ActionResult
- {
- private readonly object _data;
+ public class JsonNetResult : ActionResult
+ {
+ private readonly object _data;
- public JsonNetResult(object data)
- {
- if (data == null)
- throw new ArgumentNullException("data");
+ public JsonNetResult(object data)
+ {
+ if (data == null)
+ throw new ArgumentNullException("data");
- _data = data;
- }
+ _data = data;
+ }
- public override void ExecuteResult(ControllerContext context)
- {
- if (context == null)
- throw new ArgumentNullException("context");
+ public override void ExecuteResult(ControllerContext context)
+ {
+ if (context == null)
+ throw new ArgumentNullException("context");
- var response = context.HttpContext.Response;
- response.ContentType = "application/json";
- var writer = new JsonTextWriter(response.Output);
- var serializer = JsonSerializer.Create(new JsonSerializerSettings());
- serializer.Serialize(writer, _data);
- writer.Flush();
- }
- }
+ var response = context.HttpContext.Response;
+ response.ContentType = "application/json";
+ var writer = new JsonTextWriter(response.Output);
+ var serializer = JsonSerializer.Create(new JsonSerializerSettings());
+ serializer.Serialize(writer, _data);
+ writer.Flush();
+ }
+ }
}
View
1  Website/Web.config
@@ -12,7 +12,6 @@
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
</sectionGroup>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" />
</configSections>
<appSettings>
<add key="webpages:Version" value="1.0.0.0" />
View
9 Website/Website.csproj
@@ -67,17 +67,8 @@
<Reference Include="MarkdownSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MarkdownSharp.1.13.0.0\lib\35\MarkdownSharp.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.ApplicationServer.Caching.Client, Version=101.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\packages\WindowsAzure.Caching.1.6.0.0\lib\net35-full\Microsoft.ApplicationServer.Caching.Client.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.ApplicationServer.Caching.Core, Version=101.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\packages\WindowsAzure.Caching.1.6.0.0\lib\net35-full\Microsoft.ApplicationServer.Caching.Core.dll</HintPath>
- </Reference>
<Reference Include="Microsoft.Build.Framework" />
<Reference Include="Microsoft.Build.Utilities.v4.0" />
- <Reference Include="Microsoft.Web.DistributedCache, Version=101.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\packages\WindowsAzure.Caching.1.6.0.0\lib\net35-full\Microsoft.Web.DistributedCache.dll</HintPath>
- </Reference>
<Reference Include="Microsoft.Web.Helpers">
<HintPath>..\packages\microsoft-web-helpers.1.15\lib\Microsoft.Web.Helpers.dll</HintPath>
</Reference>
View
1  Website/packages.config
@@ -35,7 +35,6 @@
<package id="WebActivator" version="1.4.4" />
<package id="WebBackgrounder" version="0.1" />
<package id="WebBackgrounder.EntityFramework" version="0.1" />
- <package id="WindowsAzure.Caching" version="1.6.0.0" />
<package id="WindowsAzure.Storage" version="1.6" />
<package id="ZeroClipboard" version="1.0.7" />
</packages>
Please sign in to comment.
Something went wrong with that request. Please try again.