Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #3308 from NuGet/dev
Merge dev to master for deployment 2016.10
  • Loading branch information
skofman1 committed Oct 24, 2016
2 parents aa73ad5 + acc5cde commit 27869a9
Show file tree
Hide file tree
Showing 70 changed files with 902 additions and 287 deletions.
Expand Up @@ -67,7 +67,7 @@ private async Task<HttpResponseMessage> GetWithRetry(IEnumerable<Uri> endpoints,
// Create requests queue
var tasks = CreateRequestQueue(healthyEndpoints, httpClient, cancellationTokenSource);

// When the first succesful task comes in, return it. If no succesfull tasks are returned, throw an AggregateException.
// When the first successful task comes in, return it. If no successful tasks are returned, throw an AggregateException.
var exceptions = new List<Exception>();

var taskList = tasks.ToList();
Expand Down
Expand Up @@ -67,7 +67,7 @@ private void SetResponseCorrelationId(HttpRequestMessage request, HttpResponseMe
if (response != null)
{
// Do not allow overriding the header - if any code wants to set the correlation id
// it shoud set the request property instead.
// it should set the request property instead.
if (response.Headers.Contains(CorrelationIdHttpHeaderName))
{
response.Headers.Remove(CorrelationIdHttpHeaderName);
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery.Core/Auditing/CredentialAuditRecord.cs
Expand Up @@ -21,7 +21,7 @@ public CredentialAuditRecord(Credential credential, bool removed)
Type = credential.Type;
Identity = credential.Identity;

// Track the value for credentials that are definitely revokable (API Key, etc.) and have been removed
// Track the value for credentials that are definitely revocable (API Key, etc.) and have been removed
if (removed && !CredentialTypes.IsPassword(credential.Type))
{
Value = credential.Value;
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery.Core/Auditing/PackageCreatedVia.cs
Expand Up @@ -11,7 +11,7 @@ public static class PackageCreatedVia
public const string Api = "Created via API.";

/// <summary>
/// Package has been created via Nuget web interface (browser)
/// Package has been created via NuGet web interface (browser)
/// </summary>
public const string Web = "Created via web.";
}
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery.Core/Entities/EntitiesContext.cs
Expand Up @@ -72,7 +72,7 @@ public Database GetDatabase()
return Database;
}

#pragma warning disable 618 // TODO: remove Package.Authors completely once prodution services definitely no longer need it
#pragma warning disable 618 // TODO: remove Package.Authors completely once production services definitely no longer need it
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Entity<Credential>()
Expand Down
4 changes: 2 additions & 2 deletions src/NuGetGallery.Core/Entities/Package.cs
Expand Up @@ -13,7 +13,7 @@ public class Package
: IEntity
{

#pragma warning disable 618 // TODO: remove Package.Authors completely once prodution services definitely no longer need it
#pragma warning disable 618 // TODO: remove Package.Authors completely once production services definitely no longer need it
public Package()
{
Authors = new HashSet<PackageAuthor>();
Expand Down Expand Up @@ -142,7 +142,7 @@ public Package()

public virtual ICollection<PackageLicenseReport> LicenseReports { get; set; }

// Pre-calcuated data for the feed
// Pre-calculated data for the feed
public string LicenseNames { get; set; }
public string LicenseReportUrl { get; set; }

Expand Down
7 changes: 5 additions & 2 deletions src/NuGetGallery.Core/Entities/User.cs
Expand Up @@ -9,8 +9,7 @@

namespace NuGetGallery
{
public class User
: IEntity
public class User : IEntity
{
public User() : this(null)
{
Expand Down Expand Up @@ -57,6 +56,10 @@ public bool Confirmed

public DateTime? CreatedUtc { get; set; }

public DateTime? LastFailedLoginUtc { get; set; }

public int FailedLoginCount { get; set; }

public string LastSavedEmailAddress
{
get
Expand Down
Expand Up @@ -141,7 +141,7 @@ public string DoExport(string blobUri, bool whatIf)
}
catch (WebException responseException)
{
_log.Error("Request Falied:{0}", responseException.Message);
_log.Error("Request Failed:{0}", responseException.Message);
if (responseException.Response != null)
{
_log.Error("Status Code: {0}", ((HttpWebResponse)responseException.Response).StatusCode);
Expand Down Expand Up @@ -227,7 +227,7 @@ public string DoExport(string blobUri, bool whatIf)
// }
// catch (WebException responseException)
// {
// Console.WriteLine("Request Falied: {0}", responseException.Message);
// Console.WriteLine("Request Failed: {0}", responseException.Message);
// {
// Console.WriteLine("Status Code: {0}", ((HttpWebResponse)responseException.Response).StatusCode);
// Console.WriteLine("Status Description: {0}\n\r", ((HttpWebResponse)responseException.Response).StatusDescription);
Expand Down
Expand Up @@ -59,7 +59,7 @@ public override void ExecuteCommand()
var downloadedPackageFilePath = Path.Combine(Util.GetTempFolder(), packageFileName);

// Why are we still downloading/uploading instead of using Async Blob Copy?
// Because it feels a little safer to ensure we know the copy is truely complete before continuing.
// Because it feels a little safer to ensure we know the copy is truly complete before continuing.
// I could be convinced otherwise though
// - anurse
Log.Trace("Downloading package file '{0}' to temporary file '{1}'.", packageFileName, downloadedPackageFilePath);
Expand Down
Expand Up @@ -191,7 +191,7 @@ private void CreateDirtyPerPackageReports()
bag[index++] = packageId;
}

// limit the potential concurrency becasue this is against SQL
// limit the potential concurrency because this is against SQL

ParallelOptions options = new ParallelOptions() { MaxDegreeOfParallelism = 4 };

Expand Down
Expand Up @@ -105,7 +105,7 @@ private void ProcessDuplicate(string id, string normalVersion, List<PackageSumma
}
else
{
// Select the most recent pacakge
// Select the most recent package
var selected = packages.OrderByDescending(p => p.Published).FirstOrDefault();
if (selected == null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery.Operations/Tasks/SendMailTask.cs
Expand Up @@ -70,7 +70,7 @@ public override void ExecuteCommand()
ServicePointManager.ServerCertificateValidationCallback = delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; };
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();

//Set the from and to mail addressess.
//Set the from and to mail addresses.
message.From = new MailAddress(UserAccount, "NuGet Gallery Support");

string[] replyTo = ReplyToList.Split(new char[] { ',' });
Expand Down
2 changes: 2 additions & 0 deletions src/NuGetGallery/App_Start/DefaultDependenciesModule.cs
Expand Up @@ -78,6 +78,8 @@ protected override void Load(ContainerBuilder builder)
.SingleInstance();
}

builder.RegisterType<DateTimeProvider>().AsSelf().As<IDateTimeProvider>().SingleInstance();

builder.RegisterType<HttpContextCacheService>()
.AsSelf()
.As<ICacheService>()
Expand Down
Expand Up @@ -26,7 +26,7 @@ public SupportRequestDbContext()

/// <summary>
/// The NuGet Gallery code should usually use this constructor,
/// so that we can configure the connection via the Cloud Service configuraton.
/// so that we can configure the connection via the Cloud Service configuration.
/// </summary>
public SupportRequestDbContext(string connectionString)
: base(connectionString)
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery/Areas/Admin/Views/Home/Index.cshtml
Expand Up @@ -43,7 +43,7 @@
<h2>
<a class="action-menu-link" href="@Url.Action(actionName: "Index", controllerName: "Lucene")">
<i class="icon-search action-menu-icon"></i>
<span class="action-menu-text">Lucene Index Maintainance</span>
<span class="action-menu-text">Lucene Index Maintenance</span>
</a>
</h2>
<p>
Expand Down
4 changes: 2 additions & 2 deletions src/NuGetGallery/Areas/Admin/Views/Lucene/Index.cshtml
@@ -1,10 +1,10 @@
@model NuGetGallery.Areas.Admin.Models.LuceneInfoModel
@{
ViewBag.Title = "Lucene Maintainance";
ViewBag.Title = "Lucene Maintenance";
TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
}

<h2>Lucene Maintainance</h2>
<h2>Lucene Maintenance</h2>

@if (Model.LastUpdated == null)
{
Expand Down
16 changes: 16 additions & 0 deletions src/NuGetGallery/Authentication/AuthenticateExternalLoginResult.cs
@@ -0,0 +1,16 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Security.Claims;
using NuGetGallery.Authentication.Providers;

namespace NuGetGallery.Authentication
{
public class AuthenticateExternalLoginResult
{
public AuthenticatedUser Authentication { get; set; }
public ClaimsIdentity ExternalIdentity { get; set; }
public Authenticator Authenticator { get; set; }
public Credential Credential { get; set; }
}
}

0 comments on commit 27869a9

Please sign in to comment.