Skip to content

Commit 3b37d8b

Browse files
committed
prepare first release
1 parent 594c407 commit 3b37d8b

File tree

8 files changed

+120
-82
lines changed

8 files changed

+120
-82
lines changed

.idea/.idea.JsonApiDotNetCore.MongoDb/.idea/workspace.xml

Lines changed: 13 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.travis.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@ dotnet: 3.1.100
44
solution: JsonApiDotNetCore.MongoDb.sln
55
services:
66
- mongodb
7-
before_script:
8-
- sleep 15
97
script:
108
- dotnet restore
119
- dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=./coverage/lcov-coverage
1210
after_success:
1311
- bash <(curl -s https://codecov.io/bash)
12+
before_deploy:
13+
- dotnet build -c Release
14+
- dotnet pack -c Release
15+
deploy:
16+
skip_cleanup: true
17+
provider: script
18+
script: dotnet nuget push ./src/JsonApiDotNetCore.MongoDb/bin/Release/JsonApiDotNetCore.MongoDb.*.nupkg -k $NUGET_API -s https://api.nuget.org/v3/index.json
19+
on:
20+
branch: master

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
Copyright (c) 2020 Alvaro Nicoli
3+
4+
Permission is hereby granted, free of charge, to any person
5+
obtaining a copy of this software and associated documentation
6+
files (the "Software"), to deal in the Software without restriction,
7+
including without limitation the rights to use, copy, modify, merge,
8+
publish, distribute, sublicense, and/or sell copies of the Software,
9+
and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included
13+
in all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
21+
USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
# JsonApiDotNetCore MongoDB Repository
22

3+
[![NuGet version][nuget-image]][nuget-url]
4+
[![Downloads][downloads-image]][nuget-url]
35
[![Build Status](https://travis-ci.com/mrnkr/JsonApiDotNetCore.MongoDb.svg?branch=master)](https://travis-ci.com/mrnkr/JsonApiDotNetCore.MongoDb)
46
[![codecov](https://codecov.io/gh/mrnkr/JsonApiDotNetCore.MongoDb/branch/master/graph/badge.svg)](https://codecov.io/gh/mrnkr/JsonApiDotNetCore.MongoDb)
7+
[![license][license]](https://github.com/mrnkr/JsonApiDotNetCore.MongoDb/blob/master/LICENSE)
8+
9+
[nuget-image]:https://img.shields.io/nuget/v/JsonApiDotNetCore.MongoDb
10+
[nuget-url]:https://www.nuget.org/packages/JsonApiDotNetCore.MongoDb
11+
[downloads-image]:https://img.shields.io/nuget/dt/JsonApiDotNetCore.MongoDb
12+
[license]:https://img.shields.io/github/license/mrnkr/JsonApiDotNetCore.MongoDb
513

614
Plug-n-play implementation of `IResourceRepository<TResource, TId>` allowing you to use MongoDb with your `JsonApiDotNetCore` APIs.
715

src/JsonApiDotNetCore.MongoDb/JsonApiDotNetCore.MongoDb.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<VersionPrefix>4.0.0</VersionPrefix>
4+
<VersionPrefix>4.0.0-beta1</VersionPrefix>
55
<TargetFramework>$(NetCoreAppVersion)</TargetFramework>
66
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
77
</PropertyGroup>
88

99
<PropertyGroup>
1010
<PackageTags>jsonapi;json:api;dotnet;core;mongodb</PackageTags>
1111
<Description>Persistence layer implementation for use of mongodb in applications using JsonApiDotNetCore</Description>
12-
<PackageProjectUrl>https://github.com/json-api-dotnet/JsonApiDotNetCore.MongoDb</PackageProjectUrl>
12+
<PackageProjectUrl>https://github.com/mrnkr/JsonApiDotNetCore.MongoDb</PackageProjectUrl>
1313
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1414
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
1515
<PublishRepositoryUrl>true</PublishRepositoryUrl>

src/JsonApiDotNetCore.MongoDb/Queries/Internal/QueryableBuilding/QueryableBuilder.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ public QueryableBuilder(Expression source, Type elementType, Type extensionType,
3636

3737
public Expression ApplyQuery(QueryLayer layer)
3838
{
39-
layer = layer ?? throw new ArgumentNullException(nameof(layer));
40-
41-
Expression expression = _source;
39+
var expression = _source;
4240

4341
if (layer.Filter != null)
4442
{

test/JsonApiDotNetCore.MongoDb.Example.Tests/coverage/lcov-coverage.info

Lines changed: 42 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -82,49 +82,46 @@ FNDA:26,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Int
8282
DA:38,26
8383
DA:39,26
8484
DA:41,26
85-
DA:43,26
85+
DA:42,14
86+
DA:43,14
8687
DA:44,14
87-
DA:45,14
88-
DA:46,14
89-
DA:48,26
88+
DA:46,26
89+
DA:47,12
90+
DA:48,12
9091
DA:49,12
91-
DA:50,12
92-
DA:51,12
93-
DA:53,26
92+
DA:51,26
93+
DA:52,12
94+
DA:53,12
9495
DA:54,12
95-
DA:55,12
96-
DA:56,12
97-
DA:58,26
98-
DA:59,26
99-
BRDA:39,3,0,0
100-
BRDA:39,3,1,26
101-
BRDA:43,37,0,14
102-
BRDA:43,37,1,26
103-
BRDA:48,66,0,12
104-
BRDA:48,66,1,26
105-
BRDA:53,95,0,12
106-
BRDA:53,95,1,26
107-
FN:61,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplyFilter(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.FilterExpression)
96+
DA:56,26
97+
DA:57,26
98+
BRDA:41,19,0,14
99+
BRDA:41,19,1,26
100+
BRDA:46,48,0,12
101+
BRDA:46,48,1,26
102+
BRDA:51,77,0,12
103+
BRDA:51,77,1,26
104+
FN:59,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplyFilter(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.FilterExpression)
108105
FNDA:14,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplyFilter(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.FilterExpression)
109-
DA:62,14
106+
DA:60,14
107+
DA:61,14
110108
DA:63,14
109+
DA:64,14
111110
DA:65,14
112-
DA:66,14
113-
DA:67,14
114-
FN:69,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplySort(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.SortExpression)
111+
FN:67,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplySort(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.SortExpression)
115112
FNDA:12,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplySort(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.SortExpression)
116-
DA:70,12
113+
DA:68,12
114+
DA:69,12
117115
DA:71,12
116+
DA:72,12
118117
DA:73,12
119-
DA:74,12
120-
DA:75,12
121-
FN:77,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplyPagination(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.PaginationExpression)
118+
FN:75,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplyPagination(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.PaginationExpression)
122119
FNDA:12,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplyPagination(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.PaginationExpression)
123-
DA:78,12
120+
DA:76,12
121+
DA:77,12
124122
DA:79,12
123+
DA:80,12
125124
DA:81,12
126-
DA:82,12
127-
DA:83,12
128125
FN:23,System.Void JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::.ctor(System.Linq.Expressions.Expression,System.Type,System.Type,JsonApiDotNetCore.Queries.Internal.QueryableBuilding.LambdaParameterNameFactory,JsonApiDotNetCore.Resources.IResourceFactory,JsonApiDotNetCore.Configuration.IResourceContextProvider,JsonApiDotNetCore.Queries.Internal.QueryableBuilding.LambdaScopeFactory)
129126
FNDA:26,System.Void JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::.ctor(System.Linq.Expressions.Expression,System.Type,System.Type,JsonApiDotNetCore.Queries.Internal.QueryableBuilding.LambdaParameterNameFactory,JsonApiDotNetCore.Resources.IResourceFactory,JsonApiDotNetCore.Configuration.IResourceContextProvider,JsonApiDotNetCore.Queries.Internal.QueryableBuilding.LambdaScopeFactory)
130127
DA:24,26
@@ -153,10 +150,10 @@ BRDA:33,124,0,0
153150
BRDA:33,124,1,26
154151
BRDA:34,147,0,26
155152
BRDA:34,147,1,26
156-
LF:44
157-
LH:44
158-
BRF:22
159-
BRH:15
153+
LF:43
154+
LH:43
155+
BRF:20
156+
BRH:14
160157
FNF:5
161158
FNH:5
162159
end_of_record
@@ -245,20 +242,20 @@ FNH:3
245242
end_of_record
246243
SF:/Users/mrnkr/Documents/code/JsonApiDotNetCore.MongoDb/src/Example/Models/Book.cs
247244
FN:12,System.String Example.Models.Book::get_Id()
248-
FNDA:1470,System.String Example.Models.Book::get_Id()
249-
DA:13,1470
245+
FNDA:1481,System.String Example.Models.Book::get_Id()
246+
DA:13,1481
250247
FN:15,System.String Example.Models.Book::get_Name()
251-
FNDA:936,System.String Example.Models.Book::get_Name()
252-
DA:16,936
248+
FNDA:942,System.String Example.Models.Book::get_Name()
249+
DA:16,942
253250
FN:19,System.Decimal Example.Models.Book::get_Price()
254-
FNDA:1184,System.Decimal Example.Models.Book::get_Price()
255-
DA:20,1184
251+
FNDA:1187,System.Decimal Example.Models.Book::get_Price()
252+
DA:20,1187
256253
FN:22,System.String Example.Models.Book::get_Category()
257-
FNDA:906,System.String Example.Models.Book::get_Category()
258-
DA:23,906
254+
FNDA:912,System.String Example.Models.Book::get_Category()
255+
DA:23,912
259256
FN:25,System.String Example.Models.Book::get_Author()
260-
FNDA:906,System.String Example.Models.Book::get_Author()
261-
DA:26,906
257+
FNDA:912,System.String Example.Models.Book::get_Author()
258+
DA:26,912
262259
FN:28,System.String Example.Models.Book::get_StringId()
263260
FNDA:0,System.String Example.Models.Book::get_StringId()
264261
DA:29,0

test/JsonApiDotNetCore.MongoDb.IntegrationTests/coverage/lcov-coverage.info

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -82,49 +82,46 @@ FNDA:0,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Inte
8282
DA:38,0
8383
DA:39,0
8484
DA:41,0
85+
DA:42,0
8586
DA:43,0
8687
DA:44,0
87-
DA:45,0
8888
DA:46,0
89+
DA:47,0
8990
DA:48,0
9091
DA:49,0
91-
DA:50,0
9292
DA:51,0
93+
DA:52,0
9394
DA:53,0
9495
DA:54,0
95-
DA:55,0
9696
DA:56,0
97-
DA:58,0
98-
DA:59,0
99-
BRDA:39,3,0,0
100-
BRDA:39,3,1,0
101-
BRDA:43,37,0,0
102-
BRDA:43,37,1,0
103-
BRDA:48,66,0,0
104-
BRDA:48,66,1,0
105-
BRDA:53,95,0,0
106-
BRDA:53,95,1,0
107-
FN:61,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplyFilter(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.FilterExpression)
97+
DA:57,0
98+
BRDA:41,19,0,0
99+
BRDA:41,19,1,0
100+
BRDA:46,48,0,0
101+
BRDA:46,48,1,0
102+
BRDA:51,77,0,0
103+
BRDA:51,77,1,0
104+
FN:59,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplyFilter(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.FilterExpression)
108105
FNDA:0,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplyFilter(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.FilterExpression)
109-
DA:62,0
106+
DA:60,0
107+
DA:61,0
110108
DA:63,0
109+
DA:64,0
111110
DA:65,0
112-
DA:66,0
113-
DA:67,0
114-
FN:69,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplySort(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.SortExpression)
111+
FN:67,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplySort(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.SortExpression)
115112
FNDA:0,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplySort(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.SortExpression)
116-
DA:70,0
113+
DA:68,0
114+
DA:69,0
117115
DA:71,0
116+
DA:72,0
118117
DA:73,0
119-
DA:74,0
120-
DA:75,0
121-
FN:77,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplyPagination(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.PaginationExpression)
118+
FN:75,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplyPagination(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.PaginationExpression)
122119
FNDA:0,System.Linq.Expressions.Expression JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::ApplyPagination(System.Linq.Expressions.Expression,JsonApiDotNetCore.Queries.Expressions.PaginationExpression)
123-
DA:78,0
120+
DA:76,0
121+
DA:77,0
124122
DA:79,0
123+
DA:80,0
125124
DA:81,0
126-
DA:82,0
127-
DA:83,0
128125
FN:23,System.Void JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::.ctor(System.Linq.Expressions.Expression,System.Type,System.Type,JsonApiDotNetCore.Queries.Internal.QueryableBuilding.LambdaParameterNameFactory,JsonApiDotNetCore.Resources.IResourceFactory,JsonApiDotNetCore.Configuration.IResourceContextProvider,JsonApiDotNetCore.Queries.Internal.QueryableBuilding.LambdaScopeFactory)
129126
FNDA:0,System.Void JsonApiDotNetCore.MongoDb.Queries.Internal.QueryableBuilding.QueryableBuilder::.ctor(System.Linq.Expressions.Expression,System.Type,System.Type,JsonApiDotNetCore.Queries.Internal.QueryableBuilding.LambdaParameterNameFactory,JsonApiDotNetCore.Resources.IResourceFactory,JsonApiDotNetCore.Configuration.IResourceContextProvider,JsonApiDotNetCore.Queries.Internal.QueryableBuilding.LambdaScopeFactory)
130127
DA:24,0
@@ -153,9 +150,9 @@ BRDA:33,124,0,0
153150
BRDA:33,124,1,0
154151
BRDA:34,147,0,0
155152
BRDA:34,147,1,0
156-
LF:44
153+
LF:43
157154
LH:0
158-
BRF:22
155+
BRF:20
159156
BRH:0
160157
FNF:5
161158
FNH:0

0 commit comments

Comments
 (0)