Archived
1
0
Fork 0

Merge pull request #13 from braiden-vasco/add_instructions

Add instructions
This commit is contained in:
Braiden Vasco 2015-09-13 20:37:21 +00:00
commit 2dfd93f75b

View file

@ -5,4 +5,67 @@ Lita::Adapters::Tox
[![Build Status](https://travis-ci.org/braiden-vasco/lita-tox.svg)](https://travis-ci.org/braiden-vasco/lita-tox)
[![Coverage Status](https://coveralls.io/repos/braiden-vasco/lita-tox/badge.svg)](https://coveralls.io/r/braiden-vasco/lita-tox)
[Tox](https://tox.chat) adapter for the Lita chat bot
[Tox](https://tox.chat) adapter for the [Lita](http://lita.io) chat bot.
**WARNING**
Still in development. Read the README carefully.
TODO
----
Current development version have some limitations
which should be fixed in first release:
* Adapter doesn't save Tox state, so you have to send friendship
request again after each run. Current Tox ID is shown at start
as Lita's information message
* Only private chats are supported. Adapter will not respond to group invite
* **libtoxcore** is not included in the gem. It should be compiled manually
to build the gem native extension successfully (see the instructions below)
* JRuby is not supported. Only C extension for Tox is implemented
* Message length is limited to value of `TOX_MAX_MESSAGE_LENGTH`
(see [source code of **libtoxcore**](https://github.com/irungentoo/toxcore/blob/2ab3b14731061cc04d3ccc50a35093c11d018298/toxcore/tox.h#L252-L255))
* Adapter has incomplete API for Lita. Only basic methods are implemented
Usage
-----
At first, see the documentation for Lita: http://docs.lita.io/
### Installation
**libtoxcore** should be compiled manually at your computer or server.
Follow the instructions at
[that file](https://github.com/irungentoo/toxcore/blob/2ab3b14731061cc04d3ccc50a35093c11d018298/INSTALL.md)
When **libtoxcore** is installed, add **lita-tox**
to your Lita instance's Gemfile:
```ruby
gem 'lita-tox', '~> 0.0.0'
```
### Configuration
No configuration is needed. You only have to specify adapter as `:tox`
#### Example
This is an example `lita_config.rb` file:
```ruby
Lita.configure do |config|
config.robot.name = 'Lita'
config.robot.mention_name = 'lita'
config.robot.adapter = :tox
end
```