Skip to content

Commit

Permalink
✨ Organize sources into Blockmason.Link namespace
Browse files Browse the repository at this point in the history
Also add CircleCI configuration
  • Loading branch information
canterberry committed May 29, 2019
1 parent 630d11e commit 0e5456a
Show file tree
Hide file tree
Showing 14 changed files with 79 additions and 50 deletions.
65 changes: 65 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
version: 2

defaults: &defaults
working_directory: "/opt/dotnet/project"
docker:
- image: blockmason/dotnet:2.2

workflows:
version: 2
default:
jobs:
- build-sources:
requires:
- initialize
- build-tests:
requires:
- build-sources
- initialize
- test:
requires:
- build-tests

jobs:
initialize:
<<: *defaults
steps:
- checkout
- persist_to_workspace:
root: /opt/dotnet
paths:
- project
build-sources:
<<: *defaults
steps:
- attach_workspace:
at: /opt/dotnet
- run:
name: Building sources
command: dotnet publish --configuration Release Link/Link.csproj
- persist_to_workspace:
root: /opt/dotnet
paths:
- project/Link/obj
- project/Link/bin
build-tests:
<<: *defaults
steps:
- attach_workspace:
at: /opt/dotnet
- run:
name: Building tests
command: dotnet publish --configuration Release Link.Tests/Link.Tests.csproj
- persist_to_workspace:
root: /opt/dotnet
paths:
- project/Link.Tests/obj
- project/Link.Tests/bin
test:
<<: *defaults
steps:
- attach_workspace:
at: /opt/dotnet
- run:
name: Testing
command: dotnet test --configuration Release Link.Tests/Link.Tests.csproj
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Link\Link.csproj" />
<ProjectReference Include="..\Blockmason.Link\Blockmason.Link.csproj"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Xunit;
using Link;
using Blockmason.Link;
using System.Collections.Generic;

namespace Link.UnitTests {
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions Blockmason.Link/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Generated by `dotnet build`
/bin/

# Generated by `dotnet build`
/obj/
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Newtonsoft.Json;

namespace Link.OAuth2 {
namespace Blockmason.Link.OAuth2 {
public class Credential {
public class Contract {
public string access_token;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using System;

namespace Link.OAuth2.Grant {
namespace Blockmason.Link.OAuth2.Grant {
public class ClientCredentialsGrant {
public class Contract {
public string client_id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using System;

namespace Link.OAuth2.Grant {
namespace Blockmason.Link.OAuth2.Grant {
public class RefreshTokenGrant {
public class Contract {
public string grant_type;
Expand Down
4 changes: 2 additions & 2 deletions Link/OAuth2/Session.cs → Blockmason.Link/OAuth2/Session.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Link.OAuth2.Grant;
using Blockmason.Link.OAuth2.Grant;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
Expand All @@ -9,7 +9,7 @@
using System.Text;
using System.Threading.Tasks;

namespace Link.OAuth2 {
namespace Blockmason.Link.OAuth2 {
public class Session {
public const string DEFAULT_BASE_URL = "https://api.block.mason.link";

Expand Down
4 changes: 2 additions & 2 deletions Link/Project.cs → Blockmason.Link/Project.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Link.OAuth2;
using Blockmason.Link.OAuth2;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
Expand All @@ -7,7 +7,7 @@
using System.Text;
using System.Threading.Tasks;

namespace Link {
namespace Blockmason.Link {
public class Project {
public static async Task<Project> Create(string clientId, string clientSecret) {
Session session = await Session.Create(clientId, clientSecret);
Expand Down
32 changes: 0 additions & 32 deletions Dockerfile

This file was deleted.

9 changes: 0 additions & 9 deletions Makefile

This file was deleted.

0 comments on commit 0e5456a

Please sign in to comment.