Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/github_actions/gittools/action…
Browse files Browse the repository at this point in the history
…s-0.10.2
  • Loading branch information
mitchelsellers authored Mar 21, 2024
2 parents a18dae6 + ef3d2bf commit 2264594
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
env:
solution-path: './src/NetCore.Utilities.Email.SendGrid.sln'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -52,18 +52,18 @@ jobs:
with:
java-version: 11
distribution: zulu
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Cache SonarCloud packages
uses: actions/cache@v3.2.3
uses: actions/cache@v3.3.2
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v3.2.3
uses: actions/cache@v3.3.2
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
env:
solution-path: './src/NetCore.Utilities.Email.SendGrid.sln'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Moq;
using Xunit;
using IHostingEnvironment = Microsoft.AspNetCore.Hosting.IHostingEnvironment;

namespace ICG.NetCore.Utilities.Email.SendGrid.Tests
{
Expand Down Expand Up @@ -46,8 +47,7 @@ public void ServiceCollection_ShouldRegisterSendGridService()
var configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json")
.Build();
collection.AddSingleton(new Mock<Microsoft.Extensions.Hosting.IHostingEnvironment>().Object);
collection.AddSingleton(new Mock<IHostingEnvironment>().Object);
collection.AddSingleton(new Mock<IHostEnvironment> ().Object);
collection.UseIcgNetCoreUtilitiesEmailSendGrid(configuration);
collection.AddLogging();
var services = collection.BuildServiceProvider();
Expand All @@ -69,8 +69,7 @@ public void ServiceCollection_ShouldRegisterSendMessageBuilder()
var configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json")
.Build();
collection.AddSingleton(new Mock<Microsoft.Extensions.Hosting.IHostingEnvironment>().Object);
collection.AddSingleton(new Mock<IHostingEnvironment>().Object);
collection.AddSingleton(new Mock<IHostEnvironment>().Object);
collection.AddLogging();
collection.UseIcgNetCoreUtilitiesEmailSendGrid(configuration);
var services = collection.BuildServiceProvider();
Expand All @@ -91,8 +90,7 @@ public void ServiceCollection_ShouldRegisterSendGridSender()
var configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json")
.Build();
collection.AddSingleton(new Mock<Microsoft.Extensions.Hosting.IHostingEnvironment>().Object);
collection.AddSingleton(new Mock<IHostingEnvironment>().Object);
collection.AddSingleton(new Mock<IHostEnvironment>().Object);
collection.UseIcgNetCoreUtilitiesEmailSendGrid(configuration);
var services = collection.BuildServiceProvider();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="icg.netcore.utilities.email" Version="6.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
<PackageReference Include="icg.netcore.utilities.email" Version="6.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ SendGridMessage CreateMessageWithAttachment(string from, string fromName, string
/// <inheritdoc cref="ISendGridMessageBuilder"/>
public class SendGridMessageBuilder : ISendGridMessageBuilder
{
private readonly IHostingEnvironment _hostingEnvironment;
private readonly IHostEnvironment _hostingEnvironment;
private readonly IEmailTemplateFactory _emailTemplateFactory;
private readonly SendGridServiceOptions _serviceOptions;
private readonly ILogger _logger;
Expand All @@ -58,7 +58,7 @@ public class SendGridMessageBuilder : ISendGridMessageBuilder
/// <param name="emailTemplateFactory"></param>
/// <param name="options"></param>
/// <param name="logger"></param>
public SendGridMessageBuilder(IHostingEnvironment hostingEnvironment, IEmailTemplateFactory emailTemplateFactory,
public SendGridMessageBuilder(IHostEnvironment hostingEnvironment, IEmailTemplateFactory emailTemplateFactory,
IOptions<SendGridServiceOptions> options, ILogger<SendGridMessageBuilder> logger)
{
_hostingEnvironment = hostingEnvironment;
Expand Down
1 change: 0 additions & 1 deletion src/NetCore.Utilities.Email.SendGrid/SendGridService.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Net.Mail;
using Microsoft.Extensions.Options;
using SendGrid.Helpers.Mail;

Expand Down

0 comments on commit 2264594

Please sign in to comment.