diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..727dfd7 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "cake.tool": { + "version": "0.38.5", + "commands": [ + "dotnet-cake" + ] + } + } +} \ No newline at end of file diff --git a/LICENSE b/LICENSE index 06a704d..8e9276f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2017 Toni Solarin-Sodara +Copyright (c) Søren Guldmund Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Pose.sln b/Pose.sln index c10b6f1..8f79fcb 100644 --- a/Pose.sln +++ b/Pose.sln @@ -12,6 +12,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pose.Tests", "test\Pose.Tes EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sandbox", "src\Sandbox\Sandbox.csproj", "{46827F5F-E0FD-428B-960C-9EFFFA3D7D9D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0. Solution", "0. Solution", "{970BBCC3-BC34-424B-B171-7ACC67C7BDC6}" + ProjectSection(SolutionItems) = preProject + LICENSE = LICENSE + README.md = README.md + nuget\Poser.nuspec = nuget\Poser.nuspec + build.cake = build.cake + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/README.md b/README.md index d9f2bb0..8c22f60 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -[![Windows build status](https://ci.appveyor.com/api/projects/status/github/tonerdo/pose?branch=master&svg=true)](https://ci.appveyor.com/project/tonerdo/pose) +[![Build status](https://dev.azure.com/palmund/Pose/_apis/build/status/Pose-CI?branchName=master)](https://dev.azure.com/palmund/Pose/_build/latest?definitionId=12) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) -[![NuGet version](https://badge.fury.io/nu/Pose.svg)](https://www.nuget.org/packages/Pose) +[![NuGet version](https://badge.fury.io/nu/Poser.svg)](https://www.nuget.org/packages/Poser) # Pose Pose allows you to replace any .NET method (including static and non-virtual) with a delegate. It is similar to [Microsoft Fakes](https://msdn.microsoft.com/en-us/library/hh549175.aspx) but unlike it Pose is implemented _entirely_ in managed code (Reflection Emit API). Everything occurs at runtime and in-memory, no unmanaged Profiling APIs and no file system pollution with re-written assemblies. @@ -9,7 +9,7 @@ Pose is cross platform and runs anywhere .NET is supported. It targets .NET Stan ## Installation -Available on [NuGet](https://www.nuget.org/packages/Pose/) +Available on [NuGet](https://www.nuget.org/packages/Poser/) Visual Studio: diff --git a/build.cake b/build.cake new file mode 100644 index 0000000..b16095a --- /dev/null +++ b/build.cake @@ -0,0 +1,63 @@ +var target = Argument("target", "Default"); + +var solutionFile = "./Pose.sln"; +var nuspecFileName = "Poser"; + +Task("Build") + .Does(() => +{ + var buildSettings = new DotNetCoreBuildSettings + { + Configuration = "Release", + Verbosity = DotNetCoreVerbosity.Minimal + }; + + DotNetCoreBuild(solutionFile, buildSettings); + +}); + +Task("Test") + .Does(() => +{ + var settings = new DotNetCoreTestSettings + { + Verbosity = DotNetCoreVerbosity.Minimal + }; + + DotNetCoreTest(solutionFile, settings); +}) +; + +Task("Default") + .IsDependentOn("Build") + .IsDependentOn("Test") +; + +Task("Pack") + //.IsDependentOn("Build") + //.IsDependentOn("Test") + .Does(() => +{ + Pack("Pose", new [] { "netstandard2.0" }); +}) +; + +RunTarget(target); + +public void Pack(string projectName, string[] targets) +{ + var buildSettings = new DotNetCoreMSBuildSettings() + .WithProperty("NuspecFile", $"../../nuget/{nuspecFileName}.nuspec") + .WithProperty("NuspecBasePath", "bin/Release"); + var settings = new DotNetCorePackSettings + { + MSBuildSettings = buildSettings, + Verbosity = DotNetCoreVerbosity.Minimal, + Configuration = "Release", + IncludeSource = true, + IncludeSymbols = true, + OutputDirectory = "./nuget" + }; + + DotNetCorePack($"./src/{projectName}/{projectName}.csproj", settings); +} diff --git a/nuget/Poser.nuspec b/nuget/Poser.nuspec new file mode 100644 index 0000000..8036f6c --- /dev/null +++ b/nuget/Poser.nuspec @@ -0,0 +1,56 @@ + + + + Poser + 2.0.0 + Pose + Søren Guldmund + Søren Guldmund + https://github.com/Miista/Pose + + MIT + + false + pose;mocking;testing;unit-test;isolation-framework;test-framework + Replace any .NET method (including static and non-virtual) with a delegate + Copyright 2024 + docs\README.md + + Provide better exception message when we cannot create instance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Pose/Pose.csproj b/src/Pose/Pose.csproj index 1ea8300..8ff0417 100644 --- a/src/Pose/Pose.csproj +++ b/src/Pose/Pose.csproj @@ -1,17 +1,9 @@ - Pose - Replace any .NET method (including static and non-virtual) with a delegate - 1.2.1 netstandard2.0;netcoreapp2.0;netcoreapp3.0;net48;net7.0;net8.0 portable Pose - Pose - pose;mocking;testing;unit-test;isolation-framework;test-framework - https://github.com/tonerdo/pose - https://github.com/tonerdo/pose/blob/master/LICENSE - git - https://github.com/tonerdo/pose + true