diff --git a/Cargo.toml b/Cargo.toml index 1f46e6e5..77239880 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,11 +4,14 @@ version = "0.2.3" authors = ["Joe Wilm "] license = "MIT" description = "An extensible chatbot" -documentation = "https://chatbot.rs/chatbot/" +documentation = "https://docs.rs/chatbot" repository = "https://github.com/jwilm/chatbot" keywords = ["chat", "bot", "extensible"] readme = "README.md" +[package.metadata.docs.rs] +all-features = true + [dependencies] regex = "0.1" rustc-serialize = "0.3" diff --git a/Makefile b/Makefile index b8233a1d..8b1983dd 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,4 @@ test: docs: @cargo doc --no-deps -upload-docs: docs - @./upload-docs.sh - -.PHONY: test docs upload-docs +.PHONY: test docs diff --git a/README.md b/README.md index 4d06e0dd..fe0923dd 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,7 @@ and clone it locally. You should be able to just do `cargo run` and get a working ping and github handler on the command line. If you want to run the test program using the Slack adapter, do `cargo run -- --adapter slack`. -[service adapters]: http://chatbot.rs/chatbot/adapter/trait.ChatAdapter.html#implementors -[message handlers]: http://chatbot.rs/chatbot/handler/trait.MessageHandler.html#implementors -[documentation]: http://chatbot.rs/chatbot/ +[service adapters]: https://docs.rs/chatbot/*/chatbot/adapter/trait.ChatAdapter.html#implementors +[message handlers]: https://docs.rs/chatbot/*/chatbot/handler/trait.MessageHandler.html#implementors +[documentation]: https://docs.rs/chatbot [issue tracker]: https://github.com/jwilm/chatbot/issues -[mio]: https://github.com/carllerche/mio diff --git a/src/handler/mod.rs b/src/handler/mod.rs index 90187c1a..b0bf9667 100644 --- a/src/handler/mod.rs +++ b/src/handler/mod.rs @@ -62,11 +62,11 @@ pub type HandlerResult = Result<(), HandlerError>; /// Implementing a MessageHandler enables responding to IncomingMessages. There /// are currently very few requirements to creating a handler. The -/// [`handle`](#method.handle) function receives -/// [`IncomingMessage`](message/struct.IncomingMessage.html)s. The implementer +/// [`handle`](#tymethod.handle) function receives +/// [`IncomingMessage`](../message/struct.IncomingMessage.html)s. The implementer /// is responsible for testing whether it's interested in replying. Optionally -/// call [`reply`](message/struct.IncomingMessage.html#method.reply) on the -/// [`IncomingMessage`](message/struct.IncomingMessage.html) to send a response. +/// call [`reply`](../message/struct.IncomingMessage.html#method.reply) on the +/// [`IncomingMessage`](../message/struct.IncomingMessage.html) to send a response. /// /// # Example /// diff --git a/src/message.rs b/src/message.rs index da343729..0d74eff1 100644 --- a/src/message.rs +++ b/src/message.rs @@ -39,7 +39,7 @@ impl OutgoingMessage { } /// Return a reference to the - /// [`IncomingMessage`](message/struct.IncomingMessage.html) that this + /// [`IncomingMessage`](struct.IncomingMessage.html) that this /// message is in response to. pub fn get_incoming<'a>(&'a self) -> &'a IncomingMessage { &self.incoming @@ -60,9 +60,9 @@ impl OutgoingMessage { /// properties on this struct exist to help adapters route any `OutgoingMessage` /// back to where the IncomingMessage originated. /// -/// Types implementing the [`MessageHandler`](handler/trait.MessageHandler.html) +/// Types implementing the [`MessageHandler`](../handler/trait.MessageHandler.html) /// trait should use IncomingMessage.reply to respond. It is up to the -/// [`ChatAdapter`](adapter/trait.ChatAdapter.html) to decide what +/// [`ChatAdapter`](../adapter/trait.ChatAdapter.html) to decide what /// [`reply`](#method.reply) means in the context of the service it provides. #[derive(Clone)] pub struct IncomingMessage { diff --git a/upload-docs.sh b/upload-docs.sh deleted file mode 100755 index 5654f8cb..00000000 --- a/upload-docs.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -# Make a new repo for the gh-pages branch -rm -rf .gh-pages -mkdir .gh-pages -cd .gh-pages -git init - -# Copy over the documentation -cp -r ../target/doc/* . -cp ../circle.yml ./ - -# Add, commit and push files -if [ ${CIRCLECI} ] -then - git config user.name "Joe Wilm" - git config user.email "joe@jwilm.com" -fi -git checkout -b gh-pages -echo "chatbot.rs" > CNAME -git add -f --all . -git commit -m "Documentation" -git remote add origin https://github.com/jwilm/chatbot.git -git push -qf origin gh-pages - -# Cleanup -cd .. -rm -rf .gh-pages