Skip to content

Commit e919d9f

Browse files
authored
Merge branch 'main' into IntegratingLegoSetsAgain
2 parents e041ade + cceea51 commit e919d9f

File tree

17 files changed

+193
-191
lines changed

17 files changed

+193
-191
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858

5959
- name: Install .NET SDK
6060
if: matrix.language == 'csharp'
61-
uses: actions/setup-dotnet@v4.0.1
61+
uses: actions/setup-dotnet@v4.3.1
6262
with:
6363
dotnet-version: 9.0.x
6464
- name: Build web projects

.github/workflows/dotnet.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323
- name: Install .NET SDK
24-
uses: actions/setup-dotnet@v4.0.1
24+
uses: actions/setup-dotnet@v4.3.1
2525
with:
2626
dotnet-version: 9.0.x
2727
- name: Publish web projects
@@ -54,18 +54,18 @@ jobs:
5454
fetch-depth: 0 #fetch-depth is needed for GitVersion
5555
#Install and calculate the new version with GitVersion
5656
- name: Install GitVersion
57-
uses: gittools/actions/gitversion/setup@v3.1.1
57+
uses: gittools/actions/gitversion/setup@v3.2.1
5858
with:
5959
versionSpec: 5.x
6060
- name: Determine Version
61-
uses: gittools/actions/gitversion/execute@v3.1.1
61+
uses: gittools/actions/gitversion/execute@v3.2.1
6262
id: gitversion # step id used as reference for output values
6363
- name: Display GitVersion outputs
6464
run: |
6565
echo "Version: ${{ steps.gitversion.outputs.SemVer }}"
6666
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}"
6767
- name: Install .NET SDK
68-
uses: actions/setup-dotnet@v4.0.1
68+
uses: actions/setup-dotnet@v4.3.1
6969
with:
7070
dotnet-version: 9.0.x
7171
- name: Publish web projects
@@ -85,7 +85,7 @@ jobs:
8585
steps:
8686
- uses: actions/checkout@v4
8787
- name: Install .NET SDK
88-
uses: actions/setup-dotnet@v4.0.1
88+
uses: actions/setup-dotnet@v4.3.1
8989
with:
9090
dotnet-version: 9.0.x
9191
- name: Publish functional tests project
@@ -135,7 +135,7 @@ jobs:
135135
with:
136136
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
137137
- name: Install .NET SDK
138-
uses: actions/setup-dotnet@v4.0.1
138+
uses: actions/setup-dotnet@v4.3.1
139139
with:
140140
dotnet-version: 9.0.x
141141
- name: Variable Substitution appsettings file for tests
@@ -175,7 +175,7 @@ jobs:
175175
with:
176176
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
177177
- name: Install .NET SDK
178-
uses: actions/setup-dotnet@v4.0.1
178+
uses: actions/setup-dotnet@v4.3.1
179179
with:
180180
dotnet-version: 9.0.x
181181
- name: Cache SonarCloud packages
@@ -319,7 +319,7 @@ jobs:
319319
name: functionalTests
320320
path: ${{ github.workspace }}
321321
- name: Install .NET SDK
322-
uses: actions/setup-dotnet@v4.0.1
322+
uses: actions/setup-dotnet@v4.3.1
323323
with:
324324
dotnet-version: 9.0.x
325325
- name: Run functional smoke tests on website and web service
@@ -349,11 +349,11 @@ jobs:
349349
with:
350350
creds: ${{ secrets.ORG_AZURE_SP }}
351351
- name: 'Swap Slots: web service'
352-
uses: Azure/cli@v2.0.0
352+
uses: Azure/cli@v2.1.0
353353
with:
354354
inlineScript: az webapp deployment slot swap --resource-group SamSmithNZ.com --name ssnz-prod-eu-service --slot staging --target-slot production
355355
- name: 'Swap Slots: web'
356-
uses: Azure/cli@v2.0.0
356+
uses: Azure/cli@v2.1.0
357357
with:
358358
inlineScript: az webapp deployment slot swap --resource-group SamSmithNZ.com --name ssnz-prod-eu-web --slot staging --target-slot production
359359

src/SamSmithNZ.Database/dbo/Stored Procedures/FB_GetGames.sql

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
@GameCode INT = NULL
88
AS
99
BEGIN
10-
10+
-- Define constants
11+
DECLARE @SoccerballFlagName VARCHAR(50) = 'Soccerball_svg.png';
12+
1113
IF (NOT @TeamCode IS NULL)
1214
BEGIN
1315
CREATE TABLE #TmpAlternativeTeams (tournament_code INT, team_code INT)
@@ -191,7 +193,7 @@ BEGIN
191193
NULL AS Team2EloRating,
192194
NULL AS Team2PreGameEloRating,
193195
NULL AS Team2PostGameEloRating,
194-
'Soccerball_svg.png' AS Team1FlagName,
196+
@SoccerballFlagName AS Team1FlagName,
195197
NULL AS Team2FlagName,
196198
0 AS Team1Withdrew,
197199
0 AS Team2Withdrew,
@@ -240,7 +242,7 @@ BEGIN
240242
NULL AS Team2EloRating,
241243
NULL AS Team2PreGameEloRating,
242244
NULL AS Team2PostGameEloRating,
243-
'Soccerball_svg.png' AS Team1FlagName,
245+
@SoccerballFlagName AS Team1FlagName,
244246
NULL AS Team2FlagName,
245247
0 AS Team1Withdrew,
246248
0 AS Team2Withdrew,
@@ -290,7 +292,7 @@ BEGIN
290292
NULL AS Team2PreGameEloRating,
291293
NULL AS Team2PostGameEloRating,
292294
NULL AS Team1FlagName,
293-
'Soccerball_svg.png' AS Team2FlagName,
295+
@SoccerballFlagName AS Team2FlagName,
294296
0 AS Team1Withdrew,
295297
0 AS Team2Withdrew,
296298
NULL AS [Location],
@@ -339,7 +341,7 @@ BEGIN
339341
NULL AS Team2PreGameEloRating,
340342
NULL AS Team2PostGameEloRating,
341343
NULL AS Team1FlagName,
342-
'Soccerball_svg.png' AS Team2FlagName,
344+
@SoccerballFlagName AS Team2FlagName,
343345
0 AS Team1Withdrew,
344346
0 AS Team2Withdrew,
345347
NULL AS [Location],

src/SamSmithNZ.ExportGuitarTab.Console/SamSmithNZ.ExportGuitarTab.Console.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
</ItemGroup>
2222

2323
<ItemGroup>
24-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
25-
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.0" />
24+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.4" />
25+
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.4" />
2626
</ItemGroup>
2727

2828
<ItemGroup>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<configuration>
33
<connectionStrings>
4-
<add name="DefaultConnection" connectionString="Server=tcp:ssnzdbserver.database.windows.net,1433;Initial Catalog=SSNZDB;Persist Security Info=False;User ID=ssnzadmin;Password=LittleRedDrag0n14;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" providerName="System.Data.SqlClient" />
4+
<add name="DefaultConnection" connectionString="" providerName="System.Data.SqlClient" />
55
</connectionStrings>
66
</configuration>

src/SamSmithNZ.FFLSetlistScraper.WinForms/SamSmithNZ.FFLSetlistScraper.WinForms.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="HtmlAgilityPack" Version="1.11.72" />
20+
<PackageReference Include="HtmlAgilityPack" Version="1.12.1" />
2121
</ItemGroup>
2222

2323
<ItemGroup>

src/SamSmithNZ.FunctionalTests/SamSmithNZ.FunctionalTests.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
</ItemGroup>
2828

2929
<ItemGroup>
30-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
31-
<PackageReference Include="MSTest.TestAdapter" Version="3.7.0" />
32-
<PackageReference Include="MSTest.TestFramework" Version="3.7.0" />
33-
<PackageReference Include="coverlet.collector" Version="6.0.3">
30+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
31+
<PackageReference Include="MSTest.TestAdapter" Version="3.8.3" />
32+
<PackageReference Include="MSTest.TestFramework" Version="3.8.3" />
33+
<PackageReference Include="coverlet.collector" Version="6.0.4">
3434
<PrivateAssets>all</PrivateAssets>
3535
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3636
</PackageReference>
3737
<PackageReference Include="Selenium.Chrome.WebDriver" Version="85.0.0" />
38-
<PackageReference Include="Selenium.WebDriver" Version="4.27.0" />
38+
<PackageReference Include="Selenium.WebDriver" Version="4.32.0" />
3939
</ItemGroup>
4040

4141
<ItemGroup>

src/SamSmithNZ.Service/DataAccess/Base/BaseDataAccess.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ public class BaseDataAccess<T>
1818

1919
public void SetupConnectionString(IConfiguration configuration)
2020
{
21-
ConnectionString = configuration["ConnectionStrings:DefaultConnectionString"];
21+
this.ConnectionString = configuration["ConnectionStrings:DefaultConnectionString"];
2222
}
2323

2424
public async Task<List<T>> GetList(string query, DynamicParameters parameters = null, int timeOut = 15) //15 seconds is the default timeout
2525
{
26-
if (ConnectionString == null)
26+
if (this.ConnectionString == null)
2727
{
2828
throw new Exception("ConnectionString not set");
2929
}
3030

3131
IEnumerable<T> results;
32-
SqlConnection connection = new(ConnectionString);
32+
SqlConnection connection = new(this.ConnectionString);
3333
try
3434
{
3535
await connection.OpenAsync();
@@ -47,13 +47,13 @@ public void SetupConnectionString(IConfiguration configuration)
4747

4848
public async Task<T> GetItem(string query, DynamicParameters parameters = null)
4949
{
50-
if (ConnectionString == null)
50+
if (this.ConnectionString == null)
5151
{
5252
throw new Exception("ConnectionString not set");
5353
}
5454

5555
T result;
56-
SqlConnection connection = new(ConnectionString);
56+
SqlConnection connection = new(this.ConnectionString);
5757
try
5858
{
5959
await connection.OpenAsync();
@@ -72,13 +72,13 @@ public async Task<T> GetItem(string query, DynamicParameters parameters = null)
7272

7373
public async Task<R> GetScalarItem<R>(string query, DynamicParameters parameters = null)
7474
{
75-
if (ConnectionString == null)
75+
if (this.ConnectionString == null)
7676
{
7777
throw new Exception("ConnectionString not set");
7878
}
7979

8080
R result;
81-
SqlConnection connection = new(ConnectionString);
81+
SqlConnection connection = new(this.ConnectionString);
8282
try
8383
{
8484
await connection.OpenAsync();
@@ -98,13 +98,13 @@ public async Task<R> GetScalarItem<R>(string query, DynamicParameters parameters
9898

9999
public async Task<bool> SaveItem(string query, DynamicParameters parameters = null, int timeOut = 15) //15 seconds is the default timeout
100100
{
101-
if (ConnectionString == null)
101+
if (this.ConnectionString == null)
102102
{
103103
throw new Exception("ConnectionString not set");
104104
}
105105

106106
bool result = false;
107-
SqlConnection connection = new(ConnectionString);
107+
SqlConnection connection = new(this.ConnectionString);
108108
try
109109
{
110110
await connection.OpenAsync();

src/SamSmithNZ.Service/DataAccess/WorldCup/GoalDataAccess.cs

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -60,58 +60,58 @@ public List<Goal> ProcessGoalHTMLMigration(string goalText, string playerName)
6060
goalText = goalText.Replace(playerName, "");
6161
goalText = goalText.Replace("&#39;", " ");
6262
goalText = goalText.Replace("&#160;", " ");
63-
}
64-
string[] goals;
65-
if (goalText.IndexOf(',') >= 0)
66-
{
67-
goals = goalText.Split(',');
68-
}
69-
else
70-
{
71-
//Initialize a single item array
72-
goals = new string[1];
73-
goals[0] = goalText;
74-
}
75-
foreach (string goalItem in goals)
76-
{
77-
string goalItemText = goalItem;
78-
Goal newGoal = new();
79-
//The goal can be a variety of formats, but most often, just 90' - so we try that first (the ' is stripped off by the previous line)
80-
int goalTime;
81-
int injuryTime = 0;
82-
if (int.TryParse(goalItemText, out goalTime) == false)
63+
string[] goals;
64+
if (goalText.IndexOf(',') >= 0)
8365
{
84-
//It's not a regular goal, let's look at the special situations (penalties, own goals, etc)
85-
//Penalties
86-
if (goalItemText.IndexOf("(pen.)") >= 0)
87-
{
88-
goalItemText = goalItemText.Replace("(pen.)", "");
89-
newGoal.IsPenalty = true;
90-
}
91-
//Own Goals
92-
else if (goalItemText.IndexOf("(o.g.)") >= 0)
93-
{
94-
goalItemText = goalItemText.Replace("(o.g.)", "");
95-
newGoal.IsOwnGoal = true;
96-
}
66+
goals = goalText.Split(',');
67+
}
68+
else
69+
{
70+
//Initialize a single item array
71+
goals = new string[1];
72+
goals[0] = goalText;
73+
}
74+
foreach (string goalItem in goals)
75+
{
76+
string goalItemText = goalItem;
77+
Goal newGoal = new();
78+
//The goal can be a variety of formats, but most often, just 90' - so we try that first (the ' is stripped off by the previous line)
79+
int goalTime;
80+
int injuryTime = 0;
9781
if (int.TryParse(goalItemText, out goalTime) == false)
9882
{
99-
//Extra/injury time
100-
if (goalItemText.IndexOf("+") >= 0)
83+
//It's not a regular goal, let's look at the special situations (penalties, own goals, etc)
84+
//Penalties
85+
if (goalItemText.IndexOf("(pen.)") >= 0)
86+
{
87+
goalItemText = goalItemText.Replace("(pen.)", "");
88+
newGoal.IsPenalty = true;
89+
}
90+
//Own Goals
91+
else if (goalItemText.IndexOf("(o.g.)") >= 0)
92+
{
93+
goalItemText = goalItemText.Replace("(o.g.)", "");
94+
newGoal.IsOwnGoal = true;
95+
}
96+
if (int.TryParse(goalItemText, out goalTime) == false)
10197
{
102-
string[] injuryTimeGoals = goalItemText.Split("+");
103-
if (injuryTimeGoals.Length == 2)
98+
//Extra/injury time
99+
if (goalItemText.IndexOf("+") >= 0)
104100
{
105-
_ = int.TryParse(injuryTimeGoals[0], out goalTime);
106-
_ = int.TryParse(injuryTimeGoals[1], out injuryTime);
101+
string[] injuryTimeGoals = goalItemText.Split("+");
102+
if (injuryTimeGoals.Length == 2)
103+
{
104+
_ = int.TryParse(injuryTimeGoals[0], out goalTime);
105+
_ = int.TryParse(injuryTimeGoals[1], out injuryTime);
106+
}
107107
}
108108
}
109109
}
110-
}
111110

112-
newGoal.GoalTime = goalTime;
113-
newGoal.InjuryTime = injuryTime;
114-
results.Add(newGoal);
111+
newGoal.GoalTime = goalTime;
112+
newGoal.InjuryTime = injuryTime;
113+
results.Add(newGoal);
114+
}
115115
}
116116

117117
return results;

0 commit comments

Comments
 (0)