-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4ed8b25
Showing
33 changed files
with
842 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: SimonCropp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
name: Bug fix | ||
about: Create a bug fix to help us improve | ||
--- | ||
|
||
Note: New issues raised, where it is clear the submitter has not read the issue template, are likely to be closed with "please read the issue template". Please don't take offense at this. It is simply a time management decision. If someone raises an issue, and can't be bothered to spend the time to read the issue template, then the project maintainers should not be expected to spend the time to read the submitted issue. Often too much time is spent going back and forth in issue comments asking for information that is outlined in the issue template. | ||
|
||
|
||
#### Preamble | ||
|
||
General questions may be better placed [StackOveflow](https://stackoverflow.com/). | ||
|
||
Where relevant, ensure you are using the current stable versions on your development stack. For example: | ||
|
||
* Visual Studio | ||
* [.NET SDK or .NET Core SDK](https://www.microsoft.com/net/download) | ||
* Any related NuGet packages | ||
|
||
Any code or stack traces must be properly formatted with [GitHub markdown](https://guides.github.com/features/mastering-markdown/). | ||
|
||
|
||
#### Describe the bug | ||
|
||
A clear and concise description of what the bug is. Include any relevant version information. | ||
|
||
A clear and concise description of what you expected to happen. | ||
|
||
Add any other context about the problem here. | ||
|
||
|
||
#### Minimal Repro | ||
|
||
Ensure you have replicated the bug in a minimal solution with the fewest moving parts. Often this will help point to the true cause of the problem. Upload this repro as part of the issue, preferably a public GitHub repository or a downloadable zip. The repro will allow the maintainers of this project to smoke test the any fix. | ||
|
||
#### Submit a PR that fixes the bug | ||
|
||
Submit a [Pull Request (PR)](https://help.github.com/articles/about-pull-requests/) that fixes the bug. Include in this PR a test that verifies the fix. If you were not able to fix the bug, a PR that illustrates your partial progress will suffice. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: StackOverflow | ||
url: https://stackoverflow.com/ | ||
about: Please ask and answer questions here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: Feature request | ||
about: How to raise feature requests | ||
--- | ||
|
||
|
||
Note: New issues raised, where it is clear the submitter has not read the issue template, are likely to be closed with "please read the issue template". Please don't take offense at this. It is simply a time management decision. If someone raises an issue, and can't be bothered to spend the time to read the issue template, then the project maintainers should not be expected to spend the time to read the submitted issue. Often too much time is spent going back and forth in issue comments asking for information that is outlined in the issue template. | ||
|
||
If you are certain the feature will be accepted, it is better to raise a [Pull Request (PR)](https://help.github.com/articles/about-pull-requests/). | ||
|
||
If you are uncertain if the feature will be accepted, outline the proposal below to confirm it is viable, prior to raising a PR that implements the feature. | ||
|
||
Note that even if the feature is a good idea and viable, it may not be accepted since the ongoing effort in maintaining the feature may outweigh the benefit it delivers. | ||
|
||
|
||
#### Is the feature request related to a problem | ||
|
||
A clear and concise description of what the problem is. | ||
|
||
|
||
#### Describe the solution | ||
|
||
A clear and concise proposal of how you intend to implement the feature. | ||
|
||
|
||
#### Describe alternatives considered | ||
|
||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
|
||
#### Additional context | ||
|
||
Add any other context about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: nuget | ||
directory: "/src" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 7 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
# Set to true to ignore issues in a milestone (defaults to false) | ||
exemptMilestones: true | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: false | ||
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': | ||
pulls: | ||
daysUntilStale: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: merge-dependabot | ||
on: | ||
push: | ||
branches: | ||
- dependabot* | ||
- master | ||
pull_request: | ||
branches: | ||
- dependabot* | ||
- master | ||
jobs: | ||
automerge: | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'dependabot[bot]' | ||
steps: | ||
- name: Automerge Dependecies | ||
uses: "pascalgn/[email protected]" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
MERGE_LABELS: "dependencies" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: on-push-do-docs | ||
on: | ||
push: | ||
jobs: | ||
docs: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run MarkdownSnippets | ||
run: | | ||
dotnet tool install --global MarkdownSnippets.Tool | ||
mdsnippets ${GITHUB_WORKSPACE} | ||
shell: bash | ||
- name: Push changes | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git commit -m "Docs changes" -a || echo "nothing to commit" | ||
remote="https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git" | ||
branch="${GITHUB_REF:11}" | ||
git push "${remote}" ${branch} || echo "nothing to push" | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: on-tag-do-release | ||
on: | ||
push: | ||
tags: | ||
- '[0-9]+\.[0-9]+\.[0-9]+' | ||
jobs: | ||
release: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Run | ||
run: | | ||
dotnet tool install --global GitReleaseManager.Tool | ||
tag="${GITHUB_REF:10}" | ||
owner="${GITHUB_REPOSITORY%/*}" | ||
repo="${GITHUB_REPOSITORY#*/}" | ||
dotnet-gitreleasemanager create -m ${tag} --token ${{secrets.GITHUB_TOKEN}} -o ${owner} -r ${repo} | ||
dotnet-gitreleasemanager close -m ${tag} --token ${{secrets.GITHUB_TOKEN}} -o ${owner} -r ${repo} | ||
dotnet-gitreleasemanager publish -t ${tag} --token ${{secrets.GITHUB_TOKEN}} -o ${owner} -r ${repo} | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*.suo | ||
*.user | ||
bin/ | ||
obj/ | ||
.vs/ | ||
*.DotSettings.user | ||
.idea/ | ||
*.received.* | ||
nugets/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Code of Conduct | ||
|
||
This project has adopted the code of conduct defined by the Contributor Covenant | ||
to clarify expected behavior in our community. | ||
For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/about/code-of-conduct). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) .NET Foundation and Contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# <img src="/src/icon.png" height="30px"> Verify.QuestPDF | ||
|
||
[](https://ci.appveyor.com/project/SimonCropp/Verify-QuestPDF) | ||
[](https://www.nuget.org/packages/Verify.QuestPDF/) | ||
|
||
Extends [Verify](https://github.com/VerifyTests/Verify) to allow verification of documents via [QuestPDF](https://www.questpdf.com/). | ||
|
||
Designed to help assert the output of projects using QuestPDF to generate PDFs. | ||
|
||
|
||
## NuGet package | ||
|
||
https://nuget.org/packages/Verify.QuestPDF/ | ||
|
||
|
||
## Usage | ||
|
||
Enable: | ||
|
||
<!-- snippet: ModuleInitializer.cs --> | ||
<a id='snippet-ModuleInitializer.cs'></a> | ||
```cs | ||
public static class ModuleInitializer | ||
{ | ||
[ModuleInitializer] | ||
public static void Init() => | ||
VerifyQuestPdf.Initialize(); | ||
} | ||
``` | ||
<sup><a href='/src/Tests/ModuleInitializer.cs#L1-L6' title='Snippet source file'>snippet source</a> | <a href='#snippet-ModuleInitializer.cs' title='Start of snippet'>anchor</a></sup> | ||
<!-- endSnippet --> | ||
|
||
|
||
### Code that generates a document | ||
|
||
<!-- snippet: GenerateDocument --> | ||
<a id='snippet-generatedocument'></a> | ||
```cs | ||
static IDocument GenerateDocument() => | ||
Document.Create(container => | ||
{ | ||
container.Page(page => | ||
{ | ||
page.Size(PageSizes.A5); | ||
page.Margin(1, Unit.Centimetre); | ||
page.PageColor(Colors.Grey.Lighten3); | ||
page.DefaultTextStyle(x => x.FontSize(20)); | ||
|
||
page.Header() | ||
.Text("Hello PDF!") | ||
.SemiBold().FontSize(36); | ||
|
||
page.Content() | ||
.Column(x => | ||
{ | ||
x.Item() | ||
.Text(Placeholders.LoremIpsum()); | ||
}); | ||
|
||
page.Footer() | ||
.AlignCenter() | ||
.Text(x => | ||
{ | ||
x.Span("Page "); | ||
x.CurrentPageNumber(); | ||
}); | ||
}); | ||
}); | ||
``` | ||
<sup><a href='/src/Tests/Samples.cs#L16-L49' title='Snippet source file'>snippet source</a> | <a href='#snippet-generatedocument' title='Start of snippet'>anchor</a></sup> | ||
<!-- endSnippet --> | ||
|
||
|
||
### Verify a Document | ||
|
||
<!-- snippet: VerifyDocument --> | ||
<a id='snippet-verifydocument'></a> | ||
```cs | ||
[Test] | ||
public Task VerifyDocument() => | ||
Verify(GenerateDocument()); | ||
``` | ||
<sup><a href='/src/Tests/Samples.cs#L8-L14' title='Snippet source file'>snippet source</a> | <a href='#snippet-verifydocument' title='Start of snippet'>anchor</a></sup> | ||
<!-- endSnippet --> | ||
|
||
|
||
### Results | ||
|
||
|
||
#### Metadata | ||
|
||
<!-- snippet: Samples.VerifyDocument.00.verified.txt --> | ||
<a id='snippet-Samples.VerifyDocument.00.verified.txt'></a> | ||
```txt | ||
{ | ||
CreationDate: DateTime_1, | ||
ModifiedDate: DateTime_2, | ||
ImageQuality: 101, | ||
PdfA: false, | ||
RasterDpi: 72 | ||
} | ||
``` | ||
<sup><a href='/src/Tests/Samples.VerifyDocument.00.verified.txt#L1-L7' title='Snippet source file'>snippet source</a> | <a href='#snippet-Samples.VerifyDocument.00.verified.txt' title='Start of snippet'>anchor</a></sup> | ||
<!-- endSnippet --> | ||
|
||
|
||
#### Pdf as image | ||
|
||
 |
Oops, something went wrong.