Skip to content

Commit

Permalink
Merge pull request #5592 from NuGet/dev
Browse files Browse the repository at this point in the history
[ReleasePrep][2018.03.09]RI of dev into master
  • Loading branch information
Scott Bommarito committed Mar 12, 2018
2 parents e154636 + 5921ff4 commit 7e0f3c7
Show file tree
Hide file tree
Showing 145 changed files with 4,752 additions and 2,142 deletions.
4 changes: 4 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ trap {
if (-not (Test-Path "$PSScriptRoot/build")) {
New-Item -Path "$PSScriptRoot/build" -ItemType "directory"
}

# Enable TLS 1.2 since GitHub requires it.
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12

wget -UseBasicParsing -Uri "https://github.com/NuGet/ServerCommon/$BuildBranch/build/init.ps1" -OutFile "$PSScriptRoot/build/init.ps1"
. "$PSScriptRoot/build/init.ps1" -BuildBranch "$BuildBranch"

Expand Down
99 changes: 97 additions & 2 deletions src/Bootstrap/dist/css/bootstrap-theme.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/Bootstrap/less/theme/all.less
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@
@import "page-statistics-overview.less";
@import "page-statistics-per-package.less";
@import "page-status.less";
@import "page-upload.less";
@import "page-transform-account.less";
@import "page-upload.less";
37 changes: 35 additions & 2 deletions src/Bootstrap/less/theme/modals.less
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

.modal-body {
padding: 0px;
font-size: 14px;

.tag-node {
background-color: #fff4ce;
Expand All @@ -50,7 +51,7 @@
}

.action-node {
padding: 9% 6%;
padding: 0% 6%;
text-align: center;
}

Expand All @@ -59,8 +60,40 @@
line-height: 2em;
}

.form-button-node {
padding-left: 65%;
padding-right: 0;
padding-bottom: 0;
text-align: center;
}

.username-submit {
padding-top: 13%;
}

.email-submit {
padding-top: 16%;
}

.close-button {
padding-top: 27%;
}

.text-label {
padding: 15px;
}

.form-error-message {
padding-top: 6px;
float: left;
}

.text-row {
padding-top: 13px;
}

.transform-text {
padding: 0px 15px;
padding: 40px 15px;
margin: 0px;
}
}
Expand Down
16 changes: 16 additions & 0 deletions src/Bootstrap/less/theme/page-manage-organizations.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,20 @@

.manage-members-listing {
margin-bottom: 0;

.heading-left {
padding-left: 5px;
}

.heading-right {
padding-right: 5px;
}

.icon-left {
padding-left: 25px;
}

.member-icon {
vertical-align: middle;
}
}
4 changes: 4 additions & 0 deletions src/Bootstrap/less/theme/page-manage-packages.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
margin-top: 0;
}

.subtitle {
margin-top: 24px;
}

.form-section-title {
margin-top: @section-margin-top;

Expand Down
24 changes: 24 additions & 0 deletions src/Bootstrap/less/theme/page-transform-account.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.page-transform-account {
.center-box {
display: flex;
justify-content: space-between;
align-items: stretch;

.form-box {
display: flex;
justify-content: space-between;
flex-direction: column;
}

.logo-box {
display: flex;
justify-content: space-between;
flex-direction: column;
margin-bottom: 50px;

.logo {
flex-grow: 1;
}
}
}
}
3 changes: 2 additions & 1 deletion src/GalleryTools/Commands/HashCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private static async Task Hash(string connectionString, bool whatIf)

do
{
batch = allCredentials.Where(predicate).Take(BatchSize).ToList();
batch = allCredentials.Where(predicate).OrderBy(x => x.Key).Take(BatchSize).ToList();

if (batch.Count > 0)
{
Expand Down Expand Up @@ -97,6 +97,7 @@ private static async Task Hash(string connectionString, bool whatIf)
else
{
Console.WriteLine("Skipping DB save.");
allCredentials = allCredentials.Where(predicate).OrderBy(x => x.Key).Skip(batch.Count);
}

batchNumber++;
Expand Down
1 change: 1 addition & 0 deletions src/NuGetGallery.Core/CoreConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public static class CoreConstants
public const int MaxPackageIdLength = 128;

public const string PackageFileSavePathTemplate = "{0}.{1}{2}";
public const string PackageFileBackupSavePathTemplate = "{0}/{1}/{2}.{3}";

public const string NuGetPackageFileExtension = ".nupkg";

Expand Down
2 changes: 2 additions & 0 deletions src/NuGetGallery.Core/NuGetGallery.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
<Compile Include="Properties\AssemblyInfo.*.cs" />
<Compile Include="NuGetVersionExtensions.cs" />
<Compile Include="SemVerLevelKey.cs" />
<Compile Include="Services\AccessConditionWrapper.cs" />
<Compile Include="Services\CloudBlobClientWrapper.cs" />
<Compile Include="Services\CloudBlobContainerWrapper.cs" />
<Compile Include="Services\CloudBlobCoreFileStorageService.cs" />
Expand All @@ -241,6 +242,7 @@
<Compile Include="Services\CorePackageFileService.cs" />
<Compile Include="Services\CorePackageService.cs" />
<Compile Include="Services\CryptographyService.cs" />
<Compile Include="Services\IAccessCondition.cs" />
<Compile Include="Services\ICloudBlobClient.cs" />
<Compile Include="Services\ICloudBlobContainer.cs" />
<Compile Include="Services\ICoreMessageService.cs" />
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery.Core/Packaging/ManifestValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static IEnumerable<ValidationResult> Validate(Stream nuspecStream, out Nu
var rawMetadata = nuspecReader.GetMetadata();
if (rawMetadata != null && rawMetadata.Any())
{
return ValidateCore(PackageMetadata.FromNuspecReader(nuspecReader));
return ValidateCore(PackageMetadata.FromNuspecReader(nuspecReader, strict: true));
}
}
catch (Exception ex)
Expand Down
7 changes: 5 additions & 2 deletions src/NuGetGallery.Core/Packaging/PackageMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,18 @@ private Uri GetValue(string key, Uri alternateValue)
/// Gets package metadata from a the provided <see cref="NuspecReader"/> instance.
/// </summary>
/// <param name="nuspecReader">The <see cref="NuspecReader"/> instance used to read the <see cref="PackageMetadata"/></param>
/// <param name="strict">
/// Whether or not to be strict when reading the <see cref="NuspecReader"/>. This should be <code>true</code>
/// on initial ingestion but false when a package that has already been accepted is being processed.</param>
/// <exception cref="PackagingException">
/// We default to use a strict version-check on dependency groups.
/// When an invalid dependency version range is detected, a <see cref="PackagingException"/> will be thrown.
/// </exception>
public static PackageMetadata FromNuspecReader(NuspecReader nuspecReader)
public static PackageMetadata FromNuspecReader(NuspecReader nuspecReader, bool strict)
{
return new PackageMetadata(
nuspecReader.GetMetadata().ToDictionary(kvp => kvp.Key, kvp => kvp.Value),
nuspecReader.GetDependencyGroups(useStrictVersionCheck: true),
nuspecReader.GetDependencyGroups(useStrictVersionCheck: strict),
nuspecReader.GetFrameworkReferenceGroups(),
nuspecReader.GetPackageTypes(),
nuspecReader.GetMinClientVersion()
Expand Down
34 changes: 34 additions & 0 deletions src/NuGetGallery.Core/Services/AccessConditionWrapper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// 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 Microsoft.WindowsAzure.Storage;

namespace NuGetGallery
{
public class AccessConditionWrapper : IAccessCondition
{
private AccessConditionWrapper(string ifNoneMatchETag, string ifMatchETag)
{
IfNoneMatchETag = ifNoneMatchETag;
IfMatchETag = IfMatchETag;
}

public string IfNoneMatchETag { get; }

public string IfMatchETag { get; }

public static IAccessCondition GenerateIfMatchCondition(string etag)
{
return new AccessConditionWrapper(
ifNoneMatchETag: null,
ifMatchETag: AccessCondition.GenerateIfMatchCondition(etag).IfMatchETag);
}

public static IAccessCondition GenerateIfNotExistsCondition()
{
return new AccessConditionWrapper(
ifNoneMatchETag: AccessCondition.GenerateIfNotExistsCondition().IfNoneMatchETag,
ifMatchETag: null);
}
}
}
Loading

0 comments on commit 7e0f3c7

Please sign in to comment.