-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge projects to single repository #85
Changes from 22 commits
0a8003c
da668c7
1b95568
3a06f83
02c18e3
f942d8f
ddeb893
fc20a07
934b3d5
cd71474
9838549
a462de6
72fa749
2aae368
5ce5b63
1306f70
4fbf610
4ce51cb
bc5cb5c
ce0d330
2f3d991
f4f0250
5d7d4d8
0c72a3e
0f5cf0e
5746908
7983741
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, gender identity and expression, level of experience, | ||
nationality, personal appearance, race, religion, or sexual identity and | ||
orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at <gotham-admin@googlegroups.com>. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 1.4, available at [http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,41 @@ | ||
# Contributing to Gotham | ||
|
||
Please take a moment to review this document in order to make the contribution | ||
process easy and effective for everyone involved. | ||
|
||
All aspects of the contribution process must adhere to | ||
[Gotham policies](https://github.com/gotham-rs/policies). | ||
Take a moment to read these now if you've not previously had a chance to | ||
consider them. | ||
Please take a moment to review this document to make the contribution process easy and effective | ||
for everyone involved. | ||
|
||
## License | ||
|
||
You agree to license your contribution under the | ||
You agree to license your contribution under the | ||
[MIT License](LICENSE-MIT) **AND** the [Apache License 2.0](LICENSE-APACHE). | ||
|
||
## Submission guidelines | ||
|
||
Ensure your contribution has been run through | ||
[rustfmt](https://github.com/rust-lang-nursery/rustfmt) version 0.9 or later. | ||
|
||
You might also like to consider using | ||
[clippy](https://github.com/rust-lang-nursery/rust-clippy). | ||
|
||
Document your contribution per the | ||
[Rust documentation guidelines](https://doc.rust-lang.org/book/first-edition/documentation.html). | ||
1. Format your contribution with | ||
[rustfmt](https://github.com/rust-lang-nursery/rustfmt) version 0.9 or later. | ||
1. Consider using [clippy](https://github.com/rust-lang-nursery/rust-clippy). | ||
1. Document your contribution per the | ||
[Rust documentation guidelines](https://doc.rust-lang.org/book/first-edition/documentation.html). | ||
|
||
Provide tests that prove the functionality you're contributing is correct. | ||
|
||
Ensure your contribution is free of all warnings and errors during compilation | ||
and testing. Gotham deliberately targets higher levels of warnings than you may | ||
have seen previously in order to maintain quality. | ||
Ensure your contribution is free of all warnings and errors during compilation | ||
and testing. Gotham targets higher levels of warnings than you may have seen in other projects to | ||
maintain quality. | ||
|
||
## Pull requests | ||
|
||
Pull requests that fix bugs, make improvements or add new features are very | ||
welcome, they are one of the main points of collaboration for the Gotham project. | ||
The core team appreciates pull requests that fix bugs, make improvements or add new features. | ||
These are one of the main points of collaboration for the Gotham project. | ||
|
||
Pull requests should remain focused in scope and not contain unrelated commits. | ||
|
||
**Please talk to us** before embarking on any significant pull request otherwise | ||
you risk spending a lot of time working on something that might not be a fit. | ||
IRC, email and issues are all good avenues to do this. | ||
**Please talk to us** before embarking on any significant pull request otherwise you risk spending | ||
a lot of time working on something that might not be a fit. Gitter and issues are good avenues | ||
to do this. | ||
|
||
The Gotham project may use various bots and tools to automatically verify | ||
submitted pull requests. Ensure you address any errors these tools may report. | ||
The Gotham project may use automated tools to verify submitted pull requests. | ||
Ensure you address any errors these tools may report. | ||
|
||
The Gotham core team may choose to **not** accept your contribution. | ||
When this happens we'll explain why and where possible make suggestions for how | ||
you might be able to achieve what you set out to with your pull request. | ||
The core team may choose to **not** accept your contribution. When this happens we'll explain why | ||
and where possible make suggestions for how you might be able to achieve what you set out to | ||
with your pull request. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,12 @@ | ||
[package] | ||
name = "gotham" | ||
version = "0.1.2" # Alter html_root_url in lib.rs also | ||
authors = ["Shaun Mangelsdorf <s.mangelsdorf@gmail.com>", | ||
"Bradley Beddoes <bradleybeddoes@gmail.com>"] | ||
description = "A flexible web framework that does not sacrifice safety, security or speed." | ||
license = "MIT/Apache-2.0" | ||
homepage = "https://gotham.rs" | ||
repository = "https://github.com/gotham-rs/gotham" | ||
readme = "README.md" | ||
categories = ["web-programming::http-server"] | ||
keywords = ["http", "async", "web", "framework", "gotham"] | ||
[workspace] | ||
members = [ | ||
"gotham", | ||
"gotham_derive", | ||
|
||
[features] | ||
default = [] | ||
ci = [] | ||
"middleware/template", | ||
"middleware/diesel", | ||
|
||
[dependencies] | ||
log = "0.3" | ||
hyper = "~0.11.7" | ||
serde = "~1.0" | ||
serde_derive = "~1.0" | ||
bincode = "0.8" | ||
mime = "0.3" | ||
futures = "~0.1.11" | ||
tokio-core = "0.1" | ||
mio = "0.6" | ||
borrow-bag = "0.4" | ||
url = "1.4.0" | ||
uuid = { version = "0.5", features = ["v4"] } | ||
chrono = "0.4" | ||
base64 = "0.4" | ||
rand = "0.3" | ||
linked-hash-map = "0.4" | ||
num_cpus = "1" | ||
crossbeam = "0.3" | ||
regex = "0.2" | ||
"misc/borrow_bag", | ||
|
||
[dev-dependencies] | ||
gotham_derive = { version = "0.1.0", path = "gotham_derive" } | ||
|
||
[badges] | ||
travis-ci = { repository = "gotham-rs/gotham", branch = "master" } | ||
"examples/hello_world", | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,62 @@ | ||
# Gotham | ||
|
||
[![Join the chat at https://gitter.im/gotham-rs/gotham](https://badges.gitter.im/gotham-rs/gotham.svg)](https://gitter.im/gotham-rs/gotham?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[![Join the chat at https://gitter.im/gotham-rs/gotham](https://badges.gitter.im/gotham-rs/gotham.svg)](https://gitter.im/gotham-rs/gotham?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Linux build status](https://travis-ci.org/gotham-rs/gotham.svg?branch=master)](https://travis-ci.org/gotham-rs/gotham) | ||
|
||
[![Linux build status](https://travis-ci.org/gotham-rs/gotham.svg?branch=master)](https://travis-ci.org/gotham-rs/gotham) | ||
A flexible web framework, written in [Rust](https://www.rust-lang.org/) that promotes stability, | ||
safety, security and speed. | ||
|
||
A flexible web framework that does not sacrifice safety, security or speed. | ||
## Features | ||
|
||
The Gotham core team loves many of the elegant concepts that are found in dynamically typed web application frameworks, such as Rails, Phoenix and Django and aspire to achieve them with the type and memory safety guarantees provided by Rust. | ||
|
||
Gotham is stability focused. All releases of Gotham are compatible with stable Rust and that contract will never change. To ensure we remain compatible, we also regularly build against beta and nightly Rust. | ||
|
||
Gotham leverages async extensively thanks to the [Tokio project](https://tokio.rs) and is further enhanced by being built directly on top of async [Hyper](https://hyper.rs). Simple Gotham request handlers are able to complete in **µs** with very low memory requirements. | ||
1. Stability focused. All releases target **stable** Rust. This will never change. | ||
To ensure future compatibility, we also run automated builds against Rust beta and | ||
nightly releases. | ||
1. Statically typed. Unlike other web frameworks Gotham is statically typed ensuring your | ||
entire application is **correctly expressed** at compile time. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Might be unnecessary There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copied from website but agree, fixed. |
||
1. Async everything. By leveraging the [Tokio project](https://tokio.rs), all Gotham types are | ||
async out of the box. Our async story is further enhanced by [Hyper](https://hyper.rs), | ||
a fast server that provides an elegant layer over stringly typed HTTP. | ||
1. Blazingly fast. Measure completed requests, including the 99th percentile, in **µs**. | ||
|
||
## License | ||
Gotham is licensed under your option of: | ||
|
||
Licensed under your option of: | ||
|
||
* [MIT License](LICENSE-MIT) | ||
* [Apache License, Version 2.0](LICENSE-APACHE) | ||
|
||
## Learning Gotham | ||
All of the following resources are available to assist you learning Gotham: | ||
## Community | ||
|
||
* [The Gotham website](https://gotham.rs) | ||
* [Our API documentation](https://docs.rs/gotham/) | ||
* [The Gotham book](https://book.gotham.rs) | ||
* [Our example application](https://github.com/gotham-rs/example-app) | ||
The following policies guide participation in our project and our community: | ||
|
||
## Help | ||
The Gotham core team collaborate on [Gitter](https://gitter.im/gotham-rs/gotham). Gotham specific chat and requests for help are both very welcome here. | ||
* [Conduct](CONDUCT.md) | ||
* [Contributing](CONTRIBUTING.md) | ||
|
||
## Policies | ||
Gotham is a young project that we want to create an energetic and respectful community around. | ||
## Learning | ||
|
||
The following resources are available to assist you learning Gotham: | ||
|
||
* [The Gotham website](https://gotham.rs) | ||
* [Our extensive set of examples](examples) | ||
* [Our API documentation](https://docs.rs/gotham/) | ||
* [Our Gitter chatroom](https://gitter.im/gotham-rs/gotham) | ||
* [Twitter](https://twitter.com/gotham_rs) | ||
|
||
As a starting point we've adopted the following [policies](https://github.com/gotham-rs/policies) which we'd like your help in refining further. | ||
## Alternatives | ||
|
||
These policies are in effect for any environment or tool that supports the Gotham project. | ||
We hope you'll find Gotham is flexible enough to meet the needs of any web application you | ||
might like to build. Please [have a chat with us](https://gitter.im/gotham-rs/gotham) or | ||
[create an issue](https://github.com/gotham-rs/gotham/issues) if you find this isn't the case, | ||
perhaps there is something Gotham can offer that will help you achieve your goals. | ||
|
||
We do acknowledge that sometimes the choices we've made for Gotham may just not suit the needs of | ||
all projects. If that is the case for your project there are alternative Rust web frameworks you | ||
might like to consider: | ||
|
||
## News | ||
You can keep up with Gotham at: | ||
1. [Conduit](https://github.com/conduit-rust/conduit) | ||
1. [Iron](https://github.com/iron/iron) | ||
1. [Nickel](https://github.com/nickel-org/nickel.rs) | ||
1. [Pencil](https://github.com/fengsp/pencil) | ||
1. [Rocket](https://github.com/SergioBenitez/Rocket) | ||
1. [Rouille](https://github.com/tomaka/rouille) | ||
|
||
* [Our blog](https://gotham.rs/blog) | ||
* [On Twitter](https://twitter.com/gotham_rs) | ||
Explore even more suggestions at [Are we web yet?](http://www.arewewebyet.org/). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Gotham Examples | ||
|
||
Standalone crates that act as examples for building web applications with Gotham. | ||
|
||
All include test cases that prove correctness and serve as an example of how to test your own applications. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
"demonstrate correct behaviour" perhaps? 😛 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
|
||
These examples are best reviewed once you've understood the Rust language itself through resources | ||
such as [the Rust book](https://doc.rust-lang.org/book/second-edition/). | ||
|
||
## Learning | ||
|
||
The following resources will also assist you in learning Gotham: | ||
|
||
* [The Gotham website](https://gotham.rs) | ||
* [Our API documentation](https://docs.rs/gotham/) | ||
* [Our Gitter chatroom](https://gitter.im/gotham-rs/gotham) | ||
* [Twitter](https://twitter.com/gotham_rs) | ||
|
||
## Ordering | ||
|
||
Reviewing our examples in the order shown here will assist you in methodically learning the | ||
concepts and functionality provided by Gotham from introductory through to advanced levels. | ||
|
||
1. [Hello World](hello_world) - A simple introduction to working with Gotham. | ||
|
||
## License | ||
|
||
Licensed under your option of: | ||
|
||
* [MIT License](../LICENSE-MIT) | ||
* [Apache License, Version 2.0](../LICENSE-APACHE) | ||
|
||
## Community | ||
|
||
The following policies guide participation in our project and our community: | ||
|
||
* [Conduct](../../CONDUCT.md) | ||
* [Contributing](../../CONTRIBUTING.md) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "hello_world" | ||
version = "0.2.0" | ||
authors = ["Bradley Beddoes <bradleybeddoes@gmail.com>", | ||
"Shaun Mangelsdorf <s.mangelsdorf@gmail.com>"] | ||
description = "A hello world example application for Gotham" | ||
license = "MIT/Apache-2.0" | ||
readme = "README.md" | ||
publish = false | ||
|
||
[dependencies] | ||
gotham = { path = "../../gotham" } | ||
|
||
hyper = "0.11" | ||
futures = "~0.1.11" | ||
mime = "0.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Is this a tab?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.