1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-11-15 21:31:24 +00:00

prep work

This commit is contained in:
Nikolay Kim 2017-09-30 09:10:03 -07:00
parent e317ea8181
commit 5b6f5d8ce3
8 changed files with 140 additions and 5 deletions

15
.gitignore vendored
View file

@ -1,10 +1,17 @@
# Generated by Cargo
# will have compiled files and executables
/target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock
Cargo.lock
/gh-pages
__pycache__
*.so
*.out
*.pyc
*.pid
*.sock
*~
target/
*.egg-info/
# These are backup files generated by rustfmt
**/*.rs.bk

32
.travis.yml Normal file
View file

@ -0,0 +1,32 @@
language: rust
rust:
- 1.18.0
- 1.19.0
- 1.20.0
- nightly
sudo: required
dist: trusty
# Add clippy
before_script:
#- |
# if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then
# ( ( cargo install clippy && export CLIPPY=true ) || export CLIPPY=false );
# fi
- export PATH=$PATH:~/.cargo/bin
script:
- make test
# - make clippy
# Upload docs
after_success:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_RUST_VERSION" == "1.20.0" ]]; then
cargo doc --no-deps &&
echo "<meta http-equiv=refresh content=0;url=os_balloon/index.html>" > target/doc/index.html &&
git clone https://github.com/davisp/ghp-import.git &&
./ghp-import/ghp_import.py -n -p -f -m "Documentation upload" -r https://"$GH_TOKEN"@github.com/"$TRAVIS_REPO_SLUG.git" target/doc &&
echo "Uploaded documentation"
fi

50
Cargo.toml Normal file
View file

@ -0,0 +1,50 @@
[package]
name = "actix-http"
version = "0.1.0"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Actix http support"
readme = "README.md"
keywords = ["actor", "http"]
homepage = "https://github.com/fafhrd91/actix-http"
repository = "https://github.com/fafhrd91/actix-http.git"
documentation = "https://fafhrd91.github.io/actix-http/actix-http/"
categories = ["network-programming", "asynchronous"]
license = "Apache-2.0"
exclude = [".gitignore", ".travis.yml", ".cargo/config", "appveyor.yml"]
build = "build.rs"
[lib]
name = "actix_http"
path = "src/lib.rs"
[dependencies]
# tokio
bytes = "0.4"
mio = "0.6"
futures = "0.1"
tokio-core = "0.1"
tokio-io = "0.1"
tokio-signal = "0.1"
tokio-uds = "0.1"
# logging
time = "*"
log = "0.3"
syslog = "3.2"
env_logger = "0.4"
[dependencies.actix]
#path = "../actix"
git = "https://github.com/fafhrd91/actix.git"
features = ["signal"]
[dev-dependencies]
skeptic = "0.13"
[build-dependencies]
skeptic = "0.13"
[profile.release]
lto = true
opt-level = 3
debug = true

View file

@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Copyright 2017-NOW Nikolay Kim
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

38
Makefile Normal file
View file

@ -0,0 +1,38 @@
.PHONY: default build test doc clean
CARGO_FLAGS := --features "$(FEATURES)"
default: test
build:
cargo build $(CARGO_FLAGS)
test: build clippy
cargo test $(CARGO_FLAGS)
# cd examples/word-count && python setup.py install && pytest -v tests
clippy:
if $$CLIPPY; then cargo clippy $(CARGO_FLAGS); fi
doc: build
cargo doc --no-deps $(CARGO_FLAGS)
clean:
rm -r target
gh-pages:
git clone --branch gh-pages git@github.com:fafhrd91/ctx.git gh-pages
.PHONY: gh-pages-doc
gh-pages-doc: doc | gh-pages
cd gh-pages && git pull
rm -r gh-pages/doc
cp -r target/doc gh-pages/
rm gh-pages/doc/.lock
cd gh-pages && git add .
cd gh-pages && git commit -m "Update documentation"
publish: default gh-pages-doc
cargo publish
cd gh-pages && git push

6
build.rs Normal file
View file

@ -0,0 +1,6 @@
extern crate skeptic;
fn main() {
// generates doc tests for `README.md`.
skeptic::generate_doc_tests(&["README.md"]);
}

1
src/lib.rs Normal file
View file

@ -0,0 +1 @@
//! Actix http framework

1
tests/skeptic.rs Normal file
View file

@ -0,0 +1 @@
include!(concat!(env!("OUT_DIR"), "/skeptic-tests.rs"));