Skip to content

Commit

Permalink
New: Upgrade to Redis 5.0 and .NETCore 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rzander committed Oct 24, 2018
1 parent 9e52310 commit 5c8b83d
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 471 deletions.
2 changes: 1 addition & 1 deletion examples/Windows Inventory/inventory.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ getinv -Name "Printer" -WMIClass "Win32_Printer" -Properties @("DeviceID","Capab
$user = Get-LocalUser | Select-Object Description, Enabled, UserMayChangePassword, PasswordRequired, Name, @{N = '@PasswordLastSet'; E = {[System.DateTime](($_.PasswordLastSet).ToUniversalTime())}}, @{N = 'id'; E = {$_.SID}} | Sort-Object -Property Name
$object | Add-Member -MemberType NoteProperty -Name "LocalUsers" -Value ($user)

$locAdmin = Get-LocalGroupMember -SID S-1-5-32-544 | Select-Object @{N = 'Name'; E = {$_.Name.Replace($($env:Computername) + "\", "")}}, PrincipalSource, ObjectClass | Sort-Object -Property Name
$locAdmin = Get-LocalGroupMember -SID S-1-5-32-544 | Select-Object @{N = 'Name'; E = {$_.Name.Replace($($env:Computername) + "\", "")}}, ObjectClass, @{Name = 'id'; Expression = {$_.SID.Value}} | Sort-Object -Property Name
$object | Add-Member -MemberType NoteProperty -Name "LocalAdmins" -Value ($locAdmin)

$locGroup = Get-LocalGroup | Select-Object Description, Name, PrincipalSource, ObjectClass, @{N = 'id'; E = {$_.SID}} | Sort-Object -Property Name
Expand Down
4 changes: 2 additions & 2 deletions source/JainDBTest/JainDBTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>

<IsPackable>false</IsPackable>

Expand All @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.3.2" />
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion source/JainDBTest/UnitTest1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void Test_Query()
{
Console.WriteLine("Query data...");
jDB.UseFileStore = true;
int i = jDB.Query("obj1", "", "").Count();
int i = jDB.QueryAsync("obj1", "", "", "").Result.Count();
Assert.IsTrue(i > 0);
}

Expand Down
2 changes: 1 addition & 1 deletion source/jaindb/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public JArray Query()
//string sUri = Microsoft.AspNetCore.Http.Extensions.UriHelper.GetDisplayUrl(Request);
var query = QueryHelpers.ParseQuery(sQuery);

return jDB.Query(string.Join(";", query.Where(t => string.IsNullOrEmpty(t.Value)).Select(t => t.Key).ToList()), query.FirstOrDefault(t => t.Key.ToLower() == "$select").Value, query.FirstOrDefault(t => t.Key.ToLower() == "$exclude").Value, query.FirstOrDefault(t => t.Key.ToLower() == "$where").Value);
return jDB.QueryAsync(string.Join(";", query.Where(t => string.IsNullOrEmpty(t.Value)).Select(t => t.Key).ToList()), query.FirstOrDefault(t => t.Key.ToLower() == "$select").Value, query.FirstOrDefault(t => t.Key.ToLower() == "$exclude").Value, query.FirstOrDefault(t => t.Key.ToLower() == "$where").Value).Result;
}
return null;
}
Expand Down
6 changes: 3 additions & 3 deletions source/jaindb/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM microsoft/aspnetcore
FROM microsoft/dotnet:2.1-aspnetcore-runtime
ARG source
WORKDIR /app
EXPOSE 5000:5000/tcp
Expand All @@ -13,7 +13,7 @@ RUN rm -f -r /app/wwwroot/bin
#RUN apt-get install -y make gcc wget
#RUN apt-get install -y --no-install-recommends ca-certificates
#RUN mkdir -p /app/wwwroot/redis
#RUN wget -O redis.tar.gz http://download.redis.io/releases/redis-4.0.11.tar.gz
#RUN wget -O redis.tar.gz http://download.redis.io/releases/redis-5.0.0.tar.gz
#RUN tar -xzf redis.tar.gz -C /app/wwwroot/redis --strip-components=1

#RUN grep -q '^#define CONFIG_DEFAULT_PROTECTED_MODE 1$' /app/wwwroot/redis/src/server.h
Expand All @@ -31,7 +31,7 @@ RUN rm -f -r /app/wwwroot/bin
#RUN cp /app/wwwroot/redis/src/redis-cli /app/wwwroot/bin
#RUN cp /app/wwwroot/redis/src/redis-sentinel /app/wwwroot/bin
#RUN cp /app/wwwroot/redis/src/redis-server /app/wwwroot/bin
#RUN rm -r /app/wwwroot/redis
##RUN rm -r /app/wwwroot/redis


ENV localURL "http://localhost"
Expand Down
Binary file added source/jaindb/JainDB_Logo.ico
Binary file not shown.
545 changes: 92 additions & 453 deletions source/jaindb/jaindb.cs

Large diffs are not rendered by default.

21 changes: 11 additions & 10 deletions source/jaindb/jaindb.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
<AssemblyName>jaindb</AssemblyName>
<SignAssembly>false</SignAssembly>
Expand All @@ -12,11 +12,12 @@
<PackageProjectUrl>https://github.com/rzander/jaindb</PackageProjectUrl>
<RepositoryUrl>https://github.com/rzander/jaindb</RepositoryUrl>
<PackageTags>blockchain json</PackageTags>
<Version>1.0.0</Version>
<AssemblyVersion>1.0.0.75</AssemblyVersion>
<FileVersion>1.0.0.75</FileVersion>
<StartupObject>jaindb.Program</StartupObject>
<Version>1.0.1</Version>
<AssemblyVersion>1.0.1.76</AssemblyVersion>
<FileVersion>1.0.1.76</FileVersion>
<StartupObject></StartupObject>
<UserSecretsId>fcfd6c0a-e53c-46cb-8a9d-b786c0579861</UserSecretsId>
<ApplicationIcon>JainDB_Logo.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -55,21 +56,21 @@

<ItemGroup>
<PackageReference Include="JsonDiffPatch.Net" Version="2.1.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.4.1" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.3" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.5.1" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.4" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" />
<PackageReference Include="Microsoft.AspNetCore.ResponseCompression" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Server.HttpSys" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.1.1" />
<PackageReference Include="Microsoft.Azure.DocumentDB.Core" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.DocumentDB.Core" Version="2.1.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.1.1" />
<PackageReference Include="Microsoft.OData.Core" Version="7.5.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.1.1" />
<PackageReference Include="Moon.AspNetCore.Authentication.Basic" Version="4.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="RethinkDb.Driver" Version="2.3.23" />
<PackageReference Include="StackExchange.Redis" Version="2.0.505" />
<PackageReference Include="StackExchange.Redis" Version="2.0.513" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 5c8b83d

Please sign in to comment.