From 246e49e87d10e789ec90c1a06f24320636be12a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Pluci=C5=84ski?= Date: Wed, 24 Feb 2021 17:57:33 +0100 Subject: [PATCH 01/11] upgraded to Cake 1.0.0 and CsvHelper 24.0.1 --- nuspec/nuget/Cake.CsvHelper.nuspec | 19 +- .../Cake.CsvHelper.Tests.csproj | 170 +++--------------- .../CsvHelperAliasesTests.cs | 8 +- src/Cake.CsvHelper.Tests/CsvHelperTests.cs | 43 +++-- .../Fixtures/CsvHelpersFixture.cs | 13 +- .../Properties/AssemblyInfo.cs | 36 ---- src/Cake.CsvHelper.Tests/app.config | 11 -- src/Cake.CsvHelper.Tests/packages.config | 52 ------ src/Cake.CsvHelper/Cake.CsvHelper.csproj | 73 +------- src/Cake.CsvHelper/CsvHelperAliases.cs | 55 +++--- src/Cake.CsvHelper/CsvHelpers.cs | 52 +++--- src/Cake.CsvHelper/Properties/AssemblyInfo.cs | 36 ---- src/Cake.CsvHelper/packages.config | 5 - 13 files changed, 130 insertions(+), 443 deletions(-) delete mode 100644 src/Cake.CsvHelper.Tests/Properties/AssemblyInfo.cs delete mode 100644 src/Cake.CsvHelper.Tests/app.config delete mode 100644 src/Cake.CsvHelper.Tests/packages.config delete mode 100644 src/Cake.CsvHelper/Properties/AssemblyInfo.cs delete mode 100644 src/Cake.CsvHelper/packages.config diff --git a/nuspec/nuget/Cake.CsvHelper.nuspec b/nuspec/nuget/Cake.CsvHelper.nuspec index d781083..64d4b40 100644 --- a/nuspec/nuget/Cake.CsvHelper.nuspec +++ b/nuspec/nuget/Cake.CsvHelper.nuspec @@ -13,12 +13,21 @@ false Copyright (c) Radio Systems Corporation 2017 - Present Cake, Script, Build, CsvHelper, CSV, Addin + + + - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj b/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj index 3188e97..04ea044 100644 --- a/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj +++ b/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj @@ -1,157 +1,27 @@ - - - - + + - Debug - AnyCPU - {1691864A-29DA-4ED9-A2C1-3EE39D006F51} - Library - Properties - Cake.CsvHelper.Tests - Cake.CsvHelper.Tests - v4.6.1 - 512 - - - + net46;net5.0 - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\Cake.Core.0.23.0\lib\net46\Cake.Core.dll - - - ..\packages\Cake.Testing.0.23.0\lib\net46\Cake.Testing.dll - - - ..\packages\Castle.Core.4.2.1\lib\net45\Castle.Core.dll - - - ..\packages\CsvHelper.6.0.0\lib\net45\CsvHelper.dll - - - ..\packages\NSubstitute.3.1.0\lib\net46\NSubstitute.dll - - - ..\packages\Should.1.1.20\lib\Should.dll - True - - - - - - - ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll - True - - - ..\packages\System.Net.Http.4.3.3\lib\net46\System.Net.Http.dll - - - - ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - True - - - ..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll - - - ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll - - - ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll - - - ..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.4.0\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - - - - - - - - ..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll - - - ..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll - True - - - ..\packages\xunit.assert.2.3.1\lib\netstandard1.1\xunit.assert.dll - - - ..\packages\xunit.extensibility.core.2.3.1\lib\netstandard1.1\xunit.core.dll - - - ..\packages\xunit.extensibility.execution.2.3.1\lib\net452\xunit.execution.desktop.dll - - - - - - - - - True - True - Resources.resx - - - - - {85c3e531-f53b-4344-9456-1b0176e547da} - Cake.CsvHelper - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - + - - + + - + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - + \ No newline at end of file diff --git a/src/Cake.CsvHelper.Tests/CsvHelperAliasesTests.cs b/src/Cake.CsvHelper.Tests/CsvHelperAliasesTests.cs index 76bdd96..02f39b5 100644 --- a/src/Cake.CsvHelper.Tests/CsvHelperAliasesTests.cs +++ b/src/Cake.CsvHelper.Tests/CsvHelperAliasesTests.cs @@ -4,7 +4,7 @@ using Cake.Core.IO; using Cake.CsvHelper.Tests.Fixtures; using NSubstitute; -using Should; +using Shouldly; using Xunit; namespace Cake.CsvHelper.Tests { @@ -19,7 +19,7 @@ public void Should_Throw_If_Context_Is_Null() { var result = Record.Exception(() => CsvHelperAliases.ReadCsv(null, file.Path)); // Then - result.ShouldBeType().ParamName.ShouldEqual("context"); + result.ShouldBeOfType().ParamName.ShouldBe("context"); } [Fact] @@ -33,7 +33,7 @@ public void Should_Throw_If_CSV_File_Is_Null() { var result = Record.Exception(() => CsvHelperAliases.ReadCsv(context, null)); // Then - result.ShouldBeType().ParamName.ShouldEqual("csvFile"); + result.ShouldBeOfType().ParamName.ShouldBe("csvFile"); } } @@ -47,7 +47,7 @@ public void Should_Throw_If_Context_Is_Null() { var result = Record.Exception(() => CsvHelperAliases.WriteCsv(null, file.Path, new List())); // Then - result.ShouldBeType().ParamName.ShouldEqual("context"); + result.ShouldBeOfType().ParamName.ShouldBe("context"); } } } diff --git a/src/Cake.CsvHelper.Tests/CsvHelperTests.cs b/src/Cake.CsvHelper.Tests/CsvHelperTests.cs index a3dc40b..16b3092 100644 --- a/src/Cake.CsvHelper.Tests/CsvHelperTests.cs +++ b/src/Cake.CsvHelper.Tests/CsvHelperTests.cs @@ -4,9 +4,8 @@ using Cake.Core.IO; using Cake.CsvHelper.Tests.Fixtures; using Cake.CsvHelper.Tests.Properties; -using Should; +using Shouldly; using Xunit; -using Xunit.Sdk; namespace Cake.CsvHelper.Tests { public sealed class CsvHelperTests { @@ -20,20 +19,20 @@ public void Should_Throw_If_CsvFile_Is_Null() { var result = Record.Exception(() => fixture.Read()); // Then - result.ShouldBeType().ParamName.ShouldEqual("csvFile"); + result.ShouldBeOfType().ParamName.ShouldBe("csvFile"); } [Fact] public void Should_Throw_If_Settings_Are_Null() { // Given var fixture = new CsvHelpersFixture(); - fixture.Settings = null; + fixture.Configuration = null; // When var result = Record.Exception(() => fixture.Read()); // Then - result.ShouldBeType().ParamName.ShouldEqual("settings"); + result.ShouldBeOfType().ParamName.ShouldBe("configuration"); } [Fact] @@ -46,7 +45,7 @@ public void Should_Throw_If_File_Does_Not_Exist() { var result = Record.Exception(() => fixture.Read()); // Then - result.ShouldBeType(); + result.ShouldBeOfType(); } } @@ -61,7 +60,7 @@ public void Should_Throw_If_CsvFile_Is_Null() { var result = Record.Exception(() => fixture.WriteNoMapping()); // Then - result.ShouldBeType().ParamName.ShouldEqual("csvFile"); + result.ShouldBeOfType().ParamName.ShouldBe("csvFile"); } [Fact] @@ -73,20 +72,20 @@ public void Should_Throw_If_Records_Are_Null() { var result = Record.Exception(() => fixture.WriteNoMapping()); // Then - result.ShouldBeType().ParamName.ShouldEqual("records"); + result.ShouldBeOfType().ParamName.ShouldBe("records"); } [Fact] public void Should_Throw_If_Settings_Are_Null() { // Given var fixture = new CsvHelpersFixture(); - fixture.Settings = null; + fixture.Configuration = null; // When var result = Record.Exception(() => fixture.WriteNoMapping()); // Then - result.ShouldBeType().ParamName.ShouldEqual("settings"); + result.ShouldBeOfType().ParamName.ShouldBe("configuration"); } [Fact(Skip = "Experimental")] @@ -99,12 +98,12 @@ public void Should_Write_Records_To_CsvFile_With_No_Map() { // Then var resultFile = fixture.FileSystem.GetFile(fixture.ResultPath); - resultFile.Exists.ShouldEqual(true); + resultFile.Exists.ShouldBeTrue(); string resultString; using(var resultStream = resultFile.OpenRead()) using (var streamReader = new StreamReader(resultStream, Encoding.UTF8)) { resultString = streamReader.ReadToEnd(); - resultString.Trim().ShouldEqual(Resources.CsvHelper_CsvFile.Trim()); + resultString.Trim().ShouldBe(Resources.CsvHelper_CsvFile.Trim()); } } } @@ -120,7 +119,7 @@ public void Should_Throw_If_CsvFile_Is_Null() { var result = Record.Exception(() => fixture.WriteWithMapping()); // Then - result.ShouldBeType().ParamName.ShouldEqual("csvFile"); + result.ShouldBeOfType().ParamName.ShouldBe("csvFile"); } [Fact] @@ -132,7 +131,7 @@ public void Should_Throw_If_Records_Are_Null() { var result = Record.Exception(() => fixture.WriteWithMapping()); // Then - result.ShouldBeType().ParamName.ShouldEqual("records"); + result.ShouldBeOfType().ParamName.ShouldBe("records"); } [Fact] @@ -144,7 +143,7 @@ public void Should_Throw_If_ClassMap_Is_Null() { var result = Record.Exception(() => fixture.WriteWithMapping()); // Then - result.ShouldBeType().ParamName.ShouldEqual("classMap"); + result.ShouldBeOfType().ParamName.ShouldBe("classMap"); } [Fact] @@ -156,20 +155,20 @@ public void Should_Throw_If_Mapping_Is_Null() { var result = Record.Exception(() => fixture.WriteWithMapping(true)); // Then - result.ShouldBeType().ParamName.ShouldEqual("mapping"); + result.ShouldBeOfType().ParamName.ShouldBe("mapping"); } [Fact] public void Should_Throw_If_Settings_Are_Null() { // Given var fixture = new CsvHelpersFixture(); - fixture.Settings = null; + fixture.Configuration = null; // When var result = Record.Exception(() => fixture.WriteWithMapping()); // Then - result.ShouldBeType().ParamName.ShouldEqual("settings"); + result.ShouldBeOfType().ParamName.ShouldBe("configuration"); } [Fact(Skip = "Experimental")] @@ -182,13 +181,13 @@ public void Should_Write_Records_To_CsvFile_With_Class_Map() { // Then var resultFile = fixture.FileSystem.GetFile(fixture.ResultPath); - resultFile.Exists.ShouldEqual(true); + resultFile.Exists.ShouldBeTrue(); string resultString; using (var resultStream = resultFile.OpenRead()) using (var streamReader = new StreamReader(resultStream, Encoding.UTF8)) { resultString = streamReader.ReadToEnd(); } - resultString.Trim().ShouldEqual(Resources.CsvHelper_MappedFile.Trim()); + resultString.Trim().ShouldBe(Resources.CsvHelper_MappedFile.Trim()); } [Fact(Skip = "Experimental")] @@ -201,13 +200,13 @@ public void Should_Write_Records_To_CsvFile_With_Dictionary_Map() { // Then var resultFile = fixture.FileSystem.GetFile(fixture.ResultPath); - resultFile.Exists.ShouldEqual(true); + resultFile.Exists.ShouldBeTrue(); string resultString; using (var resultStream = resultFile.OpenRead()) using (var streamReader = new StreamReader(resultStream, Encoding.UTF8)) { resultString = streamReader.ReadToEnd(); } - resultString.Trim().ShouldEqual(Resources.CsvHelper_MappedFile.Trim()); + resultString.Trim().ShouldBe(Resources.CsvHelper_MappedFile.Trim()); } } } diff --git a/src/Cake.CsvHelper.Tests/Fixtures/CsvHelpersFixture.cs b/src/Cake.CsvHelper.Tests/Fixtures/CsvHelpersFixture.cs index 1d99a20..5637ee7 100644 --- a/src/Cake.CsvHelper.Tests/Fixtures/CsvHelpersFixture.cs +++ b/src/Cake.CsvHelper.Tests/Fixtures/CsvHelpersFixture.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Globalization; using Cake.Core; using Cake.Core.IO; using Cake.CsvHelper.Tests.Properties; @@ -12,13 +13,13 @@ internal sealed class CsvHelpersFixture { public ICakeContext Context { get; set; } public FilePath CsvFilePath { get; set; } public FilePath ResultPath { get; set; } - public CsvHelperSettings Settings { get; set; } + public CsvConfiguration Configuration { get; set; } public List People { get; set; } public Dictionary DictionaryMap { get; set; } public ClassMap ClassMap { get; set; } public CsvHelpersFixture(bool csvFileExists = true, bool peopleExists = true) { - Settings = new CsvHelperSettings(); + Configuration = new CsvConfiguration(CultureInfo.InvariantCulture); ClassMap = new PersonMap(); @@ -54,21 +55,21 @@ public CsvHelpersFixture(bool csvFileExists = true, bool peopleExists = true) { public void Read() { var csvHelper = new CsvHelpers(Context.FileSystem, Context.Environment); - csvHelper.ReadRecords(CsvFilePath, null, Settings); + csvHelper.ReadRecords(CsvFilePath, null, Configuration); } public void WriteNoMapping() { var csvHelper = new CsvHelpers(Context.FileSystem, Context.Environment); - csvHelper.WriteRecords(ResultPath, People, Settings); + csvHelper.WriteRecords(ResultPath, People, Configuration); } public void WriteWithMapping(bool useDictionaryMapping = false) { var csvHelper = new CsvHelpers(Context.FileSystem, Context.Environment); if (useDictionaryMapping) { - csvHelper.WriteRecords(ResultPath, People, DictionaryMap, Settings); + csvHelper.WriteRecords(ResultPath, People, DictionaryMap, Configuration); } else { - csvHelper.WriteRecords(ResultPath, People, ClassMap, Settings); + csvHelper.WriteRecords(ResultPath, People, ClassMap, Configuration); } } } diff --git a/src/Cake.CsvHelper.Tests/Properties/AssemblyInfo.cs b/src/Cake.CsvHelper.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index cf8c6fd..0000000 --- a/src/Cake.CsvHelper.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Cake.CsvHelper.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Cake.CsvHelper.Tests")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("1691864a-29da-4ed9-a2c1-3ee39d006f51")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Cake.CsvHelper.Tests/app.config b/src/Cake.CsvHelper.Tests/app.config deleted file mode 100644 index 7d8c922..0000000 --- a/src/Cake.CsvHelper.Tests/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/Cake.CsvHelper.Tests/packages.config b/src/Cake.CsvHelper.Tests/packages.config deleted file mode 100644 index ccf02bd..0000000 --- a/src/Cake.CsvHelper.Tests/packages.config +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Cake.CsvHelper/Cake.CsvHelper.csproj b/src/Cake.CsvHelper/Cake.CsvHelper.csproj index 1152c16..90bdd2c 100644 --- a/src/Cake.CsvHelper/Cake.CsvHelper.csproj +++ b/src/Cake.CsvHelper/Cake.CsvHelper.csproj @@ -1,68 +1,13 @@ - - - + + - Debug - AnyCPU - {85C3E531-F53B-4344-9456-1B0176E547DA} - Library - Properties - Cake.CsvHelper - Cake.CsvHelper - v4.6.1 - 512 - + net46;netstandard2.0;net5.0 + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Cake.CsvHelper.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Cake.CsvHelper.XML - - - - ..\packages\Cake.Core.0.23.0\lib\net46\Cake.Core.dll - - - ..\packages\CsvHelper.6.0.0\lib\net45\CsvHelper.dll - - - - - - - - - - - - - - - - - - + + + + - - + \ No newline at end of file diff --git a/src/Cake.CsvHelper/CsvHelperAliases.cs b/src/Cake.CsvHelper/CsvHelperAliases.cs index abcc2c2..2e4daa8 100644 --- a/src/Cake.CsvHelper/CsvHelperAliases.cs +++ b/src/Cake.CsvHelper/CsvHelperAliases.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using Cake.Core; using Cake.Core.Annotations; using Cake.Core.IO; @@ -8,7 +9,7 @@ namespace Cake.CsvHelper { /// - /// Contians functionality related to reading and writing CSV files. + /// Contains functionality related to reading and writing CSV files. /// [CakeAliasCategory("CsvHelper")] public static class CsvHelperAliases @@ -28,8 +29,8 @@ public static class CsvHelperAliases [CakeMethodAlias] [CakeAliasCategory("ReadCsv")] public static IEnumerable ReadCsv(this ICakeContext context, FilePath csvFile) { - var settings = new CsvHelperSettings(); - return ReadCsv(context, csvFile, null, settings); + var configuration = new CsvConfiguration(CultureInfo.InvariantCulture); + return ReadCsv(context, csvFile, null, configuration); } /// @@ -38,7 +39,7 @@ public static IEnumerable ReadCsv(this ICakeContext context, FilePath csvF /// The type. /// The context. /// The CSV to read. - /// The settings. + /// The configuration. /// List objects as defined by type. /// /// @@ -47,8 +48,8 @@ public static IEnumerable ReadCsv(this ICakeContext context, FilePath csvF /// [CakeMethodAlias] [CakeAliasCategory("ReadCsv")] - public static IEnumerable ReadCsv(this ICakeContext context, FilePath csvFile, CsvHelperSettings settings) { - return ReadCsv(context, csvFile, null, settings); + public static IEnumerable ReadCsv(this ICakeContext context, FilePath csvFile, CsvConfiguration configuration) { + return ReadCsv(context, csvFile, null, configuration); } /// @@ -69,8 +70,8 @@ public static IEnumerable ReadCsv(this ICakeContext context, FilePath csvF [CakeNamespaceImport("CsvHelper.Configuration.CsvClassMap")] public static IEnumerable ReadCsv(this ICakeContext context, FilePath csvFile, ClassMap classMap) { - var settings = new CsvHelperSettings(); - return ReadCsv(context, csvFile, classMap, settings); + var configuration = new CsvConfiguration(CultureInfo.InvariantCulture); + return ReadCsv(context, csvFile, classMap, configuration); } /// @@ -80,7 +81,7 @@ public static IEnumerable ReadCsv(this ICakeContext context, FilePath csvF /// The context. /// The CSV to read. /// The CSV class map. - /// The settings. + /// The configuration. /// List objects as defined by type. /// /// @@ -90,18 +91,18 @@ public static IEnumerable ReadCsv(this ICakeContext context, FilePath csvF [CakeMethodAlias] [CakeAliasCategory("ReadCsv")] [CakeNamespaceImport("CsvHelper.Configuration.CsvClassMap")] - public static IEnumerable ReadCsv(this ICakeContext context, FilePath csvFile, ClassMap classMap, CsvHelperSettings settings) + public static IEnumerable ReadCsv(this ICakeContext context, FilePath csvFile, ClassMap classMap, CsvConfiguration configuration) { if (context == null) { throw new ArgumentNullException(nameof(context)); } var csvHelpers = new CsvHelpers(context.FileSystem, context.Environment); - return csvHelpers.ReadRecords(csvFile, classMap, settings); + return csvHelpers.ReadRecords(csvFile, classMap, configuration); } /// - /// Writes the records to the speficed file using the specified class mapp and settings. + /// Writes the records to the specified file using the specified class map and settings. /// /// The type. /// The context. @@ -117,18 +118,18 @@ public static IEnumerable ReadCsv(this ICakeContext context, FilePath csvF [CakeAliasCategory("WriteCsv")] public static void WriteCsv(this ICakeContext context, FilePath csvFile, List records) { - var settings = new CsvHelperSettings(); - WriteCsv(context, csvFile, records, settings); + var configuration = new CsvConfiguration(CultureInfo.InvariantCulture); + WriteCsv(context, csvFile, records, configuration); } /// - /// Writes the records to the speficed file using the specified class mapp and settings. + /// Writes the records to the specified file using the specified class map and settings. /// /// The type. /// The context. /// The CSV to file to write. /// The list objects you want to write to a csv. - /// The settings. + /// The configuration. /// List objects as defined by type. /// /// @@ -137,25 +138,25 @@ public static void WriteCsv(this ICakeContext context, FilePath csvFile, List /// [CakeMethodAlias] [CakeAliasCategory("WriteCsv")] - public static void WriteCsv(this ICakeContext context, FilePath csvFile, List records, CsvHelperSettings settings) + public static void WriteCsv(this ICakeContext context, FilePath csvFile, List records, CsvConfiguration configuration) { if (context == null) { throw new ArgumentNullException(nameof(context)); } var csvHelpers = new CsvHelpers(context.FileSystem, context.Environment); - csvHelpers.WriteRecords(csvFile, records, settings); + csvHelpers.WriteRecords(csvFile, records, configuration); } /// - /// Writes the records to the speficed file using the specified class mapp and settings. + /// Writes the records to the specified file using the specified class map and settings. /// /// The type. /// The context. /// The CSV to file to write. /// The list objects you want to write to a csv. /// The property column mapping. - /// The settings. + /// The configuration. /// List objects as defined by type. /// /// @@ -168,25 +169,27 @@ public static void WriteCsv(this ICakeContext context, FilePath csvFile, List /// [CakeMethodAlias] [CakeAliasCategory("WriteCsv")] - public static void WriteCsv(this ICakeContext context, FilePath csvFile, List records, Dictionary mapping, CsvHelperSettings settings) + public static void WriteCsv(this ICakeContext context, FilePath csvFile, List records, + Dictionary mapping, CsvConfiguration configuration) { if (context == null) { throw new ArgumentNullException(nameof(context)); } + var csvHelpers = new CsvHelpers(context.FileSystem, context.Environment); - csvHelpers.WriteRecords(csvFile, records, mapping, settings); + csvHelpers.WriteRecords(csvFile, records, mapping, configuration); } /// - /// Writes the records to the speficed file using the specified class mapp and settings. + /// Writes the records to the specified file using the specified class map and settings. /// /// The type. /// The context. /// The CSV to file to write. /// The list objects you want to write to a csv. /// The CSV Helper Class Map. - /// The settings. + /// The configuration. /// List objects as defined by type. /// /// @@ -204,14 +207,14 @@ public static void WriteCsv(this ICakeContext context, FilePath csvFile, List [CakeMethodAlias] [CakeAliasCategory("WriteCsv")] [CakeNamespaceImport("CsvHelper.Configuration.CsvClassMap")] - public static void WriteCsv(this ICakeContext context, FilePath csvFile, List records, ClassMap classMap, CsvHelperSettings settings) + public static void WriteCsv(this ICakeContext context, FilePath csvFile, List records, ClassMap classMap, CsvConfiguration configuration) { if (context == null) { throw new ArgumentNullException(nameof(context)); } var csvHelpers = new CsvHelpers(context.FileSystem, context.Environment); - csvHelpers.WriteRecords(csvFile,records, classMap, settings); + csvHelpers.WriteRecords(csvFile,records, classMap, configuration); } } } diff --git a/src/Cake.CsvHelper/CsvHelpers.cs b/src/Cake.CsvHelper/CsvHelpers.cs index cc066d1..1691820 100644 --- a/src/Cake.CsvHelper/CsvHelpers.cs +++ b/src/Cake.CsvHelper/CsvHelpers.cs @@ -31,34 +31,34 @@ public CsvHelpers(IFileSystem fileSystem, ICakeEnvironment environment) { /// The record type. /// The CSV file to read. /// The class map to use, null if not needed. - /// The settings. + /// The configuration. /// List of defined type. - public IEnumerable ReadRecords(FilePath csvFile, ClassMap classMap, CsvHelperSettings settings) { + public IEnumerable ReadRecords(FilePath csvFile, ClassMap classMap, CsvConfiguration configuration) { if (csvFile == null) { throw new ArgumentNullException(nameof(csvFile)); } - if (settings == null) { - throw new ArgumentNullException(nameof(settings)); + if (configuration == null) { + throw new ArgumentNullException(nameof(configuration)); } var file = GetFile(csvFile); using (var textReader = new StreamReader(file.OpenRead())) - using (var csvReader = new CsvReader(textReader)) { + using (var csvReader = new CsvReader(textReader, configuration)) { if (classMap != null) { - csvReader.Configuration.RegisterClassMap(classMap); + csvReader.Context.RegisterClassMap(classMap); } return csvReader.GetRecords().ToList(); } } /// - /// Writes the records to the speficed file using the specified class mapp and settings. + /// Writes the records to the specified file using the specified class map and settings. /// /// The record type. /// The CSV file to write. /// The records to write. /// The class map. - /// The settings. - public void WriteRecords(FilePath csvFile, List records, ClassMap classMap, CsvHelperSettings settings) { + /// The configuration. + public void WriteRecords(FilePath csvFile, List records, ClassMap classMap, CsvConfiguration configuration) { if (csvFile == null) { throw new ArgumentNullException(nameof(csvFile)); } @@ -68,15 +68,15 @@ public void WriteRecords(FilePath csvFile, List records, ClassMap classMap if (classMap == null) { throw new ArgumentNullException(nameof(classMap)); } - if (settings == null) { - throw new ArgumentNullException(nameof(settings)); + if (configuration == null) { + throw new ArgumentNullException(nameof(configuration)); } var file = GetFile(csvFile); using (var stream = file.OpenWrite()) - using (var textWriter = new StreamWriter(stream, settings.Encoding)) - using (var csvWriter = new CsvWriter(textWriter)) { - csvWriter.Configuration.RegisterClassMap(classMap); + using (var textWriter = new StreamWriter(stream, configuration.Encoding)) + using (var csvWriter = new CsvWriter(textWriter, configuration)) { + csvWriter.Context.RegisterClassMap(classMap); csvWriter.WriteHeader(); foreach (var record in records) { csvWriter.WriteRecord(record); @@ -86,46 +86,46 @@ public void WriteRecords(FilePath csvFile, List records, ClassMap classMap } /// - /// Writes the records to the speficed file using the specified mapping and settings. + /// Writes the records to the specified file using the specified mapping and settings. /// /// The record type. /// The CSV file to write. /// The records to write. /// The property column mapping. - /// The settings. + /// The configuration. public void WriteRecords(FilePath csvFile, List records, Dictionary mapping, - CsvHelperSettings settings) { + CsvConfiguration configuration) { if (mapping == null) { throw new ArgumentNullException(nameof(mapping)); } var customMap = new DefaultClassMap(); - customMap.AutoMap(); - WriteRecords(csvFile, records, customMap, settings); + customMap.AutoMap(configuration); + WriteRecords(csvFile, records, customMap, configuration); } /// - /// Writes the records to the speficed file using automap and settings. + /// Writes the records to the specified file using automap and settings. /// /// The record type. /// The CSV file to write. /// The records to write. - /// The settings. - public void WriteRecords(FilePath csvFile, List records, CsvHelperSettings settings) { + /// The configuration. + public void WriteRecords(FilePath csvFile, List records, CsvConfiguration configuration) { if (csvFile == null) { throw new ArgumentNullException(nameof(csvFile)); } if (records == null) { throw new ArgumentNullException(nameof(records)); } - if (settings == null) { - throw new ArgumentNullException(nameof(settings)); + if (configuration == null) { + throw new ArgumentNullException(nameof(configuration)); } // Make the path absolute if necessary. var file = GetFile(csvFile); using (var stream = file.OpenWrite()) - using (var textWriter = new StreamWriter(stream, settings.Encoding)) - using (var csvWriter = new CsvWriter(textWriter)) { + using (var textWriter = new StreamWriter(stream, configuration.Encoding)) + using (var csvWriter = new CsvWriter(textWriter, configuration)) { csvWriter.WriteHeader(); foreach (var record in records) { csvWriter.WriteRecord(record); diff --git a/src/Cake.CsvHelper/Properties/AssemblyInfo.cs b/src/Cake.CsvHelper/Properties/AssemblyInfo.cs deleted file mode 100644 index 123232e..0000000 --- a/src/Cake.CsvHelper/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Cake.CsvHelper")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Cake.CsvHelper")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("85c3e531-f53b-4344-9456-1b0176e547da")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Cake.CsvHelper/packages.config b/src/Cake.CsvHelper/packages.config deleted file mode 100644 index 4772a52..0000000 --- a/src/Cake.CsvHelper/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file From 64e42dc982ab5c1b9e17ce2d853da4ea7fea846b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Pluci=C5=84ski?= Date: Sat, 13 Mar 2021 18:09:16 +0100 Subject: [PATCH 02/11] upgrade CsvHelper, as per recommendation targeted at net461 --- src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj | 8 ++++---- src/Cake.CsvHelper/Cake.CsvHelper.csproj | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj b/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj index 04ea044..8886a98 100644 --- a/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj +++ b/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj @@ -1,7 +1,7 @@  - net46;net5.0 + net461;netcoreapp3.1;net5.0 @@ -12,11 +12,11 @@ - + - - + + all diff --git a/src/Cake.CsvHelper/Cake.CsvHelper.csproj b/src/Cake.CsvHelper/Cake.CsvHelper.csproj index 90bdd2c..cefbee2 100644 --- a/src/Cake.CsvHelper/Cake.CsvHelper.csproj +++ b/src/Cake.CsvHelper/Cake.CsvHelper.csproj @@ -1,13 +1,13 @@  - net46;netstandard2.0;net5.0 + net461;netstandard2.0;net5.0 true - + \ No newline at end of file From 3843581f1442d58f9a0d92daffeb239dc80f6a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Pluci=C5=84ski?= Date: Sat, 13 Mar 2021 18:54:54 +0100 Subject: [PATCH 03/11] updated nuspec --- nuspec/nuget/Cake.CsvHelper.nuspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nuspec/nuget/Cake.CsvHelper.nuspec b/nuspec/nuget/Cake.CsvHelper.nuspec index 64d4b40..6d5fcf9 100644 --- a/nuspec/nuget/Cake.CsvHelper.nuspec +++ b/nuspec/nuget/Cake.CsvHelper.nuspec @@ -18,9 +18,9 @@ - - - + + + From c13244698350b0cc7bd717cc59e3ad7f4ceb7a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Pluci=C5=84ski?= Date: Sun, 11 Apr 2021 14:49:49 +0200 Subject: [PATCH 04/11] upgraded libs --- src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj | 4 ++-- src/Cake.CsvHelper/Cake.CsvHelper.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj b/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj index 8886a98..d88035f 100644 --- a/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj +++ b/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj @@ -12,8 +12,8 @@ - - + + diff --git a/src/Cake.CsvHelper/Cake.CsvHelper.csproj b/src/Cake.CsvHelper/Cake.CsvHelper.csproj index cefbee2..e3a5b6b 100644 --- a/src/Cake.CsvHelper/Cake.CsvHelper.csproj +++ b/src/Cake.CsvHelper/Cake.CsvHelper.csproj @@ -7,7 +7,7 @@ - + \ No newline at end of file From cd7cac5e974175fea1f3590210c478acc1be3724 Mon Sep 17 00:00:00 2001 From: "C. Augusto Proiete" Date: Sat, 15 May 2021 23:20:15 -0300 Subject: [PATCH 05/11] (#7) Update README Closes #7 --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index f59277c..2ce8cf3 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ Cake Addin for working with CSV files using the CSVHelper library. [![License](http://img.shields.io/:license-apache-blue.svg)](https://github.com/RadioSystems/Cake.CsvHelper/blob/master/LICENSE) +## Give a Star! :star: + +If you like or are using this project please give it a star. Thanks! + ## Information | | Stable | Pre-release | @@ -41,3 +45,17 @@ On Windows PowerShell run: ```powershell ./build ``` + +## Discussion + +For questions and to discuss ideas & feature requests, use the [GitHub discussions on the Cake GitHub repository](https://github.com/cake-build/cake/discussions), under the [Extension Q&A](https://github.com/cake-build/cake/discussions/categories/extension-q-a) category. + +[![Join in the discussion on the Cake repository](https://img.shields.io/badge/GitHub-Discussions-green?logo=github)](https://github.com/cake-build/cake/discussions) + +## Release History + +Click on the [Releases](https://github.com/cake-contrib/Cake.ISO/releases) tab on GitHub. + +--- + +_Copyright © 2017-2021 Cake Contributors - Provided under the [MIT License](LICENSE)._ From 12e85fc538a7cfd729cb0353dc5375ae130f8b47 Mon Sep 17 00:00:00 2001 From: "C. Augusto Proiete" Date: Sun, 16 May 2021 02:38:20 -0300 Subject: [PATCH 06/11] (#8) Change license from Apache 2.0 to MIT Closes #8 --- LICENSE | 222 +++-------------------------- README.md | 10 +- nuspec/nuget/Cake.CsvHelper.nuspec | 10 +- 3 files changed, 27 insertions(+), 215 deletions(-) diff --git a/LICENSE b/LICENSE index 2fb7155..30d3327 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,21 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2017 Radio Systems Corporation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License 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. +MIT License + +Copyright (c) 2017-2021 Cake Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 2ce8cf3..90f26dd 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ Cake Addin for working with CSV files using the CSVHelper library. -[![License](http://img.shields.io/:license-apache-blue.svg)](https://github.com/RadioSystems/Cake.CsvHelper/blob/master/LICENSE) - ## Give a Star! :star: If you like or are using this project please give it a star. Thanks! @@ -30,12 +28,6 @@ If you like or are using this project please give it a star. Thanks! - [Documentation](https://radiosystems.github.io/Cake.CsvHelper) -## Chat Room - -Come join in the conversation about Cake.CsvHelper in our Gitter Chat Room - -[![Join the chat at https://gitter.im/cake-contrib/Lobby](https://badges.gitter.im/cake-contrib/Lobby.svg)](https://gitter.im/cake-contrib/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - ## Build To build this package we are using Cake. @@ -54,7 +46,7 @@ For questions and to discuss ideas & feature requests, use the [GitHub discussio ## Release History -Click on the [Releases](https://github.com/cake-contrib/Cake.ISO/releases) tab on GitHub. +Click on the [Releases](https://github.com/cake-contrib/Cake.CsvHelper/releases) tab on GitHub. --- diff --git a/nuspec/nuget/Cake.CsvHelper.nuspec b/nuspec/nuget/Cake.CsvHelper.nuspec index d781083..d19c248 100644 --- a/nuspec/nuget/Cake.CsvHelper.nuspec +++ b/nuspec/nuget/Cake.CsvHelper.nuspec @@ -3,15 +3,15 @@ Cake.CsvHelper 0.0.0 - Radio Systems Corporation - Radio Systems Corporation + cake-contrib + cake-contrib Cake Addin for working with CSV files using the CSVHelper library. A set of aliases for Cake to help with running Gulp scripts as part of a build. - https://github.com/RadioSystems/Cake.CsvHelper/blob/master/LICENSE - https://github.com/RadioSystems/Cake.CsvHelper + https://github.com/cake-contrib/Cake.CsvHelper/blob/master/LICENSE + https://github.com/cake-contrib/Cake.CsvHelper https://cdn.rawgit.com/cake-contrib/graphics/a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png false - Copyright (c) Radio Systems Corporation 2017 - Present + Copyright (c) 2017-2021 Cake Contributors Cake, Script, Build, CsvHelper, CSV, Addin From 60cd9eea958c2b0d728d0b279fe5e6fe8ab28766 Mon Sep 17 00:00:00 2001 From: "C. Augusto Proiete" Date: Sun, 16 May 2021 03:02:49 -0300 Subject: [PATCH 07/11] (#3) Add cake-addin tag to Cake.CsvHelper NuGet package Closes #3 --- nuspec/nuget/Cake.CsvHelper.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuspec/nuget/Cake.CsvHelper.nuspec b/nuspec/nuget/Cake.CsvHelper.nuspec index d19c248..7ea8612 100644 --- a/nuspec/nuget/Cake.CsvHelper.nuspec +++ b/nuspec/nuget/Cake.CsvHelper.nuspec @@ -12,7 +12,7 @@ https://cdn.rawgit.com/cake-contrib/graphics/a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png false Copyright (c) 2017-2021 Cake Contributors - Cake, Script, Build, CsvHelper, CSV, Addin + cake csv-helper csvhelper csv cake-addin cake-build cake-contrib addin script build From 3767ff8302748631bd36219c31e71d9ad242c968 Mon Sep 17 00:00:00 2001 From: "C. Augusto Proiete" Date: Sun, 16 May 2021 03:04:28 -0300 Subject: [PATCH 08/11] (#6) Update Cake.CsvHelper NuGet package icon to the new Cake-Contrib logo for Cake addins Closes #6 --- nuspec/nuget/Cake.CsvHelper.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuspec/nuget/Cake.CsvHelper.nuspec b/nuspec/nuget/Cake.CsvHelper.nuspec index 7ea8612..9146317 100644 --- a/nuspec/nuget/Cake.CsvHelper.nuspec +++ b/nuspec/nuget/Cake.CsvHelper.nuspec @@ -9,7 +9,7 @@ A set of aliases for Cake to help with running Gulp scripts as part of a build. https://github.com/cake-contrib/Cake.CsvHelper/blob/master/LICENSE https://github.com/cake-contrib/Cake.CsvHelper - https://cdn.rawgit.com/cake-contrib/graphics/a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png + https://cdn.jsdelivr.net/gh/cake-contrib/graphics/png/addin/cake-contrib-addin-medium.png false Copyright (c) 2017-2021 Cake Contributors cake csv-helper csvhelper csv cake-addin cake-build cake-contrib addin script build From 05fcf554f474b5c32a23f491983f96ba028ea9fb Mon Sep 17 00:00:00 2001 From: "C. Augusto Proiete" Date: Tue, 18 May 2021 23:24:54 -0300 Subject: [PATCH 09/11] Revert "(#8) Change license from Apache 2.0 to MIT" This reverts commit 12e85fc538a7cfd729cb0353dc5375ae130f8b47. --- LICENSE | 222 ++++++++++++++++++++++++++--- README.md | 10 +- nuspec/nuget/Cake.CsvHelper.nuspec | 10 +- 3 files changed, 215 insertions(+), 27 deletions(-) diff --git a/LICENSE b/LICENSE index 30d3327..2fb7155 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,201 @@ -MIT License - -Copyright (c) 2017-2021 Cake Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2017 Radio Systems Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License 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. diff --git a/README.md b/README.md index 90f26dd..2ce8cf3 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Cake Addin for working with CSV files using the CSVHelper library. +[![License](http://img.shields.io/:license-apache-blue.svg)](https://github.com/RadioSystems/Cake.CsvHelper/blob/master/LICENSE) + ## Give a Star! :star: If you like or are using this project please give it a star. Thanks! @@ -28,6 +30,12 @@ If you like or are using this project please give it a star. Thanks! - [Documentation](https://radiosystems.github.io/Cake.CsvHelper) +## Chat Room + +Come join in the conversation about Cake.CsvHelper in our Gitter Chat Room + +[![Join the chat at https://gitter.im/cake-contrib/Lobby](https://badges.gitter.im/cake-contrib/Lobby.svg)](https://gitter.im/cake-contrib/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + ## Build To build this package we are using Cake. @@ -46,7 +54,7 @@ For questions and to discuss ideas & feature requests, use the [GitHub discussio ## Release History -Click on the [Releases](https://github.com/cake-contrib/Cake.CsvHelper/releases) tab on GitHub. +Click on the [Releases](https://github.com/cake-contrib/Cake.ISO/releases) tab on GitHub. --- diff --git a/nuspec/nuget/Cake.CsvHelper.nuspec b/nuspec/nuget/Cake.CsvHelper.nuspec index 9146317..f9468cb 100644 --- a/nuspec/nuget/Cake.CsvHelper.nuspec +++ b/nuspec/nuget/Cake.CsvHelper.nuspec @@ -3,15 +3,15 @@ Cake.CsvHelper 0.0.0 - cake-contrib - cake-contrib + Radio Systems Corporation + Radio Systems Corporation Cake Addin for working with CSV files using the CSVHelper library. A set of aliases for Cake to help with running Gulp scripts as part of a build. - https://github.com/cake-contrib/Cake.CsvHelper/blob/master/LICENSE - https://github.com/cake-contrib/Cake.CsvHelper + https://github.com/RadioSystems/Cake.CsvHelper/blob/master/LICENSE + https://github.com/RadioSystems/Cake.CsvHelper https://cdn.jsdelivr.net/gh/cake-contrib/graphics/png/addin/cake-contrib-addin-medium.png false - Copyright (c) 2017-2021 Cake Contributors + Copyright (c) Radio Systems Corporation 2017 - Present cake csv-helper csvhelper csv cake-addin cake-build cake-contrib addin script build From 46ee7797a2776a4e74d3c77dce532bfa4b7c6d80 Mon Sep 17 00:00:00 2001 From: "C. Augusto Proiete" Date: Wed, 19 May 2021 00:34:43 -0300 Subject: [PATCH 10/11] Revert "(#8) Change license from Apache 2.0 to MIT" This reverts commit 12e85fc538a7cfd729cb0353dc5375ae130f8b47. --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 2ce8cf3..9450445 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,3 @@ For questions and to discuss ideas & feature requests, use the [GitHub discussio ## Release History Click on the [Releases](https://github.com/cake-contrib/Cake.ISO/releases) tab on GitHub. - ---- - -_Copyright © 2017-2021 Cake Contributors - Provided under the [MIT License](LICENSE)._ From f07049fc94adec28b84a7d362fd6b86451f57a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Pluci=C5=84ski?= Date: Sun, 24 Oct 2021 01:56:26 +0200 Subject: [PATCH 11/11] resolved conflict, upgraded csv helper --- nuspec/nuget/Cake.CsvHelper.nuspec | 19 ++++++++++--------- .../Cake.CsvHelper.Tests.csproj | 4 ++-- src/Cake.CsvHelper/Cake.CsvHelper.csproj | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/nuspec/nuget/Cake.CsvHelper.nuspec b/nuspec/nuget/Cake.CsvHelper.nuspec index 6d5fcf9..6bfa094 100644 --- a/nuspec/nuget/Cake.CsvHelper.nuspec +++ b/nuspec/nuget/Cake.CsvHelper.nuspec @@ -1,5 +1,6 @@ - + Cake.CsvHelper 0.0.0 @@ -12,21 +13,21 @@ https://cdn.rawgit.com/cake-contrib/graphics/a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png false Copyright (c) Radio Systems Corporation 2017 - Present - Cake, Script, Build, CsvHelper, CSV, Addin - - - + + + + cake csv-helper csvhelper csv cake-addin cake-build cake-contrib addin script build - - + + - - + + diff --git a/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj b/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj index d88035f..1baa3c3 100644 --- a/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj +++ b/src/Cake.CsvHelper.Tests/Cake.CsvHelper.Tests.csproj @@ -12,8 +12,8 @@ - - + + diff --git a/src/Cake.CsvHelper/Cake.CsvHelper.csproj b/src/Cake.CsvHelper/Cake.CsvHelper.csproj index e3a5b6b..9c0ba45 100644 --- a/src/Cake.CsvHelper/Cake.CsvHelper.csproj +++ b/src/Cake.CsvHelper/Cake.CsvHelper.csproj @@ -7,7 +7,7 @@ - + \ No newline at end of file