-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from gotham-rs/merge-projects-to-single-reposi…
…tory Merge projects to single repository
- Loading branch information
Showing
82 changed files
with
1,133 additions
and
404 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 |
---|---|---|
@@ -1,18 +1,25 @@ | ||
# Originally based on: | ||
# https://raw.githubusercontent.com/hyperium/hyper/207fca63ce/.appveyor.yml | ||
# | ||
# Also ripped off some good ideas from | ||
# https://github.com/diesel-rs/diesel/blob/master/.appveyor.yml | ||
# | ||
environment: | ||
matrix: | ||
- TARGET: x86_64-pc-windows-msvc | ||
- TARGET: i686-pc-windows-msvc | ||
- TARGET: x86_64-pc-windows-gnu | ||
- TARGET: i686-pc-windows-gnu | ||
install: | ||
- curl -sSf -o rustup-init.exe https://win.rustup.rs/ | ||
- rustup-init.exe -y --default-host %TARGET% | ||
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin | ||
- curl -fsS --retry 3 --retry-connrefused -o rustup-init.exe https://win.rustup.rs/ | ||
- rustup-init -yv --default-toolchain stable --default-host %target% | ||
- set PATH=%PATH%;%USERPROFILE%\.cargo\bin | ||
- rustc -vV | ||
- cargo -vV | ||
- curl -fsS --retry 3 --retry-connrefused -o sqlite3.zip https://www.sqlite.org/2017/sqlite-dll-win64-x64-3210000.zip | ||
- 7z e sqlite3.zip -y | ||
- set SQLITE3_LIB_DIR=%APPVEYOR_BUILD_FOLDER% | ||
- set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER% | ||
- '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\lib.exe" /def:sqlite3.def /OUT:sqlite3.lib /machine:x64' | ||
build: false | ||
test_script: | ||
- cargo build | ||
- cargo test | ||
- cargo test --all |
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
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,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/ |
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 |
---|---|---|
@@ -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. |
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 |
---|---|---|
@@ -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", | ||
] |
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 |
---|---|---|
@@ -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. Gotham is statically typed ensuring your | ||
entire application is **correctly expressed** at compile time. | ||
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/). |
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,39 @@ | ||
# Gotham Examples | ||
|
||
Standalone crates that act as examples for building web applications with Gotham. | ||
|
||
All include test cases that demonstrate correct behaviour and serve as an example of | ||
how to test your own applications. | ||
|
||
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) |
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 @@ | ||
[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" |
Oops, something went wrong.