diff --git a/README.md b/README.md index 0ec53fa..98459c3 100644 --- a/README.md +++ b/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** [![Build Status](https://travis-ci.org/SuperTux88/diaspora_federation.svg?branch=master)](https://travis-ci.org/SuperTux88/diaspora_federation) [![Code Climate](https://codeclimate.com/github/SuperTux88/diaspora_federation/badges/gpa.svg)](https://codeclimate.com/github/SuperTux88/diaspora_federation) @@ -12,6 +12,41 @@ [Documentation](http://www.rubydoc.info/gems/diaspora_federation/) | [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 **!!! This gem is currently under heavy development, so every release can contain breaking changes !!!** diff --git a/lib/diaspora_federation.rb b/lib/diaspora_federation.rb index 9ef554e..fb78cdc 100644 --- a/lib/diaspora_federation.rb +++ b/lib/diaspora_federation.rb @@ -96,7 +96,7 @@ module DiasporaFederation end ## - # configure the federation engine + # configure the federation library # # DiasporaFederation.configure do |config| # config.server_uri = "http://localhost:3000/" @@ -119,7 +119,7 @@ module DiasporaFederation photo_large_url photo_medium_url photo_small_url full_name first_name last_name )) - logger.info "successfully configured the federation engine" + logger.info "successfully configured the federation library" end private diff --git a/lib/diaspora_federation/logging.rb b/lib/diaspora_federation/logging.rb index 9c1755b..96607b5 100644 --- a/lib/diaspora_federation/logging.rb +++ b/lib/diaspora_federation/logging.rb @@ -1,6 +1,6 @@ module DiasporaFederation ## - # logging module for the diaspora federation engine + # logging module for the diaspora federation # # it uses the logging-gem if available module Logging