Skip to content

Commit

Permalink
Merge pull request #1 from NuGet/master
Browse files Browse the repository at this point in the history
merge from nugetgallery
  • Loading branch information
robertmuehsig committed Apr 23, 2014
2 parents 5335a5d + af93236 commit 1bf73d8
Show file tree
Hide file tree
Showing 34 changed files with 742 additions and 268 deletions.
1 change: 1 addition & 0 deletions src/NuGetGallery.Core/NuGetGallery.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
<Compile Include="Entities\Role.cs" />
<Compile Include="Entities\User.cs" />
<Compile Include="Packaging\INupkg.cs" />
<Compile Include="Packaging\InvalidPackageException.cs" />
<Compile Include="Packaging\ManifestValidator.cs" />
<Compile Include="Packaging\Nupkg.cs" />
<Compile Include="Packaging\NupkgRewriter.cs" />
Expand Down
20 changes: 20 additions & 0 deletions src/NuGetGallery.Core/Packaging/InvalidPackageException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NuGetGallery.Packaging
{
[Serializable]
public class InvalidPackageException : Exception
{
public InvalidPackageException() { }
public InvalidPackageException(string message) : base(message) { }
public InvalidPackageException(string message, Exception inner) : base(message, inner) { }
protected InvalidPackageException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context) { }
}
}
4 changes: 2 additions & 2 deletions src/NuGetGallery.Core/Packaging/Nupkg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ public static Manifest SafelyLoadManifest(Stream stream, bool leaveOpen)
private static Manifest SafelyLoadManifest(ZipArchive archive)
{
var manifestEntry = archive.Entries.SingleOrDefault(entry =>
entry.Name.IndexOf("/", StringComparison.Ordinal) == -1
entry.FullName.IndexOf("/", StringComparison.Ordinal) == -1
&& entry.Name.EndsWith(".nuspec", StringComparison.OrdinalIgnoreCase)
);

if (manifestEntry == null)
{
throw new InvalidOperationException("The package does not contain a manifest.");
throw new InvalidPackageException("A manifest was not found at the root of the package.");
}

using (var safeStream = GetSizeVerifiedFileStream(manifestEntry, MaxManifestSize))
Expand Down
7 changes: 5 additions & 2 deletions src/NuGetGallery/App_Code/ViewHelpers.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,10 @@
string brand = config == null ? "" : config.Current.Brand;

<p id="releaseTag">
This is the @brand.
This is the @brand
@if (ver.Present)
{
@:, version @ver.Version.
if(!String.IsNullOrEmpty(ver.ShortCommit)) {
<text>
Deployed from
Expand All @@ -155,8 +156,10 @@
}

if(ver.BuildDateUtc != DateTime.MinValue) {
@: Built at <span class="s-localtime" data-utc="@ver.BuildDateUtc.ToString("O")">@ver.BuildDateUtc.ToNuGetShortDateString()</span>.
@: Built at <span class="s-localtime" data-utc="@ver.BuildDateUtc.ToJavaScriptUTC()">@ver.BuildDateUtc.ToNuGetShortDateString()</span>.
}
} else {
@:.
}

@* A little quick-n-dirty code to display the current machine *@
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery/App_Start/AppActivator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private static void BundlingPostStart()
.Include("~/Scripts/jquery-{version}.js")
.Include("~/Scripts/jquery.validate.js")
.Include("~/Scripts/jquery.validate.unobtrusive.js")
.Include("~/Scripts/typeahead.bundle.js")
.Include("~/Scripts/jquery.timeago.js")
.Include("~/Scripts/nugetgallery.js")
.Include("~/Scripts/stats.js");
BundleTable.Bundles.Add(scriptBundle);
Expand Down
4 changes: 2 additions & 2 deletions src/NuGetGallery/App_Start/Routes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,12 @@ public static void RegisterRoutes(RouteCollection routes)
routes.MapRoute(
"v2PackageIds",
"api/v2/package-ids",
new { controller = "Api", action = "GetPackageIds" });
new { controller = "Api", action = "PackageIDs" });

routes.MapRoute(
"v2PackageVersions",
"api/v2/package-versions/{id}",
new { controller = "Api", action = "GetPackageVersions" });
new { controller = "Api", action = "PackageVersions" });

routes.MapRoute(
RouteName.StatisticsDownloadsApi,
Expand Down
211 changes: 109 additions & 102 deletions src/NuGetGallery/Content/Layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

/* Service Alert */

#service-alert
{
#service-alert {
display: none;
}

Expand Down Expand Up @@ -35,15 +34,16 @@
background-image: linear-gradient(to bottom, #ff0000, #e60000);
}

.banner-urgent a
{
color: white;
text-decoration: underline;
}
.banner-urgent a {
color: white;
text-decoration: underline;
}

/* Header */

header.main { height: 95px; }
header.main {
height: 95px;
}

/* Site Logo */

Expand All @@ -52,15 +52,15 @@ header.main { height: 95px; }
padding: 20px 20px 0 0;
}

#logo a {
background: url(../Content/Logos/nugetlogo.png) no-repeat;
display: block;
height: 75px;
margin: 0;
padding: 0;
text-indent: -9999px;
width: 225px;
}
#logo a {
background: url(../Content/Logos/nugetlogo.png) no-repeat;
display: block;
height: 75px;
margin: 0;
padding: 0;
text-indent: -9999px;
width: 225px;
}

/* Top Menu (Navigation) */

Expand All @@ -71,50 +71,49 @@ nav.main {
margin-top: 10px;
}

nav.main ul {
margin: 0px;
padding: 0px;
}

nav.main ul li {
display: block;
float: left;
height: 42px;
}

nav.main ul li.current a {
background-color: #e4f1f7;
border: 1px solid #ebf2f5;
border-bottom: none;
border-top: 1px solid #fff;
color: #195670;
height: 46px;
line-height: 44px;
position: relative;
text-decoration: none;
top: -4px;
}

nav.main ul a {
-moz-border-radius: 4px 4px 0 0;
-webkit-border-radius: 4px 4px 0 0;
/*CSS3 properties*/
border-radius: 4px 4px 0 0;
color: #fff;
display: block;
font-size: 1.2em;
height: 42px;
line-height: 44px;

margin: 0 5px;
padding: 0 10px;
text-decoration: none;
}

nav.main ul a:hover {
background-color: #3c3d44;
text-decoration: none;
}
nav.main ul {
margin: 0px;
padding: 0px;
}

nav.main ul li {
display: block;
float: left;
height: 42px;
}

nav.main ul li.current a {
background-color: #e4f1f7;
border: 1px solid #ebf2f5;
border-bottom: none;
border-top: 1px solid #fff;
color: #195670;
height: 46px;
line-height: 44px;
position: relative;
text-decoration: none;
top: -4px;
}

nav.main ul a {
-moz-border-radius: 4px 4px 0 0;
-webkit-border-radius: 4px 4px 0 0;
/*CSS3 properties*/
border-radius: 4px 4px 0 0;
color: #fff;
display: block;
font-size: 1.2em;
height: 42px;
line-height: 44px;
margin: 0 5px;
padding: 0 10px;
text-decoration: none;
}

nav.main ul a:hover {
background-color: #3c3d44;
text-decoration: none;
}

/* User Display (Sign-In Info) and search box */

Expand All @@ -131,35 +130,36 @@ nav.main ul a:hover {
margin-top: 6px;
}

.user-display a {
color: #fff;
font-weight: 600;
}
.user-display a {
color: #fff;
font-weight: 600;
}

.user-display a:hover { text-decoration: underline; }
.user-display a:hover {
text-decoration: underline;
}

#searchBox {
background-color: #fff;
border: solid 1px #05005F;
/*CSS3 properties*/
height: 32px;
margin-top: 1px;
width: 704px;

width: 690px;
padding-left: 5px;
padding-right: 4px;
vertical-align: top;
}

#searchBoxInput {
width: 650px;
border: 0px;
color: #333;
font-size: 20px;
height: 30px;
line-height: 30px;
outline: none;
padding: 0;
width: 673px;
}

#searchBoxSubmit {
Expand All @@ -173,7 +173,6 @@ nav.main ul a:hover {
margin-left: 0;
box-shadow: none;
margin-top: 1px;

text-indent: -9999px;
vertical-align: bottom;
width: 27px;
Expand All @@ -192,7 +191,9 @@ nav.main ul a:hover {

/* Footer */

.clear-fix { clear: both; }
.clear-fix {
clear: both;
}

#layout-footer {
background: #e4f1f7;
Expand All @@ -210,44 +211,50 @@ footer#footer {
display: table;
}

footer#footer a { color: #3e483c; }
footer#footer a {
color: #3e483c;
}

footer#footer a:hover {
text-decoration: underline;
}
footer#footer a:hover {
text-decoration: underline;
}

footer#footer p {
margin: 0;
padding: 0;
}
footer#footer p {
margin: 0;
padding: 0;
}

footer#footer p#releaseTag { margin: 10px 0 0 0; }
footer#footer p#releaseTag {
margin: 10px 0 0 0;
}

footer#footer ul.recommended {
list-style: none;
margin: 0 auto;
padding: 0;
}
footer#footer ul.recommended {
list-style: none;
margin: 0 auto;
padding: 0;
}

footer#footer ul.recommended li {
float: left;
margin-left: 0;
padding: 10px;
text-align: left;
width: 170px;
}
footer#footer ul.recommended li {
float: left;
margin-left: 0;
padding: 10px;
text-align: left;
width: 170px;
}

footer#footer ul.recommended li a {
display: block;
font-size: 1.3em;
}
footer#footer ul.recommended li a {
display: block;
font-size: 1.3em;
}

footer#footer ul.recommended li p { font-size: .9em; }
footer#footer ul.recommended li p {
font-size: .9em;
}

footer#footer div.license {
clear: both;
font-size: .7em;
}
footer#footer div.license {
clear: both;
font-size: .7em;
}

/* Error Layout (with background image)*/

Expand Down Expand Up @@ -285,4 +292,4 @@ footer#footer div.license {
float: right;
margin-bottom: 20px;
width: 75%;
}
}
Loading

0 comments on commit 1bf73d8

Please sign in to comment.