Skip to content

Commit

Permalink
Merge branch 'release/v1.22'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric L. Charlier committed Feb 4, 2020
2 parents 33f2661 + d3915b4 commit d87125f
Show file tree
Hide file tree
Showing 386 changed files with 8,616 additions and 2,646 deletions.
10 changes: 9 additions & 1 deletion .packages/NBi.Extensibility/NBi.Extensibility.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@
<owners>Seddryck</owners>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/Seddryck/NBi</projectUrl>
<icon>images\logo-2x.png</icon>
<iconUrl>https://raw.githubusercontent.com/Seddryck/nbi/gh-pages/img/logo-2x.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>Extensibility points of NBi.</summary>
<description>This package contains the interfaces to implement to extend NBi features. Testing framework (add-on to NUnit) for Business Intelligence. It supports the Microsoft Data platform (SQL Server Database engine, SSIS, SSAS, SSRS) but also MySQL, PostgreSQL and other solutions.</description>
<description>This package contains the interfaces to implement to extend NBi features. NBi is a testing framework (add-on to NUnit) for Business Intelligence and Data Quality. It supports the Microsoft Data platform (SQL Server Database engine, SSIS, SSAS, SSRS) but also MySQL, PostgreSQL and other NoSQL solutions.</description>
<releaseNotes>Check the release notes at https://github.com/Seddryck/NBi/releases/v$version$</releaseNotes>
<copyright>Copyright 2013-$thisYear$</copyright>
<tags>Test NBi SQL SSAS SSIS SSRS</tags>
<repository type="git" url="https://github.com/Seddryck/NBi.git"></repository>
<dependencies>
<group targetFramework=".NETFramework4.6.1" />
</dependencies>
</metadata>
<files>
<file src="..\..\logo-2x.png" target="images\" />
<file src="lib\**\*.*" target="lib\" />
</files>
</package>
11 changes: 8 additions & 3 deletions .packages/NBi.Framework.Tools/NBi.Framework.Tools.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,21 @@
<owners>Seddryck</owners>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/Seddryck/NBi</projectUrl>
<icon>images\logo-2x.png</icon>
<iconUrl>https://raw.githubusercontent.com/Seddryck/nbi/gh-pages/img/logo-2x.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>This package contains the NBi framework and copy it to the tools folder. This package is not intended to be directly used by end-users. Check the package NBi.VisualStudio, if you want to facilitate the usage of NBi from Visual Studio</summary>
<description>This package contains the NBi framework and copy it to the tools folder. This package is not intended to be directly used by end-users. Check the package NBi.VisualStudio, if you want to facilitate the usage of NBi from Visual StudioTesting framework (add-on to NUnit) for Business Intelligence. It supports the Microsoft Data platform (SQL Server Database engine, SSIS, SSAS, SSRS) but also MySQL, PostgreSQL and other solutions.</description>
<summary>This package contains the NBi framework and copy it to the tools folder. This package is not intended to be directly used by end-users willing to create test-suites. Check the package NBi.VisualStudio, if you want to facilitate the usage of NBi from Visual Studio.</summary>
<description>This package contains the NBi framework and references each dll to your project. This package is not intended to be directly used by end-users willing to create test-suites. Check the package NBi.VisualStudio, if you want to facilitate the usage of NBi from Visual Studio. NBi is a testing framework (add-on to NUnit) for Business Intelligence and Data Quality. It supports the Microsoft Data platform (SQL Server Database engine, SSIS, SSAS, SSRS) but also MySQL, PostgreSQL and other NoSQL solutions.</description>
<releaseNotes>Check the release notes at https://github.com/Seddryck/NBi/releases/v$version$</releaseNotes>
<copyright>Copyright 2013-$thisYear$</copyright>
<tags>Test NBi SQL SSAS SSIS SSRS</tags>
<repository type="git" url="https://github.com/Seddryck/NBi.git"></repository>
<repository type="git" url="https://github.com/Seddryck/NBi.git" />
<dependencies>
$depList$
</dependencies>
</metadata>
<files>
<file src="..\..\logo-2x.png" target="images\" />
<file src="tools\*.*" target="tools\" />
</files>
</package>
15 changes: 11 additions & 4 deletions .packages/NBi.Framework/NBi.Framework.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,23 @@
<owners>Seddryck</owners>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/Seddryck/NBi</projectUrl>
<icon>images\logo-2x.png</icon>
<iconUrl>https://raw.githubusercontent.com/Seddryck/nbi/gh-pages/img/logo-2x.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>This package contains the NBi framework and references all the dll to your project. This package is not intended to be directly used by end-users. Check the package NBi.VisualStudio, if you want to facilitate the usage of NBi from Visual Studio</summary>
<description>This package contains the NBi framework and references each dll to your project. This package is not intended to be directly used by end-users willing to create test-suites. Check the package NBi.VisualStudio, if you want to facilitate the usage of NBi from Visual StudioTesting framework (add-on to NUnit) for Business Intelligence. It supports the Microsoft Data platform (SQL Server Database engine, SSIS, SSAS, SSRS) but also MySQL, PostgreSQL and other solutions.</description>
<summary>This package contains the NBi framework and references each dll to your project. This package is not intended to be directly used by end-users willing to create test-suites. Check the package NBi.VisualStudio, if you want to facilitate the usage of NBi from Visual Studio.</summary>
<description>This package contains the NBi framework and references each dll to your project. This package is not intended to be directly used by end-users willing to create test-suites. Check the package NBi.VisualStudio, if you want to facilitate the usage of NBi from Visual Studio. NBi is a testing framework (add-on to NUnit) for Business Intelligence and Data Quality. It supports the Microsoft Data platform (SQL Server Database engine, SSIS, SSAS, SSRS) but also MySQL, PostgreSQL and other NoSQL solutions.</description>
<releaseNotes>Check the release notes at https://github.com/Seddryck/NBi/releases/v$version$</releaseNotes>
<copyright>Copyright 2013-$thisYear$</copyright>
<tags>Test NBi SQL SSAS SSIS SSRS </tags>
<repository type="git" url="https://github.com/Seddryck/NBi.git"></repository>
<repository type="git" url="https://github.com/Seddryck/NBi.git" />
<dependencies>
$depList$
<group targetFramework=".NETFramework4.6.1">
$depList$
</group>
</dependencies>
</metadata>
<files>
<file src="..\..\logo-2x.png" target="images\" />
<file src="lib\**\*.*" target="lib\" />
</files>
</package>
35 changes: 30 additions & 5 deletions .packages/package-NBi.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ $depList = $dependencies.Values -join [Environment]::NewLine + "`t`t"
$thisYear = get-date -Format yyyy
Write-Host "Setting copyright until $thisYear"

$nugetVersion = (((nuget help | select -First 1).Split(':')) | select -Last 1).Trim()
Write-Host "Nuget's version: $nugetVersion"
if ($nugetVersion -lt '5.3')
{
$xpath = ('/package/metadata/icon')
}
else
{
$xpath = ('/package/metadata/iconUrl')
}

#For NBi.Framework (dll)
Write-Host "Packaging NBi.Framework"
$lib = "$root\NBi.Framework\lib\net461\"
Expand All @@ -47,18 +58,22 @@ Copy-Item $root\..\NBi.Testing\bin\Debug\NBi.Testing.dll $lib

Write-Host "Setting .nuspec version tag to $version"



$content = (Get-Content $root\NBi.Framework\NBi.Framework.nuspec -Encoding UTF8)
$content = $content -replace '\$version\$',$version
$content = $content -replace '\$thisYear\$',$thisYear
$content = $content -replace '\$depList\$',$depList

$content | Out-File $root\NBi.Framework\NBi.Framework.compiled.nuspec -Encoding UTF8
$xml = New-Object -TypeName System.Xml.XmlDocument
$xml.LoadXml($content)
$iconNode = $xml.SelectSingleNode($xpath)
$iconNode.ParentNode.RemoveChild($iconNode)

$xml.OuterXml | Out-File $root\NBi.Framework\NBi.Framework.compiled.nuspec -Encoding UTF8

& NuGet.exe pack $root\..\.packages\NBi.Framework\NBi.Framework.compiled.nuspec -Version $version -OutputDirectory $root\..\.nupkg
Write-Host "Package for NBi.Framework is ready"


#For NBi.Framework.Tools
Write-Host "Packaging NBi.Framework.Tools"
$lib = "$root\NBi.Framework.Tools\tools\"
Expand All @@ -77,7 +92,12 @@ $content = $content -replace '\$version\$',$version
$content = $content -replace '\$thisYear\$',$thisYear
$content = $content -replace '\$depList\$',$depList

$content | Out-File $root\NBi.Framework.Tools\NBi.Framework.Tools.compiled.nuspec -Encoding UTF8
$xml = New-Object -TypeName System.Xml.XmlDocument
$xml.LoadXml($content)
$iconNode = $xml.SelectSingleNode($xpath)
$iconNode.ParentNode.RemoveChild($iconNode)

$xml.OuterXml | Out-File $root\NBi.Framework.Tools\NBi.Framework.Tools.compiled.nuspec -Encoding UTF8

& NuGet.exe pack $root\..\.packages\NBi.Framework.Tools\NBi.Framework.Tools.compiled.nuspec -Version $version -OutputDirectory $root\..\.nupkg
Write-Host "Package for NBi.Framework.Tools is ready"
Expand All @@ -99,7 +119,12 @@ $content = (Get-Content $root\NBi.Extensibility\NBi.Extensibility.nuspec -Encodi
$content = $content -replace '\$version\$',$version
$content = $content -replace '\$thisYear\$',$thisYear

$content | Out-File $root\NBi.Extensibility\NBi.Extensibility.compiled.nuspec -Encoding UTF8
$xml = New-Object -TypeName System.Xml.XmlDocument
$xml.LoadXml($content)
$iconNode = $xml.SelectSingleNode($xpath)
$iconNode.ParentNode.RemoveChild($iconNode)

$xml.OuterXml | Out-File $root\NBi.Extensibility\NBi.Extensibility.compiled.nuspec -Encoding UTF8

& NuGet.exe pack $root\..\.packages\NBi.Extensibility\NBi.Extensibility.compiled.nuspec -Version $version -OutputDirectory $root\..\.nupkg
Write-Host "Package for NBi.Extensibility is ready"
Binary file removed NBi-logo-white.jpg
Binary file not shown.
14 changes: 14 additions & 0 deletions NBi.Core/Api/Authentication/Anonymous.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RestSharp.Authenticators;

namespace NBi.Core.Api.Authentication
{
public class Anonymous : IAuthentication
{
public IAuthenticator GetAuthenticator() => null;
}
}
39 changes: 39 additions & 0 deletions NBi.Core/Api/Authentication/ApiKey.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using NBi.Core.Scalar.Resolver;
using RestSharp;
using RestSharp.Authenticators;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NBi.Core.Api.Authentication
{
public class ApiKey : IAuthentication
{
public IScalarResolver<string> Name { get; }
public IScalarResolver<string> Value { get; }

public ApiKey(IScalarResolver<string> name, IScalarResolver<string> value)
=> (Name, Value) = (name, value);

public ApiKey(IScalarResolver<string> value)
: this(new LiteralScalarResolver<string>("apiKey"), value) { }

public IAuthenticator GetAuthenticator() => new ApiKeyAuthenticator(Name.Execute(), Value.Execute());

public class ApiKeyAuthenticator : IAuthenticator
{
public string Name { get; }
public string Value { get; }

public ApiKeyAuthenticator(string name, string value)
=> (Name, Value) = (name, value);

public void Authenticate(IRestClient client, IRestRequest request)
{
request.AddHeader(Name, Value);
}
}
}
}
22 changes: 22 additions & 0 deletions NBi.Core/Api/Authentication/HttpBasic.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using NBi.Core.Scalar.Resolver;
using RestSharp.Authenticators;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NBi.Core.Api.Authentication
{
public class HttpBasic : IAuthentication
{
public IScalarResolver<string> Username { get; }
public IScalarResolver<string> Password { get; }

public HttpBasic(IScalarResolver<string> username, IScalarResolver<string> password)
=> (Username, Password) = (username, password);

public IAuthenticator GetAuthenticator() => new HttpBasicAuthenticator(Username.Execute(), Password.Execute());
}

}
14 changes: 14 additions & 0 deletions NBi.Core/Api/Authentication/IAuthentication.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using RestSharp.Authenticators;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NBi.Core.Api.Authentication
{
public interface IAuthentication
{
IAuthenticator GetAuthenticator();
}
}
19 changes: 19 additions & 0 deletions NBi.Core/Api/Authentication/NtlmCurrentUser.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using NBi.Core.Scalar.Resolver;
using RestSharp.Authenticators;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NBi.Core.Api.Authentication
{
public class NtlmCurrentUser : IAuthentication
{
public NtlmCurrentUser()
{ }

public IAuthenticator GetAuthenticator() => new NtlmAuthenticator();
}

}
22 changes: 22 additions & 0 deletions NBi.Core/Api/Authentication/NtlmUserPassword.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using NBi.Core.Scalar.Resolver;
using RestSharp.Authenticators;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NBi.Core.Api.Authentication
{
public class NtlmUserPassword : IAuthentication
{
public IScalarResolver<string> Username { get; }
public IScalarResolver<string> Password { get; }

public NtlmUserPassword(IScalarResolver<string> username, IScalarResolver<string> password)
=> (Username, Password) = (username, password);

public IAuthenticator GetAuthenticator() => new NtlmAuthenticator(Username.Execute(), Password.Execute());
}

}
24 changes: 24 additions & 0 deletions NBi.Core/Api/Authentication/OAuth2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using NBi.Core.Scalar.Resolver;
using RestSharp.Authenticators;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NBi.Core.Api.Authentication
{
public class OAuth2 : IAuthentication
{
public IScalarResolver<string> AccessToken { get; }
public IScalarResolver<string> TokenType { get; }

public OAuth2(IScalarResolver<string> accessToken, IScalarResolver<string> tokenType)
=> (AccessToken, TokenType) = (accessToken, tokenType);

public OAuth2(IScalarResolver<string> accessToken)
: this(accessToken, new LiteralScalarResolver<string>("OAuth")) { }

public IAuthenticator GetAuthenticator() => new OAuth2AuthorizationRequestHeaderAuthenticator(AccessToken.Execute(), TokenType.Execute());
}
}
18 changes: 18 additions & 0 deletions NBi.Core/Api/Rest/HeaderRest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using NBi.Core.Scalar.Resolver;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NBi.Core.Api.Rest
{
public class HeaderRest
{
public IScalarResolver<string> Name { get; }
public IScalarResolver<string> Value { get; }

public HeaderRest(IScalarResolver<string> name, IScalarResolver<string> value)
=> (Name, Value) = (name, value);
}
}
18 changes: 18 additions & 0 deletions NBi.Core/Api/Rest/ParameterRest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using NBi.Core.Scalar.Resolver;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NBi.Core.Api.Rest
{
public class ParameterRest
{
public IScalarResolver<string> Name { get; }
public IScalarResolver<string> Value { get; }

public ParameterRest(IScalarResolver<string> name, IScalarResolver<string> value)
=> (Name, Value) = (name, value);
}
}
Loading

0 comments on commit d87125f

Please sign in to comment.