update documentation
This commit is contained in:
parent
9925cbb99a
commit
3a7c2035ad
3 changed files with 40 additions and 5 deletions
39
README.md
39
README.md
|
|
@ -1,6 +1,6 @@
|
||||||
# diaspora* federation rails engine
|
# diaspora* federation library
|
||||||
|
|
||||||
**A rails engine that adds the diaspora* federation protocol to a rails app**
|
**a library that provides functionalities needed for the diaspora* federation protocol**
|
||||||
|
|
||||||
[](https://travis-ci.org/SuperTux88/diaspora_federation)
|
[](https://travis-ci.org/SuperTux88/diaspora_federation)
|
||||||
[](https://codeclimate.com/github/SuperTux88/diaspora_federation)
|
[](https://codeclimate.com/github/SuperTux88/diaspora_federation)
|
||||||
|
|
@ -12,6 +12,41 @@
|
||||||
[Documentation](http://www.rubydoc.info/gems/diaspora_federation/) |
|
[Documentation](http://www.rubydoc.info/gems/diaspora_federation/) |
|
||||||
[Bugtracker](https://github.com/SuperTux88/diaspora_federation/issues)
|
[Bugtracker](https://github.com/SuperTux88/diaspora_federation/issues)
|
||||||
|
|
||||||
|
## Library
|
||||||
|
|
||||||
|
The ```diaspora_federation``` gem provides the functionality for de-/serialization and de-/encryption of Entities
|
||||||
|
in the protocols used for communication among the various installations of Diaspora*
|
||||||
|
|
||||||
|
## Rails Engine
|
||||||
|
|
||||||
|
The ```diaspora_federation-rails``` gem is a rails engine that adds the diaspora* federation protocol to a rails app.
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
Add the gem to your ```Gemfile```:
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
gem "diaspora_federation-rails"
|
||||||
|
```
|
||||||
|
|
||||||
|
Mount the routes in your ```config/routes.rb```:
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
mount DiasporaFederation::Engine => "/"
|
||||||
|
```
|
||||||
|
|
||||||
|
Configure the engine in ```config/initializers/diaspora_federation.rb```:
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
DiasporaFederation.configure do |config|
|
||||||
|
# the pod url
|
||||||
|
config.server_uri = AppConfig.pod_uri
|
||||||
|
|
||||||
|
# the class to be used for a person
|
||||||
|
config.person_class = Person
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
**!!! This gem is currently under heavy development, so every release can contain breaking changes !!!**
|
**!!! This gem is currently under heavy development, so every release can contain breaking changes !!!**
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ module DiasporaFederation
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# configure the federation engine
|
# configure the federation library
|
||||||
#
|
#
|
||||||
# DiasporaFederation.configure do |config|
|
# DiasporaFederation.configure do |config|
|
||||||
# config.server_uri = "http://localhost:3000/"
|
# config.server_uri = "http://localhost:3000/"
|
||||||
|
|
@ -119,7 +119,7 @@ module DiasporaFederation
|
||||||
photo_large_url photo_medium_url photo_small_url
|
photo_large_url photo_medium_url photo_small_url
|
||||||
full_name first_name last_name
|
full_name first_name last_name
|
||||||
))
|
))
|
||||||
logger.info "successfully configured the federation engine"
|
logger.info "successfully configured the federation library"
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
module DiasporaFederation
|
module DiasporaFederation
|
||||||
##
|
##
|
||||||
# logging module for the diaspora federation engine
|
# logging module for the diaspora federation
|
||||||
#
|
#
|
||||||
# it uses the logging-gem if available
|
# it uses the logging-gem if available
|
||||||
module Logging
|
module Logging
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue