Permalink
Browse files

Merge branch 'qa'

Conflicts:
	src/NuGetGallery/Views/Packages/DisplayPackage.cshtml
  • Loading branch information...
2 parents 48c9aee + 2395b16 commit b394324938cb69dc368d4972aa87d9c0b1eafeef @anurse anurse committed Jan 29, 2014
Showing with 4,689 additions and 50 deletions.
  1. +148 −0 README.markdown.orig
  2. +19 −0 ops/Modules/NuGetOps/NuGetOps.psm1
  3. +10 −0 ops/Modules/NuGetOps/Private/ParseConfigurationSettings.ps1
  4. +33 −0 ops/Modules/NuGetOps/Public/Get-Configuration.ps1
  5. +25 −0 ops/Modules/NuGetOps/Public/Get-ConfigurationSettings.ps1
  6. +128 −0 src/NuGetGallery.Backend.Cloud/NuGetGallery.Backend.Cloud.ccproj.orig
  7. +284 −0 src/NuGetGallery.Operations/Tasks/HandleQueuedPackageEditsTask.cs.orig
  8. +2 −1 src/NuGetGallery.Operations/Tasks/ReplicatePackageStatisticsTask.cs
  9. +2 −2 src/NuGetGallery/Controllers/ApiController.cs
  10. +80 −0 src/NuGetGallery/ViewModels/ReportAbuseViewModel.cs.orig
  11. +47 −0 src/NuGetGallery/Views/Packages/ContactOwners.cshtml.orig
  12. +4 −4 src/NuGetGallery/Views/Packages/DisplayPackage.cshtml
  13. +101 −0 src/NuGetGallery/Views/Packages/ReportAbuse.cshtml.orig
  14. +58 −0 src/NuGetGallery/Views/Packages/ReportMyPackage.cshtml.orig
  15. +6 −0 tests/.nuget/NuGet.Config
  16. +153 −0 tests/.nuget/NuGet.targets
  17. +31 −0 tests/Local.testsettings
  18. +4 −2 tests/NuGetGallery.Facts/Controllers/ApiControllerFacts.cs
  19. +6 −0 tests/NuGetGallery.FunctionalTests.Fluent/App.config
  20. +128 −0 tests/NuGetGallery.FunctionalTests.Fluent/EditPackageAsPartOfUploadTest.cs
  21. +119 −0 tests/NuGetGallery.FunctionalTests.Fluent/EditPackageTest.cs
  22. +49 −0 tests/NuGetGallery.FunctionalTests.Fluent/ExtensionMethods.cs
  23. +62 −0 tests/NuGetGallery.FunctionalTests.Fluent/LogonTest.cs
  24. +50 −0 tests/NuGetGallery.FunctionalTests.Fluent/MinClientVersionFromUITest.cs
  25. +47 −0 tests/NuGetGallery.FunctionalTests.Fluent/NuGetFluentTest.cs
  26. +104 −0 tests/NuGetGallery.FunctionalTests.Fluent/NuGetGallery.FunctionalTests.Fluent.csproj
  27. +8 −0 tests/NuGetGallery.FunctionalTests.Fluent/Pages.csv
  28. +36 −0 tests/NuGetGallery.FunctionalTests.Fluent/Properties/AssemblyInfo.cs
  29. +56 −0 tests/NuGetGallery.FunctionalTests.Fluent/StatisticsPageTest.cs
  30. +8 −0 tests/NuGetGallery.FunctionalTests.Fluent/packages.config
  31. +1 −1 tests/NuGetGallery.FunctionalTests.Helpers/NuspecHelper.cs
  32. +53 −0 tests/NuGetGallery.FunctionalTests.vsmdi
  33. +64 −29 tests/NuGetGallery.FunctionalTests/Features/CuratedFeedTest.cs
  34. +23 −0 tests/NuGetGallery.FunctionalTests/ODataTests/V2FeedExtendedTest.cs
  35. +4 −4 tests/NuGetGallery.FunctionalTests/WebUITests/AccountManagement/InvalidLogonTest.cs
  36. +1 −1 tests/NuGetGallery.FunctionalTests/WebUITests/AssertAndValidationHelper.cs
  37. +13 −5 tests/NuGetGallery.FunctionalTests/WebUITests/PackageManagement/EditPackageTest.cs
  38. +8 −1 tests/NuGetGallery.FunctionalTests/WebUITests/UploadAndDownload/AggregateStatsAfterDownload.cs
  39. +58 −0 tests/Scripts/AutoDeploy.ps1
  40. +21 −0 tests/Scripts/NuGetGallery.FunctionalTests.msbuild
  41. +2 −0 tests/Scripts/RunEverythingy.cmd
  42. +12 −0 tests/Scripts/RunSpecificTests.cmd
  43. +5 −0 tests/Scripts/RunTests.cmd
  44. +104 −0 tests/Scripts/RunTestsFluent.cmd
  45. +5 −0 tests/Scripts/TestRunSetupScript.cmd
  46. +5 −0 tests/Scripts/TestRunSetupScriptFluent.cmd
  47. +20 −0 tests/Scripts/UpdateConfig.ps1
  48. +2,482 −0 tests/Scripts/fluentresults.txt
View
@@ -0,0 +1,148 @@
+[NuGet Gallery](http://nuget.org/) - Where packages are found
+=======================================================================
+This is an implementation of the NuGet Gallery and API. This serves as the back-end and community
+website for the NuGet client. For information about the NuGet clients, visit http://nuget.codeplex.com/
+
+## Build and Run the Gallery in (arbitrary number) easy steps
+
+1. Prerequisites. Install these if you don't already have them:
+ 1. Visual Studio 2012
+ 2. PowerShell 2.0 (comes with Windows 7+)
+ 3. [NuGet](http://docs.nuget.org/docs/start-here/installing-nuget)
+ 4. [Windows Azure SDK v2.2](http://www.microsoft.com/windowsazure/sdk/) - Note that later versions may be supported, but will require you to manually upgrade the ".Cloud" projects in the solution.
+ 5. (Optional, for unit tests) [xUnit for Visual Studio 2012](http://visualstudiogallery.msdn.microsoft.com/463c5987-f82b-46c8-a97e-b1cde42b9099)
+2. Clone it!
+
+ ```git clone git@github.com:NuGet/NuGetGallery.git```
+3. Build it!
+
+ ```
+ cd NuGetGallery
+ .\build
+ ```
+4. Set up the website in IIS Express!
+ 1. We highly recommend using IIS Express. Use the [Web Platform Installer](microsoft.com/web) to install it if you don't have it already (it comes with recent versions of VS and WebMatrix though)
+ 2. In an ADMIN powershell prompt, run the .\tools\Enable-LocalTestMe.ps1 file. It allows non-admins to host websites at: http://nuget.localtest.me, it configures an IIS Express site at that URL and creates a self-signed SSL certificate. For more information on localtest.me, check out [readme.localtest.me](readme.localtest.me)
+ 3. If you're having trouble, go to the Project Properties for the Website project, click on the Web tab and change the URL to localhost:port where _port_ is some port number above 1024.
+
+5. Create the Database!
+ 1. Open Visual Studio 2012
+ 2. Open the Package Manager Console window
+ 3. Ensure that the Default Project is set to `NuGetGallery`
+ 4. Open the NuGetGallery.sln solution from the root of this repository. ***Important:*** Make sure the Package Manager Console has been opened once before you open the solution. If the solution was already open, open the package manager console and then close and re-open the solution (from the file menu)
+ 5. Run the following command in the Package Manager Console:
+
+ ```
+ Update-Database
+ ```
+If this fails, you are likely to get more useful output by passing -Debug than -Verbose.
+<<<<<<< HEAD
+5. Set up the website in IIS Express!
+=======
+
+6. Set up the website in IIS Express!
+>>>>>>> origin/staging
+ 1. We highly recommend using IIS Express. Use the [Web Platform Installer](microsoft.com/web) to install it if you don't have it already (it comes with recent versions of VS and WebMatrix though)
+ 2. In an ADMIN powershell prompt, run the .\build\Enable-LocalTestMe.ps1 file. It allows non-admins to host websites at: http://nuget.localtest.me, it configures an IIS Express site at that URL and creates a self-signed SSL certificate. For more information on localtest.me, check out [readme.localtest.me](readme.localtest.me)
+ 3. If you're having trouble, go to the Project Properties for the Website project, click on the Web tab and change the URL to localhost:port where _port_ is some port number above 1024.
+
+7. Ensure the 'NuGetGallery' project (under the Frontend folder) is set to the Startup Project
+
+
+That's it! You should now be able to press Ctrl-F5 to run the site!
+
+## Contribute
+If you find a bug with the gallery, please visit the Issue tracker (https://github.com/NuGet/NuGetGallery/issues) and
+create an issue. If you're feeling generous, please search to see if the issue is already logged before creating a
+new one.
+
+When creating an issue, clearly explain
+* What you were trying to do.
+* What you expected to happen.
+* What actually happened.
+* Steps to reproduce the problem.
+
+Also include any information you think is relevant to reproducing the problem such as the browser version you used.
+Does it happen when you switch browsers. And so on.
+
+## Submit a patch
+Before starting work on an issue, either create an issue or comment on an existing issue to ensure that we're all
+communicating.
+
+To contribute to the gallery, make sure to create a fork first. Make your changes in the fork following
+the Git Workflow. When you are done with your changes, send us a pull request.
+
+## Copyright and License
+Copyright 2011 Outercurve Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with
+the License. You may obtain a copy of the License in the LICENSE file, or at:
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+specific language governing permissions and limitations under the License.
+
+## The Git Workflow
+
+This is the Git workflow we're currently using:
+
+### Setting up
+
+1. Clone and checkout the following branches (to make sure local copies are made): 'dev', 'dev-start'
+
+### When starting a new feature/unit of work.
+
+1. __Pull the latest.__
+ Begin by pulling to make sure you are up-to-date before creating a branch to do your work
+ This assumes you have no local commits that haven't yet been pushed (i.e., that you were
+ previously up-to-date with origin).
+
+ git checkout dev-start
+ git pull dev-start
+
+2. __Create a topic branch to do your work.__
+ You must work in topic branches, in order to help us keep our features isolated and easily moved between branches.
+ Our policy is to start all topic branches off of the 'dev-start' branch.
+ Branch names should use the following format '[user]-[bugnumber]-[shortdescription]'. If there is no bug yet,
+ create one and assign it to yourself!
+
+ git checkout dev-start
+ git checkout -b anurse-123-makesuckless
+
+3. __Do your work.__
+ Now, do your work using the following highly accurate and efficient algorithm :)
+
+ 1. Make changes.
+ 2. Test your changes (you're practicing TDD, right?)
+ 3. Add your changes to git's index.
+
+ git add -A
+
+ 4. Commit your changes.
+
+ git commit -m "<description of work>"
+
+ 5. if (moreWorkToDo) go to #3.1 else go to #4.
+
+4. __Start a code review.__
+ Start a code review by pushing your branch up to GitHub (```git push origin anurse-123-makesuckless```) and
+ creating a Pull Request from your branch to ***dev***. Wait for at least someone on the team to respond with: ":shipit:" (that's called the
+ "Ship-It Squirrel" and you can put it in your own comments by typing ```:shipit:```).
+
+5. __Merge your changes in to dev.__
+ Click the bright green "Merge" button on your pull request! **NOTE: DO NOT DELETE THE TOPIC BRANCH!!**
+
+ If there isn't a bright green button... well, you'll have to do some more complicated merging:
+
+ git checkout dev
+ git pull origin dev
+ git merge anurse-123-makesuckless
+ ... resolve conflicts ...
+ git push origin dev
+
+6. __Be ready to guide your change through QA, Staging and Master__
+ Your change will make its way through the QA, Staging and finally Master branches as it's deployed to the various environments. Be prepared to fix additional bugs!
+
+**NOTE: DO NOT DELETE THE TOPIC BRANCH!!**
@@ -24,6 +24,25 @@ if(Test-Path $SDKParent) {
$AzureSDKRoot = (dir $SDKParent | sort Name -desc | select -first 1).FullName
}
+# Find the NuGet Internal repo
+$Global:ConfigRoot = $env:NUGET_CONFIG_ROOT
+$guessedRoot = Join-Path (Split-Path -Parent $Global:RepoRoot) "NuGetMicrosoft\NuGetInternal\Config"
+if(!$Global:ConfigRoot) {
+ Write-Host "NUGET_CONFIG_ROOT not set, searching for repo..."
+ $Global:ConfigRoot = $guessedRoot
+}
+
+if(!(Test-Path $Global:ConfigRoot)) {
+ $Global:ConfigRoot = $null;
+ Write-Warning "Could not find NuGet Configuration Files Path."
+ Write-Warning "If you put it in $guessedRoot, we'll find it automatically"
+ Write-Warning "Otherwise, set the NUGET_CONFIG_ROOT environment variable to the root path"
+ Write-Warning "If you are not deploying NuGet.org, set NUGET_CONFIG_ROOT to a path that contains CSCFG files for your service"
+}
+if($Global:ConfigRoot -and (@(dir "$Global:ConfigRoot\*.cscfg").Length -eq 0)) {
+ Write-Warning "Found no CSCFG files in $($Global:ConfigRoot)"
+}
+
if(!$AzureSDKRoot) {
Write-Warning "Couldn't find the Azure SDK. Some commands may not work."
} else {
@@ -0,0 +1,10 @@
+function ParseConfigurationSettings($file) {
+ $xml = [xml](cat $file)
+ $role = $xml.ServiceConfiguration.Role | Select-Object -First 1
+
+ $hash = @{}
+ $role.ConfigurationSettings.Setting | ForEach-Object {
+ $hash[$_.name] = $_.value
+ }
+ $hash
+}
@@ -0,0 +1,33 @@
+<#
+.SYNOPSIS
+Lists the available configuration files for a service
+
+.PARAMETER Type
+The type of service to list configurations for
+#>
+function Get-Configuration {
+ [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="high")]
+ param(
+ [Parameter(Mandatory=$false, Position=0)][string]$Type
+ )
+
+ if(!$ConfigRoot) {
+ return;
+ }
+
+ dir "$ConfigRoot\*.cscfg" | ForEach-Object {
+ $match = [Regex]::Match($_.Name, "(?<type>.*)\.(?<env>.*)\.cscfg")
+ if($match.Success) {
+ $cfg = New-Object PSCustomObject
+ Add-Member -InputObject $cfg -NotePropertyMembers @{
+ "Type" = $match.Groups["type"].Value;
+ "Environment" = $match.Groups["env"].Value;
+ "File" = $_.FullName
+ }
+ $cfg
+ }
+ } | Where-Object {
+ (([String]::IsNullOrEmpty($Type)) -or ($Type -eq $_.Type)) -and
+ (($CurrentEnvironment -eq $null) -or ($CurrentEnvironment.Name -eq $_.Environment))
+ }
+}
@@ -0,0 +1,25 @@
+<#
+.SYNOPSIS
+Lists the available configuration files for a service
+
+.PARAMETER Type
+The type of service to list configurations settings for
+#>
+function Get-ConfigurationSettings {
+ [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="high")]
+ param(
+ [Parameter(Mandatory=$true, Position=1)][string]$Type
+ )
+
+ if(!$ConfigRoot) {
+ return;
+ }
+
+ if(!$CurrentEnvironment) {
+ throw "Requires a current environment"
+ }
+
+ $Config = Get-Configuration -Type $Type | Select-Object -First 1
+
+ ParseConfigurationSettings $Config.File
+}
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<<<<<<< HEAD
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>2.2</ProductVersion>
+ <ProjectGuid>1d0164b6-92d4-455a-ac68-c30b61733748</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NuGetGallery.Backend.Cloud</RootNamespace>
+ <AssemblyName>NuGetGallery.Backend.Cloud</AssemblyName>
+ <StartDevelopmentStorage>True</StartDevelopmentStorage>
+ <Name>NuGetGallery.Backend.Cloud</Name>
+ <UseWebProjectPorts>True</UseWebProjectPorts>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\NuGetGallery.Backend\NuGetGallery.Backend.csproj">
+ <Name>NuGetGallery.Backend</Name>
+ <Project>{7F92C174-5310-4090-A6A3-3CC7C67C19D6}</Project>
+ <Private>True</Private>
+ <RoleType>Worker</RoleType>
+ <RoleName>NuGetGallery.Backend</RoleName>
+ <UpdateDiagnosticsConnectionStringOnPublish>True</UpdateDiagnosticsConnectionStringOnPublish>
+ </ProjectReference>
+ </ItemGroup>
+ <!-- Items for the project -->
+ <ItemGroup>
+ <ServiceDefinition Include="ServiceDefinition.csdef" />
+ <ServiceConfiguration Include="ServiceConfiguration.Local.cscfg" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="NuGetGallery.BackendContent\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="NuGetGallery.BackendContent\diagnostics.wadcfg">
+ <SubType>Content</SubType>
+ </Content>
+ </ItemGroup>
+ <!-- Import the target files for this project template -->
+ <PropertyGroup>
+ <VisualStudioVersion Condition=" '$(VisualStudioVersion)' == '' ">10.0</VisualStudioVersion>
+ <CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.2\</CloudExtensionsDir>
+ </PropertyGroup>
+ <Import Project="$(CloudExtensionsDir)Microsoft.WindowsAzure.targets" />
+ <Import Project="$(MSBuildProjectDirectory)\..\..\build\NuGetGallery.Cloud.targets" />
+</Project>
+=======
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>2.2</ProductVersion>
+ <ProjectGuid>1d0164b6-92d4-455a-ac68-c30b61733748</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NuGetGallery.Backend.Cloud</RootNamespace>
+ <AssemblyName>NuGetGallery.Backend.Cloud</AssemblyName>
+ <StartDevelopmentStorage>True</StartDevelopmentStorage>
+ <Name>NuGetGallery.Backend.Cloud</Name>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\NuGetGallery.Backend\NuGetGallery.Backend.csproj">
+ <Name>NuGetGallery.Backend</Name>
+ <Project>{7F92C174-5310-4090-A6A3-3CC7C67C19D6}</Project>
+ <Private>True</Private>
+ <RoleType>Worker</RoleType>
+ <RoleName>NuGetGallery.Backend</RoleName>
+ <UpdateDiagnosticsConnectionStringOnPublish>True</UpdateDiagnosticsConnectionStringOnPublish>
+ </ProjectReference>
+ </ItemGroup>
+ <!-- Items for the project -->
+ <ItemGroup>
+ <ServiceDefinition Include="ServiceDefinition.csdef" />
+ <ServiceConfiguration Include="ServiceConfiguration.Local.cscfg" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="NuGetGallery.BackendContent\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="NuGetGallery.BackendContent\diagnostics.wadcfg">
+ <SubType>Content</SubType>
+ </Content>
+ </ItemGroup>
+ <!-- Import the target files for this project template -->
+ <PropertyGroup>
+ <VisualStudioVersion Condition=" '$(VisualStudioVersion)' == '' ">10.0</VisualStudioVersion>
+ <CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.2\</CloudExtensionsDir>
+ </PropertyGroup>
+ <Import Project="$(CloudExtensionsDir)Microsoft.WindowsAzure.targets" />
+ <Import Project="$(MSBuildProjectDirectory)\..\..\build\NuGetGallery.Cloud.targets" />
+</Project>
+>>>>>>> qa
Oops, something went wrong.

0 comments on commit b394324

Please sign in to comment.