Skip to content

Commit

Permalink
Apply license headers
Browse files Browse the repository at this point in the history
  • Loading branch information
sandermvanvliet committed Dec 29, 2023
1 parent f8d2784 commit 5ecf98b
Show file tree
Hide file tree
Showing 19 changed files with 114 additions and 32 deletions.
8 changes: 6 additions & 2 deletions src/RoadCaptain.App.Web/Commands/RecalculateHashesCommand.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
namespace RoadCaptain.App.Web.Commands
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

namespace RoadCaptain.App.Web.Commands
{
public record RecalculateHashesCommand(bool OnlyMissing = true);
}
}
8 changes: 6 additions & 2 deletions src/RoadCaptain.App.Web/Controllers/AdminController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System.Net;
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

using System.Net;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using RoadCaptain.App.Web.Commands;
Expand Down Expand Up @@ -44,4 +48,4 @@ public IActionResult RecalculateHashes()
return Ok(log);
}
}
}
}
8 changes: 6 additions & 2 deletions src/RoadCaptain.App.Web/DuplicateRouteException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
namespace RoadCaptain.App.Web
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

namespace RoadCaptain.App.Web
{
public class DuplicateRouteException : Exception
{
Expand All @@ -7,4 +11,4 @@ public DuplicateRouteException()
{
}
}
}
}
8 changes: 6 additions & 2 deletions src/RoadCaptain.App.Web/HashUtilities.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System.Security.Cryptography;
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

using System.Security.Cryptography;

namespace RoadCaptain.App.Web
{
Expand All @@ -17,4 +21,4 @@ public static string HashAsHexString(string input)
return Convert.ToHexString(hashBytes);
}
}
}
}

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

Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using Microsoft.EntityFrameworkCore.Migrations;
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

Expand Down Expand Up @@ -69,3 +73,4 @@ protected override void Down(MigrationBuilder migrationBuilder)
}
}
}

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

Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using Microsoft.EntityFrameworkCore.Migrations;
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

Expand Down Expand Up @@ -27,3 +31,4 @@ protected override void Down(MigrationBuilder migrationBuilder)
}
}
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
// <auto-generated />
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
Expand Down Expand Up @@ -104,3 +108,4 @@ protected override void BuildModel(ModelBuilder modelBuilder)
}
}
}

8 changes: 6 additions & 2 deletions src/RoadCaptain.App.Web/UnauthorizedException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
namespace RoadCaptain.App.Web
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

namespace RoadCaptain.App.Web
{
internal class UnauthorizedException : Exception
{
Expand All @@ -7,4 +11,4 @@ public UnauthorizedException(string message)
{
}
}
}
}
8 changes: 6 additions & 2 deletions src/RoadCaptain.App.Web/UseCases/RecalculateHashes.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System.Text;
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

using System.Text;
using RoadCaptain.App.Web.Commands;
using RoadCaptain.App.Web.Models;
using RoadCaptain.App.Web.Ports;
Expand Down Expand Up @@ -66,4 +70,4 @@ public string Execute(RecalculateHashesCommand command)
return log.ToString();
}
}
}
}
8 changes: 6 additions & 2 deletions src/RoadCaptain.SegmentBuilder/JoinStraightConnections.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System.Linq;
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

using System.Linq;
using Serilog;

namespace RoadCaptain.SegmentBuilder
Expand All @@ -24,4 +28,4 @@ public override Context Run(Context context)
return new Context(Step, context.Segments.ToList(), context.GpxDirectory, context.World);
}
}
}
}
8 changes: 6 additions & 2 deletions src/RoadCaptain.SegmentBuilder/RemoveSegmentsWithFewPoints.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System.Collections.Generic;
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

using System.Collections.Generic;
using Serilog;

namespace RoadCaptain.SegmentBuilder
Expand Down Expand Up @@ -28,4 +32,4 @@ public override Context Run(Context context)
return new Context(Step, segments, context.GpxDirectory, context.World);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System.Collections.Generic;
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

using System.Collections.Generic;
using System.Linq;
using Serilog;

Expand Down Expand Up @@ -32,4 +36,4 @@ public override Context Run(Context context)
return new Context(Step, segments, context.GpxDirectory, context.World);
}
}
}
}
8 changes: 6 additions & 2 deletions src/RoadCaptain.SegmentJoiner/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using Newtonsoft.Json;
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
using RoadCaptain;
Expand Down Expand Up @@ -149,4 +153,4 @@

File.WriteAllText(
"split-turns.json",
JsonConvert.SerializeObject(turns, Formatting.Indented, serializerSettings));
JsonConvert.SerializeObject(turns, Formatting.Indented, serializerSettings));
7 changes: 6 additions & 1 deletion src/RoadCaptain.ZwiftRouteDownloader/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System;
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

using System;
using System.Globalization;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -235,3 +239,4 @@ private string BuildGpx(Segment segmentData, StravaSegment stravaSegment)
}
}
}

8 changes: 6 additions & 2 deletions src/RoadCaptain.ZwiftRouteDownloader/Route.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
namespace RoadCaptain.ZwiftRouteDownloader
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

namespace RoadCaptain.ZwiftRouteDownloader
{
public class Route
{
Expand All @@ -10,4 +14,4 @@ public class Route
public string[] Sports { get; set; } = { "Cycling" };
public string WhatsOnZwiftUrl { get; set; }
}
}
}
8 changes: 6 additions & 2 deletions src/RoadCaptain.ZwiftRouteDownloader/Segment.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
namespace RoadCaptain.ZwiftRouteDownloader
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

namespace RoadCaptain.ZwiftRouteDownloader
{
public class Segment
{
Expand All @@ -10,4 +14,4 @@ public class Segment
public string Type { get; set; }
public string StravaSegmentUrl { get; set; }
}
}
}
8 changes: 6 additions & 2 deletions src/RoadCaptain.ZwiftRouteDownloader/StravaSegment.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System.Collections.Generic;
// Copyright (c) 2023 Sander van Vliet
// Licensed under Artistic License 2.0
// See LICENSE or https://choosealicense.com/licenses/artistic-2.0/

using System.Collections.Generic;

namespace RoadCaptain.ZwiftRouteDownloader
{
Expand All @@ -7,4 +11,4 @@ public class StravaSegment
public List<decimal[]> LatLng { get; set; }
public List<decimal> Altitude { get; set; }
}
}
}

0 comments on commit 5ecf98b

Please sign in to comment.