Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenba committed Jun 7, 2016
2 parents 9d34c91 + 10bd5d5 commit 8f9cbcb
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 57 deletions.
4 changes: 2 additions & 2 deletions src/CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("2.11.1.0")]
[assembly: AssemblyFileVersion("2.11.1.0")]
[assembly: AssemblyVersion("2.11.2.0")]
[assembly: AssemblyFileVersion("2.11.2.0")]

[assembly: NeutralResourcesLanguage("en-US")]
2 changes: 1 addition & 1 deletion src/NuGet.Server/Core/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static string GetRepositoryUrl(Uri currentUrl, string applicationPath)

public static string GetPushUrl(Uri currentUrl, string applicationPath)
{
return GetBaseUrl(currentUrl, applicationPath) + "nuget";
return GetBaseUrl(currentUrl, applicationPath) + "api/v2/package";
}

public static string GetBaseUrl(Uri currentUrl, string applicationPath)
Expand Down
6 changes: 3 additions & 3 deletions src/NuGet.Server/Default.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<strong><%= Helpers.GetRepositoryUrl(Request.Url, Request.ApplicationPath) %></strong>
</blockquote>
<% if (string.IsNullOrEmpty(ConfigurationManager.AppSettings["apiKey"])) { %>
To enable pushing packages to this feed using the nuget command line tool (nuget.exe). Set the api key appSetting in web.config.
To enable pushing packages to this feed using the <a href="https://www.nuget.org/downloads">NuGet command line tool</a> (nuget.exe), set the api key appSetting in web.config.
<% } else { %>
Use the command below to push packages to this feed using the nuget command line tool (nuget.exe).
Use the command below to push packages to this feed using the <a href="https://www.nuget.org/downloads">NuGet command line tool</a> (nuget.exe).
<% } %>
<blockquote>
<strong>nuget push {package file} -s <%= Helpers.GetPushUrl(Request.Url, Request.ApplicationPath) %> {apikey}</strong>
<strong>nuget.exe push {package file} {apikey} -Source <%= Helpers.GetPushUrl(Request.Url, Request.ApplicationPath) %></strong>
</blockquote>
</fieldset>

Expand Down
24 changes: 14 additions & 10 deletions src/NuGet.Server/NuGet.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="..\..\NuGet.Settings.targets" />
<PropertyGroup>
Expand All @@ -15,6 +15,8 @@
<UseGlobalApplicationHostFile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup>
<ProjectGuid>{793B20A9-E263-4B54-BB31-305B602087CE}</ProjectGuid>
Expand All @@ -29,10 +31,12 @@
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Web.XmlTransform, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
<Private>True</Private>
</Reference>
Expand All @@ -47,21 +51,25 @@
<Private>True</Private>
</Reference>
<Reference Include="RouteMagic, Version=1.3.0.0, Culture=neutral, PublicKeyToken=84b59be021aa4cee, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\RouteMagic.1.3\lib\net40\RouteMagic.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data.Services" />
<Reference Include="System.Data.Services.Client" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Activation" />
<Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="WebActivatorEx, Version=2.0.0.0, Culture=neutral, PublicKeyToken=7b26dc2a43f6a0d4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\WebActivatorEx.2.1.0\lib\net40\WebActivatorEx.dll</HintPath>
Expand Down Expand Up @@ -141,11 +149,7 @@
<Content Include="web.config.install.xdt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="packages.config">
<SubType>Designer</SubType>
</Content>
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Strings.resx">
Expand Down
2 changes: 1 addition & 1 deletion src/NuGet.Server/Strings.Designer.cs

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

50 changes: 31 additions & 19 deletions src/NuGet.Server/Web.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
Expand All @@ -8,33 +8,28 @@
<!--
Determines if an Api Key is required to push\delete packages from the server.
-->
<add key="requireApiKey" value="true" />

<add key="requireApiKey" value="true"/>
<!--
Set the value here to allow people to push/delete packages from the server.
NOTE: This is a shared key (password) for all users.
-->
<add key="apiKey" value="" />

<add key="apiKey" value=""/>
<!--
Change the path to the packages folder. Default is ~/Packages.
This can be a virtual or physical path.
-->
<add key="packagesPath" value="" />

<add key="packagesPath" value=""/>
<!--
Set allowOverrideExistingPackageOnPush to false to mimic NuGet.org's behaviour (do not allow overwriting packages with same id + version).
-->
<add key="allowOverrideExistingPackageOnPush" value="false" />

<add key="allowOverrideExistingPackageOnPush" value="false"/>
<!--
Set ignoreSymbolsPackages to true to filter out symbols packages. Since NuGet.Server does not come with a symbol server,
it makes sense to ignore this type of packages. When enabled, files named `.symbols.nupkg` or packages containing a `/src` folder will be ignored.
If you only push .symbols.nupkg packages, set this to false so that packages can be uploaded.
-->
<add key="ignoreSymbolsPackages" value="true" />

<add key="ignoreSymbolsPackages" value="true"/>
<!--
Set enableDelisting to true to enable delist instead of delete as a result of a "nuget delete" command.
- delete: package is deleted from the repository's local filesystem.
Expand All @@ -44,31 +39,48 @@
- "nuget install packageid -version version" command will succeed for both listed and delisted packages.
e.g. delisted packages can still be downloaded by clients that explicitly specify their version.
-->
<add key="enableDelisting" value="false" />

<add key="enableDelisting" value="false"/>
<!--
Set enableFrameworkFiltering to true to enable filtering packages by their supported frameworks during search.
-->
<add key="enableFrameworkFiltering" value="false" />

<add key="enableFrameworkFiltering" value="false"/>
<!--
When running NuGet.Server in a NAT network, ASP.NET may embed the erver's internal IP address in the V2 feed.
Uncomment the following configuration entry to enable NAT support.
-->
<!-- <add key="aspnet:UseHostHeaderForRequestUrl" value="true" /> -->
</appSettings>
<!--
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.
The following attributes can be set on the <httpRuntime> tag.
<system.Web>
<httpRuntime targetFramework="4.6" />
</system.Web>
-->
<system.web>
<httpRuntime maxRequestLength="31457280" />
<compilation debug="true" />
<httpRuntime maxRequestLength="31457280"/>
<compilation debug="true" targetFramework="4.6"/>
</system.web>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
</system.serviceModel>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".nupkg" mimeType="application/zip" />
<mimeMap fileExtension=".nupkg" mimeType="application/zip"/>
</staticContent>
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule"/>
</modules>
<handlers>
<remove name="WebDAV"/>
<remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,PUT,DEBUG" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0"/>
</handlers>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="31457280"/>
</requestFiltering>
</security>
</system.webServer>
</configuration>
12 changes: 6 additions & 6 deletions src/NuGet.Server/packages.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
<package id="NuGet.Core" version="2.11.1" targetFramework="net45" />
<package id="RouteMagic" version="1.3" targetFramework="net40" />
<package id="WebActivatorEx" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net46" />
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net46" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net46" />
<package id="NuGet.Core" version="2.11.1" targetFramework="net46" />
<package id="RouteMagic" version="1.3" targetFramework="net46" />
<package id="WebActivatorEx" version="2.1.0" targetFramework="net46" />
</packages>
21 changes: 16 additions & 5 deletions test/NuGet.Server.Tests/NuGet.Server.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\NuGet.Settings.targets" />
<PropertyGroup>
<ProjectGuid>{92D18050-3867-4E39-B305-9F9870F66F5E}</ProjectGuid>
Expand All @@ -8,6 +8,8 @@
<RootNamespace>NuGet.Server.Tests</RootNamespace>
<AssemblyName>NuGet.Server.Tests</AssemblyName>
<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -19,13 +21,18 @@
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="Castle.Core">
<HintPath>..\..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Web.XmlTransform, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Moq, Version=4.5.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<Reference Include="Moq, Version=4.5.8.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Moq.4.5.0\lib\net45\Moq.dll</HintPath>
<HintPath>..\..\packages\Moq.4.5.8\lib\net45\Moq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
Expand All @@ -46,18 +53,22 @@
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Web" />
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.assert, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.core, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll</HintPath>
<Private>True</Private>
</Reference>
Expand Down Expand Up @@ -87,10 +98,10 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
21 changes: 11 additions & 10 deletions test/NuGet.Server.Tests/packages.config
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net45" />
<package id="Moq" version="4.5.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
<package id="NuGet.Core" version="2.11.1" targetFramework="net45" />
<package id="xunit" version="2.1.0" targetFramework="net45" />
<package id="xunit.abstractions" version="2.0.0" targetFramework="net45" />
<package id="xunit.assert" version="2.1.0" targetFramework="net45" />
<package id="xunit.core" version="2.1.0" targetFramework="net45" />
<package id="xunit.extensibility.core" version="2.1.0" targetFramework="net45" />
<package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net45" />
<package id="Castle.Core" version="3.3.3" targetFramework="net46" />
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net46" />
<package id="Moq" version="4.5.8" targetFramework="net46" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net46" />
<package id="NuGet.Core" version="2.11.1" targetFramework="net46" />
<package id="xunit" version="2.1.0" targetFramework="net46" />
<package id="xunit.abstractions" version="2.0.0" targetFramework="net46" />
<package id="xunit.assert" version="2.1.0" targetFramework="net46" />
<package id="xunit.core" version="2.1.0" targetFramework="net46" />
<package id="xunit.extensibility.core" version="2.1.0" targetFramework="net46" />
<package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net46" />
</packages>

0 comments on commit 8f9cbcb

Please sign in to comment.