Skip to content

Commit 4f9f639

Browse files
committed
Updates README and adds code of conduct and contributing
1 parent b0a5426 commit 4f9f639

File tree

3 files changed

+293
-2
lines changed

3 files changed

+293
-2
lines changed

CODE_OF_CONDUCT.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, religion, or sexual identity
11+
and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the
27+
overall community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or
32+
advances of any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email
36+
address, without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official e-mail address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement at
64+
[INSERT CONTACT METHOD].
65+
All complaints will be reviewed and investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series
87+
of actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or
94+
permanent ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within
114+
the community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.0, available at
120+
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
121+
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
127+
at [https://www.contributor-covenant.org/translations][translations].
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
131+
[Mozilla CoC]: https://github.com/mozilla/diversity
132+
[FAQ]: https://www.contributor-covenant.org/faq
133+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributing to Grapevine
2+
3+
Grapevine has received lots of great feedback from the community. We've used this feedback to inform the direction of the project, and we absolutely want to keep hearing from you! **Your involvement makes the project better** by increasing the usability, quality and adoption of the project. Our goal is to be better stewards by being more responsive and transparent. Following the contribution guidelines outlined below will help us to better help you.
4+
5+
# How To Get Help
6+
7+
A lot of issues that were created in previous versions of Grapevine were not bugs or feature requests, they were questions or discussions - most of which could be (and were) answered by anyone in the community; they're not exclusive to the maintainers. For feedback like this, there are several places where people can get all kinds of help, and we would encourage you to use them first.
8+
9+
- Consult the [official documentation](https://scottoffen.github.io/grapevine).
10+
- Take a gander at the [Samples](https://github.com/scottoffen/grapevine/tree/main/src/Samples) project.
11+
- Engage in our [community discussions](https://github.com/scottoffen/grapevine/discussions).
12+
- Ask your question on [StackOverflow](https://stackoverflow.com) using [#grapevine](https://stackoverflow.com/questions/tagged/grapevine?sort=newest).
13+
14+
To avoid any misunderstanding, let us state this policy in no uncertain terms: **issues that are created to ask usage questions will be closed.**
15+
16+
# Getting Off To A Good Start
17+
18+
Regardless of whether you are opening a bug report, asking a question on StackOverflow, or getting in on the GitHub discussions, there is information you should always include to ensure you get the results you need. If you don't provide it up front, you will likely be asked for it before you can get any traction on your request.
19+
20+
- Have a descriptive title and a clear description.
21+
- Include the details of the operating system and version, version of .NET and the version of Grapevine you are using.
22+
- If it's an interoperability problem, don't forget to include information about the other "things" you are using, e.g. logging frameworks, dependency injection libraries, IDE, etc.
23+
- Show the minimum amount of code needed to illustrate the problem or demonstrate the behavior.
24+
- Where applicable, consider including a screenshot or a link to your repository where the code can be examined in context.
25+
26+
# Feature Requests
27+
28+
Got an idea on how to make Grapevine better? Start or join a conversation in our [community discussions](https://github.com/scottoffen/grapevine/discussions) and suggest your change there. **Do not open an issue on GitHub until** you have collected positive feedback about the change. Where it comes to improvements, we want to ensure we are focused on solving problems, not attacking symptoms, while remaining focused on our guiding principles: fast, unopinionated, and minimalist. In a word: simple.
29+
30+
That being said, Grapevine is designed to make it easy to add middleware at different places in the server and request/response pipeline. You can also create your own implementations of the different interfaces and inject them. All told, that makes it easy to take your functionality and put it in a package that can be used by others as an add-on or plugin to the core Grapevine library, rather than in the core library, if that makes more sense.
31+
32+
If it is decided that your idea would be a good inclusion to the core Grapevine project, create a feature request issue based on the outcome of the community discussion.
33+
34+
# Issue Management
35+
36+
GitHub issues are reserved for things that can be fixed, added, resolved, or implemented. Here are some guidelines we use in order to manage incoming issues in the most efficient way.
37+
38+
## Issues That Can't or Won't Be Fixed
39+
40+
There are classes of things that get reported that are undefined, indistinct, or out of scope, and as such they are inactionable. When a report comes in that looks like this, we'll ask the original submitter of the issue to clarify what "done" would look like to them. We can and will help with this process if you're unsure. But if the goal remains undefined or is unachievable (e.g. outside the scope or vision of the project), we'll close the issue.
41+
42+
## Abandoned Issues
43+
44+
Occassionally, the maintainers can't get the information they need to resolve something, and as a result an issue just never moves forward. We get it, we're all busy. Maybe the original submitter has moved on or just forgotten. In order to focus our attention in the right places, we will mark issues with the `more-information-needed` label when the maintainers have a question. If we don't receive a response from the original submitter within a week, we'll give a gentle reminder. If we still haven't received a response within 30 days, we will close the issue.
45+
46+
# Coding Conventions
47+
48+
Grapevine is written strictly in C#. The Samples project includes some HTML, CSS and JavaScript. The repository includes an [`.editorconfig`](https://editorconfig.org/) file to manage differences in indentation styles between these, as well as line endings, etc.
49+
50+
- As a guiding principle, we aim for [readable code](https://www.amazon.com/Art-Readable-Code-Practical-Techniques/dp/0596802293) above following a convention.
51+
- For C# we ask that you follow the [C# Coding Conventions](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions) published by Microsoft.
52+
- Include updated unit tests for any modified or added code.
53+
- For HTML, CSS and JavaScript, we use the built-in code formatters in Visual Studio Code.
54+
55+
# Pull Requests
56+
57+
When writing a pull request
58+
59+
- Have a descriptive title
60+
- Include a clear list of what you've done.
61+
- Make sure to include or update test coverage.
62+
- Make sure all of your commits are atomic (one feature per commit).
63+
64+
## Purely Cosmetic Pull Requests
65+
66+
Changes that are cosmetic in nature and do not add anything substantial to the stability, functionality, or testability of the project will generally not be accepted. There are a lot of hidden costs in these kinds of pull requests. These include but are not limited to:
67+
68+
- Someone needs to review those changes
69+
- It creates a lot of notification noise
70+
- It pollutes the git history
71+
72+
Sometimes, your editor will completely reformat a file when you save it, making numerous white space changes that, while they don't affect the code, create a lot of noise for the reviewers. If this happens, the PR will not be considered until those white space changes are removed.
73+
74+
# Documentation Changes
75+
76+
Having excellent documentation is crucial to the success of Grapevine. Documentation for Grapevine lives in [grapevine-docs](). Your contribution of clear, concise and accurate documentation is appreciated.

README.md

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,85 @@
1-
# Grapevine
1+
# <img src="logo.png" width=25px> Grapevine
22

3-
Fast, unopinionated, embeddable, minimalist web framework for .NET
3+
Grapevine is a fast, unopinionated, embeddable, minimalist web framework for .NET. Grapevine is not intended to be a replacement for IIS or ASP.NET, but rather to function as an embedded REST/HTTP server in non-ASP.NET projects.
4+
5+
<!-- Shields: http://shields.io/ -->
6+
7+
## Installation
8+
9+
Grapevine is available on [NuGet.org](https://www.nuget.org/packages/Grapevine/) and can be installed using a NuGet package manager or the .NET CLI.
10+
11+
Powershell:
12+
```powershell
13+
Install-Package Grapevine -Version 5.0.0-rc.1
14+
```
15+
16+
.NET CLI
17+
```cmd
18+
> dotnet add package Grapevine --version 5.0.0-rc.1
19+
```
20+
21+
## Usage
22+
23+
Grapevine is easy to get started with.
24+
25+
Create a simple route. This is the code that you want to run when a request comes in using the specificed HTTP verb and path. **Route methods must be [asynchronous](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/)!**
26+
27+
```csharp
28+
[RestResource]
29+
public class MyResource
30+
{
31+
[RestRoute("Get", "/api/test")]
32+
public async Task Test(IHttpContext context)
33+
{
34+
await context.Response.SendResponseAsync("Successfully hit the test route!");
35+
}
36+
}
37+
```
38+
39+
Next, create your first server using provided defaults (it's recommended to use the `RestServerBuilder` class to do this) and start it up!
40+
41+
```csharp
42+
using (var server = RestServerBuilder.UseDefaults().Build())
43+
{
44+
server.Start();
45+
46+
Console.WriteLine("Press enter to stop the server");
47+
Console.ReadLine();
48+
}
49+
```
50+
51+
Open your prefered browser and go to `http://localhost:1234/api/test`. You should see the following output in your browser:
52+
53+
```
54+
Successfully hit the test route!
55+
```
56+
57+
> You'll see a lot of output in the console as well, because the defaults inject a console logger with the minimum level set to trace.
58+
59+
## Support
60+
61+
- Check out the project documentation https://scottoffen.github.io/grapevine.
62+
63+
- Want to see a working project in action? Clone this repository and take a look at the [Samples](https://github.com/scottoffen/grapevine/tree/main/src/Samples) project.
64+
65+
- Engage in our [community discussions](https://github.com/scottoffen/grapevine/discussions) for Q&A, ideas, and show and tell!
66+
67+
- Have a question you can't find an answer for in the documentation? For the fastest and best results, ask your questions on [StackOverflow](https://stackoverflow.com) using [#grapevine](https://stackoverflow.com/questions/tagged/grapevine?sort=newest). Make sure you include the version of Grapevine you are using, the platform you using it on, code samples and any specific error messages you are seeing.
68+
69+
- **Issues created to ask "how to" questions will be closed.**
70+
71+
## Contributing
72+
73+
We welcome contributions from the community! In order to ensure the best experience for everyone, before creating an issue or submitting a pull request, please see the [contributing guidelines](CONTRIBUTING.md) and the [code of conduct](CODE_OF_CONDUCT.md). Failure to adhere to these guidelines can result in significant delays in getting your contributions included in the project.
74+
75+
## Versioning
76+
77+
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/scottoffen/grapevine/releases).
78+
79+
## License
80+
81+
Grapevine 5 is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license.
82+
83+
## Using Grapevine? We'd Love To Hear About It!
84+
85+
Few thing are as satisfying as hearing that your open source project is being used and appreciated by others. (Except for a nice MLT – mutton, lettuce and tomato sandwich, where the mutton is nice and lean and the tomato is ripe. They're so perky, I love that.) Jump over to the discussion boards and [share the love](https://github.com/scottoffen/grapevine/discussions/13)!

0 commit comments

Comments
 (0)