diaspora_federation/README.md
2015-11-30 01:07:32 +01:00

2.9 KiB

diaspora* federation library

A library that provides functionalities needed for the diaspora federation protocol*

master: Build Status master develop: Build Status develop Code Climate Test Coverage Dependency Status Inline docs Gem Version

Documentation | Bugtracker

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:

gem "diaspora_federation-rails"

Mount the routes in your config/routes.rb:

mount DiasporaFederation::Engine => "/"

Configure the engine in config/initializers/diaspora_federation.rb:

DiasporaFederation.configure do |config|
  # the pod url
  config.server_uri = AppConfig.pod_uri

  config.define_callbacks do
    on :fetch_person_for_webfinger do |diaspora_id|
      person = Person.find_local_by_diaspora_id(diaspora_id)
      if person
        DiasporaFederation::Discovery::WebFinger.new(
          # ...
        )
      end
    end

    on :fetch_person_for_hcard do |guid|
      # ...
    end
  end
end

Development

!!! This gem is currently under heavy development, so every release can contain breaking changes !!!

If you want to help, please contact me, help is welcome.

After the first stable release, this repo will be moved to the diaspora organization.

Diaspora

A privacy-aware, distributed, open source social network

Links: Project site | Wiki

License

This gem is published under the terms of the "GNU Affero General Public License". See the LICENSE file for the exact wording.