Skip to content

Commit

Permalink
Merge pull request #11 from Mubicon/portToCore2.1
Browse files Browse the repository at this point in the history
Port to core2.1
  • Loading branch information
cristipufu authored Jan 29, 2019
2 parents 78b1841 + 95e69d6 commit c611158
Show file tree
Hide file tree
Showing 32 changed files with 363 additions and 349 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ nuget.exe
*.ipch
.vs/
project.lock.json

.envrc
.DS_Store
bower_components/
node_modules/
node_modules/
.idea
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet-core 2.1.403
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pack_client:
cd src/SwiftClient; dotnet pack -c Release
pack_service:
cd src/SwiftClient.AspNetCore; dotnet pack -c Release
push_client:
./push_client.sh
push_service:
./push_service.sh
upload_client: pack_client push_client
upload_service: pack_service push_service

7 changes: 7 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="mrcr.ru" value="https://nuget.mrcr.ru" />
</packageSources>
</configuration>
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddMvc();

services.Configure<SwiftServiceOptions>(Configuration.GetSection("SwiftCluster"));
services.AddSingleton<ISwiftLogger, SwiftServiceLogger>();
services.AddSingleton<ISwiftAuthManager, SwiftAuthManagerMemoryCache>();
services.AddTransient<ISwiftClient, SwiftService>();
services.AddSwift();
}
```

Expand Down
47 changes: 22 additions & 25 deletions SwiftClient.sln
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2260B1B4-9A09-425D-8A62-511C8AA95C78}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2A043E34-4F7B-43F8-8C2B-823309D51C23}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "SwiftClient", "src\SwiftClient\SwiftClient.xproj", "{C855AA03-FD6C-422F-99FA-4A0BFCB67F39}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "SwiftClient.Test", "test\SwiftClient.Test\SwiftClient.Test.xproj", "{5985B113-1A1C-4EFD-B06C-341C4B9467E9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{D2397301-E397-40ED-8307-A9D94C7E687A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{B791F94A-97EF-45EE-8E67-A43704F459B5}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "SwiftClient.AspNetCore.Demo", "samples\SwiftClient.AspNetCore.Demo\SwiftClient.AspNetCore.Demo.xproj", "{B1D7D776-743F-4819-87F1-5DDFD3D26C07}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SwiftClient", "src\SwiftClient\SwiftClient.csproj", "{C855AA03-FD6C-422F-99FA-4A0BFCB67F39}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SwiftClient.Test", "test\SwiftClient.Test\SwiftClient.Test.csproj", "{5985B113-1A1C-4EFD-B06C-341C4B9467E9}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "SwiftClient.Cli", "samples\SwiftClient.Cli\SwiftClient.Cli.xproj", "{BA84D7D5-C30D-4097-A4D3-7BA574DB13BF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SwiftClient.AspNetCore.Demo", "samples\SwiftClient.AspNetCore.Demo\SwiftClient.AspNetCore.Demo.csproj", "{B1D7D776-743F-4819-87F1-5DDFD3D26C07}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "SwiftClient.AspNetCore", "src\SwiftClient.AspNetCore\SwiftClient.AspNetCore.xproj", "{EF6AAD2D-F8C5-491D-87F2-7F24733163CF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SwiftClient.Cli", "samples\SwiftClient.Cli\SwiftClient.Cli.csproj", "{BA84D7D5-C30D-4097-A4D3-7BA574DB13BF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SwiftClient.AspNetCore", "src\SwiftClient.AspNetCore\SwiftClient.AspNetCore.csproj", "{EF6AAD2D-F8C5-491D-87F2-7F24733163CF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -35,17 +32,16 @@ Global
{C855AA03-FD6C-422F-99FA-4A0BFCB67F39}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C855AA03-FD6C-422F-99FA-4A0BFCB67F39}.Release|Any CPU.Build.0 = Release|Any CPU
{5985B113-1A1C-4EFD-B06C-341C4B9467E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5985B113-1A1C-4EFD-B06C-341C4B9467E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5985B113-1A1C-4EFD-B06C-341C4B9467E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5985B113-1A1C-4EFD-B06C-341C4B9467E9}.Release|Any CPU.Build.0 = Release|Any CPU
{B1D7D776-743F-4819-87F1-5DDFD3D26C07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B1D7D776-743F-4819-87F1-5DDFD3D26C07}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B1D7D776-743F-4819-87F1-5DDFD3D26C07}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B1D7D776-743F-4819-87F1-5DDFD3D26C07}.Release|Any CPU.Build.0 = Release|Any CPU
{BA84D7D5-C30D-4097-A4D3-7BA574DB13BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA84D7D5-C30D-4097-A4D3-7BA574DB13BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA84D7D5-C30D-4097-A4D3-7BA574DB13BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BA84D7D5-C30D-4097-A4D3-7BA574DB13BF}.Release|Any CPU.Build.0 = Release|Any CPU
{5985B113-1A1C-4EFD-B06C-341C4B9467E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5985B113-1A1C-4EFD-B06C-341C4B9467E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5985B113-1A1C-4EFD-B06C-341C4B9467E9}.Release|Any CPU.Build.0 = Release|Any CPU
{B1D7D776-743F-4819-87F1-5DDFD3D26C07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B1D7D776-743F-4819-87F1-5DDFD3D26C07}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B1D7D776-743F-4819-87F1-5DDFD3D26C07}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B1D7D776-743F-4819-87F1-5DDFD3D26C07}.Release|Any CPU.Build.0 = Release|Any CPU
{BA84D7D5-C30D-4097-A4D3-7BA574DB13BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA84D7D5-C30D-4097-A4D3-7BA574DB13BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA84D7D5-C30D-4097-A4D3-7BA574DB13BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF6AAD2D-F8C5-491D-87F2-7F24733163CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF6AAD2D-F8C5-491D-87F2-7F24733163CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF6AAD2D-F8C5-491D-87F2-7F24733163CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -57,8 +53,9 @@ Global
GlobalSection(NestedProjects) = preSolution
{C855AA03-FD6C-422F-99FA-4A0BFCB67F39} = {2260B1B4-9A09-425D-8A62-511C8AA95C78}
{5985B113-1A1C-4EFD-B06C-341C4B9467E9} = {D2397301-E397-40ED-8307-A9D94C7E687A}
{B1D7D776-743F-4819-87F1-5DDFD3D26C07} = {B791F94A-97EF-45EE-8E67-A43704F459B5}
{BA84D7D5-C30D-4097-A4D3-7BA574DB13BF} = {B791F94A-97EF-45EE-8E67-A43704F459B5}
{EF6AAD2D-F8C5-491D-87F2-7F24733163CF} = {2260B1B4-9A09-425D-8A62-511C8AA95C78}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1BEFDF8E-3F30-4DF5-A084-C622770C11BC}
EndGlobalSection
EndGlobal
6 changes: 0 additions & 6 deletions global.json

This file was deleted.

7 changes: 7 additions & 0 deletions push_client.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

cd src/SwiftClient; dotnet nuget push -k ${NUGET_KEY} -s ${NUGET_SERVER} $(ls -dt bin/Release/* | head -1)

exit 0
7 changes: 7 additions & 0 deletions push_service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

cd src/SwiftClient.AspNetCore; dotnet nuget push -k ${NUGET_KEY} -s ${NUGET_SERVER} $(ls -dt bin/Release/* | head -1)

exit 0
4 changes: 1 addition & 3 deletions samples/SwiftClient.AspNetCore.Demo/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddMvc();

services.Configure<SwiftServiceOptions>(Configuration.GetSection("SwiftCluster"));
services.AddSingleton<ISwiftLogger, SwiftServiceLogger>();
services.AddSingleton<ISwiftAuthManager, SwiftAuthManagerMemoryCache>();
services.AddTransient<ISwiftClient, SwiftService>();
services.AddSwift();
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>SwiftClient.AspNetCore.Demo</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>SwiftClient.AspNetCore.Demo</PackageId>
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback>
<TargetFrameworks>netstandard2.0;netcoreapp2.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<None Update="wwwroot\**\*;Views\**\*;Areas\**\Views">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\SwiftClient\SwiftClient.csproj" />
<ProjectReference Include="..\..\src\SwiftClient.AspNetCore\SwiftClient.AspNetCore.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.1.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.0.1" />
<PackageReference Include="BundlerMinifier.Core" Version="2.1.258" />
</ItemGroup>

<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Exec Command="bower install" />
<Exec Command="dotnet bundle" />
</Target>

<ItemGroup>
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.2.301" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
</Project>

This file was deleted.

68 changes: 0 additions & 68 deletions samples/SwiftClient.AspNetCore.Demo/project.json

This file was deleted.

38 changes: 38 additions & 0 deletions samples/SwiftClient.Cli/SwiftClient.Cli.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>SwiftClient Command-line interface</Description>
<Authors>Stefan Prodan</Authors>
<AssemblyName>SwiftClient.Cli</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>SwiftClient.Cli</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\SwiftClient\SwiftClient.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="CommandLineParser" Version="2.0.275-beta" />
<PackageReference Include="Humanizer" Version="2.2.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>

</Project>
21 changes: 0 additions & 21 deletions samples/SwiftClient.Cli/SwiftClient.Cli.xproj

This file was deleted.

20 changes: 0 additions & 20 deletions samples/SwiftClient.Cli/project.json

This file was deleted.

Loading

0 comments on commit c611158

Please sign in to comment.