Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions docker/readme.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
## Build & Deploy via Docker & Nuget
This docker container will pull the latest version of this library, create a nuget package, and deploy it to Nuget.
The only thing is needs is a valid Nuget API key, from someone that has rights to publish the package to Nuget.
```
cd docker
docker build . # this will produce a hash key, say 12345678
docker run -e "APIKEY=your_nuget_key_here" 12345678
```
This container has been registered on Docker Hub, and can be run like so:
```
docker run -e "APIKEY=your_nuget_key_here" darrencauthon/csharp-sparkpost
```
## Build & Deploy via Docker & Nuget

This docker container will pull the latest version of this library, create a nuget package, and deploy it to Nuget.

The only thing is needs is a valid Nuget API key, from someone that has rights to publish the package to Nuget.

```
cd docker
docker build . # this will produce a hash key, say 12345678
docker run -e "APIKEY=your_nuget_key_here" 12345678
```

This container has been registered on Docker Hub, and can be run like so:

```
docker run -e "APIKEY=your_nuget_key_here" darrencauthon/csharp-sparkpost
```
224 changes: 112 additions & 112 deletions src/SparkPost.Portable/SparkPost.Portable.csproj
Original file line number Diff line number Diff line change
@@ -1,113 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2F7E9E0B-27BB-42AC-AB4A-B8249B64C654}</ProjectGuid>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>SparkPost</RootNamespace>
<AssemblyName>SparkPost.Portable</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;PORTABLE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<NoStdLib>false</NoStdLib>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<DefineConstants>PORTABLE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<NoStdLib>false</NoStdLib>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\SparkPost\Address.cs">
<Link>Address.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Attachment.cs">
<Link>Attachment.cs</Link>
</Compile>
<Compile Include="..\SparkPost\CcHandling.cs">
<Link>CcHandling.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Client.cs">
<Link>Client.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Content.cs">
<Link>Content.cs</Link>
</Compile>
<Compile Include="..\SparkPost\DataMapper.cs">
<Link>DataMapper.cs</Link>
</Compile>
<Compile Include="..\SparkPost\File.cs">
<Link>File.cs</Link>
</Compile>
<Compile Include="..\SparkPost\IClient.cs">
<Link>IClient.cs</Link>
</Compile>
<Compile Include="..\SparkPost\InlineImage.cs">
<Link>InlineImage.cs</Link>
</Compile>
<Compile Include="..\SparkPost\ITransmissions.cs">
<Link>ITransmissions.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Options.cs">
<Link>Options.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Recipient.cs">
<Link>Recipient.cs</Link>
</Compile>
<Compile Include="..\SparkPost\RecipientType.cs">
<Link>RecipientType.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Request.cs">
<Link>Request.cs</Link>
</Compile>
<Compile Include="..\SparkPost\RequestSender.cs">
<Link>RequestSender.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Response.cs">
<Link>Response.cs</Link>
</Compile>
<Compile Include="..\SparkPost\ResponseException.cs">
<Link>ResponseException.cs</Link>
</Compile>
<Compile Include="..\SparkPost\SendTransmissionResponse.cs">
<Link>SendTransmissionResponse.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Transmission.cs">
<Link>Transmission.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Transmissions.cs">
<Link>Transmissions.cs</Link>
</Compile>
<Compile Include="PortableReflectionExtensions.cs" />
<Compile Include="..\SparkPost\Properties\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\portable-net45+wp80+win8+wpa81+dnxcore50\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="..\SparkPost\SparkPost.nuspec">
<Link>SparkPost.nuspec</Link>
</None>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2F7E9E0B-27BB-42AC-AB4A-B8249B64C654}</ProjectGuid>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>SparkPost</RootNamespace>
<AssemblyName>SparkPost.Portable</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;PORTABLE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<NoStdLib>false</NoStdLib>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<DefineConstants>PORTABLE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<NoStdLib>false</NoStdLib>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\SparkPost\Address.cs">
<Link>Address.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Attachment.cs">
<Link>Attachment.cs</Link>
</Compile>
<Compile Include="..\SparkPost\CcHandling.cs">
<Link>CcHandling.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Client.cs">
<Link>Client.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Content.cs">
<Link>Content.cs</Link>
</Compile>
<Compile Include="..\SparkPost\DataMapper.cs">
<Link>DataMapper.cs</Link>
</Compile>
<Compile Include="..\SparkPost\File.cs">
<Link>File.cs</Link>
</Compile>
<Compile Include="..\SparkPost\IClient.cs">
<Link>IClient.cs</Link>
</Compile>
<Compile Include="..\SparkPost\InlineImage.cs">
<Link>InlineImage.cs</Link>
</Compile>
<Compile Include="..\SparkPost\ITransmissions.cs">
<Link>ITransmissions.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Options.cs">
<Link>Options.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Recipient.cs">
<Link>Recipient.cs</Link>
</Compile>
<Compile Include="..\SparkPost\RecipientType.cs">
<Link>RecipientType.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Request.cs">
<Link>Request.cs</Link>
</Compile>
<Compile Include="..\SparkPost\RequestSender.cs">
<Link>RequestSender.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Response.cs">
<Link>Response.cs</Link>
</Compile>
<Compile Include="..\SparkPost\ResponseException.cs">
<Link>ResponseException.cs</Link>
</Compile>
<Compile Include="..\SparkPost\SendTransmissionResponse.cs">
<Link>SendTransmissionResponse.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Transmission.cs">
<Link>Transmission.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Transmissions.cs">
<Link>Transmissions.cs</Link>
</Compile>
<Compile Include="PortableReflectionExtensions.cs" />
<Compile Include="..\SparkPost\Properties\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\portable-net45+wp80+win8+wpa81+dnxcore50\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="..\SparkPost\SparkPost.nuspec">
<Link>SparkPost.nuspec</Link>
</None>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
</Project>
8 changes: 4 additions & 4 deletions src/SparkPost.Tests/RequestMethodFinderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ public class FindForTests : AutoMoqTestFixture<RequestMethodFinder>
public void It_should_return_put_for_put()
{
Subject.FindFor(new Request {Method = "PUT"})
.ShouldBeType(typeof (Put));
.ShouldBeOfType(typeof (Put));
}

[Test]
public void It_should_return_post_for_post()
{
Subject.FindFor(new Request {Method = "POST"})
.ShouldBeType(typeof (Post));
.ShouldBeOfType(typeof (Post));
}

[Test]
public void It_should_return_delete_for_delete()
{
Subject.FindFor(new Request {Method = "DELETE"})
.ShouldBeType(typeof (Delete));
.ShouldBeOfType(typeof (Delete));
}

[Test]
public void It_should_return_get_for_get()
{
Subject.FindFor(new Request {Method = "GET"})
.ShouldBeType(typeof (Get));
.ShouldBeOfType(typeof (Get));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/SparkPost.Tests/RequestMethods/GetTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using AutoMoq.Helpers;
using NUnit.Framework;
using Should;
using Shouldly;
using SparkPost.RequestMethods;

namespace SparkPost.Tests.RequestMethods
Expand Down
2 changes: 1 addition & 1 deletion src/SparkPost.Tests/RequestMethods/PostTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using AutoMoq.Helpers;
using NUnit.Framework;
using Should;
using Shouldly;
using SparkPost.RequestMethods;

namespace SparkPost.Tests.RequestMethods
Expand Down
2 changes: 1 addition & 1 deletion src/SparkPost.Tests/RequestMethods/PutTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using AutoMoq.Helpers;
using NUnit.Framework;
using Should;
using Shouldly;
using SparkPost.RequestMethods;

namespace SparkPost.Tests.RequestMethods
Expand Down
Loading