diff --git a/.gitignore b/.gitignore index c5864e1..7db4fd9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ public tmp +_site +Cargo.lock +build/ +target/ diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..28cd159 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,45 @@ +[package] +name = "actix-website" +version = "0.6.0" +authors = ["Actix Project and Contributors"] +readme = "README.md" +keywords = ["http", "web", "framework", "async", "futures"] +homepage = "https://github.com/actix/actix-website/" +repository = "https://github.com/actix/actix-website.git" +documentation = "https://docs.rs/actix-website/" +categories = ["network-programming", "asynchronous", + "web-programming::http-server", + "web-programming::http-client", + "web-programming::websocket"] +license = "MIT/Apache-2.0" +exclude = [".gitignore", ".travis.yml", ".cargo/config", "appveyor.yml"] +build = "build.rs" + +[lib] +src="src/lib.rs" +crate-type = ["dylib"] + +[dependencies] +actix = "^0.5.6" +actix-web = "^0.6" + +flate2 = "1.0" +serde = "1.0" +serde_json = "1.0" +serde_urlencoded = "0.5" + +# io +bytes = "0.4" +futures = "0.1" +tokio-io = "0.1" +tokio-core = "0.1" +http = "0.1" + +[dev-dependencies] +env_logger = "0.5" +skeptic = "0.13" +serde_derive = "1.0" + +[build-dependencies] +skeptic = "0.13" +futures = "0.1" diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..c8a5bd8 --- /dev/null +++ b/build.rs @@ -0,0 +1,31 @@ +extern crate skeptic; + +use std::{env, fs}; + + +fn main() { + let f = env::var("OUT_DIR").unwrap() + "/skeptic-tests.rs"; + let _ = fs::remove_file(f); + // generates doc tests. + skeptic::generate_doc_tests( + &["content/docs/application.md", + "content/docs/autoreload.md", + "content/docs/databases.md", + "content/docs/errors.md", + "content/docs/extractors.md", + "content/docs/getting-started.md", + "content/docs/handlers.md", + "content/docs/http2.md", + "content/docs/installation.md", + "content/docs/middleware.md", + "content/docs/request.md", + "content/docs/response.md", + "content/docs/sentry.md", + "content/docs/server.md", + "content/docs/static-files.md", + "content/docs/testing.md", + "content/docs/url-dispatch.md", + "content/docs/websockets.md", + "content/docs/whatis.md", + ]); +} diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..62bee73 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,10 @@ +extern crate http; +extern crate actix; +extern crate actix_web; +extern crate futures; +extern crate tokio_io; +extern crate tokio_core; + +pub fn test() { + println!("test"); +} diff --git a/tests/skeptic.rs b/tests/skeptic.rs new file mode 100644 index 0000000..a0e0f9b --- /dev/null +++ b/tests/skeptic.rs @@ -0,0 +1,2 @@ +#[cfg(unix)] +include!(concat!(env!("OUT_DIR"), "/skeptic-tests.rs"));