No description
Find a file
2016-06-26 03:37:48 +02:00
app/controllers/diaspora_federation use shorter callback keys for key-callbacks 2016-03-29 02:42:19 +02:00
bin bump spring 2015-12-27 22:19:58 +01:00
config add initializer to filter xml parameter from logging 2016-06-21 05:50:09 +02:00
lib profile_url and atom_url are optional in webfinger 2016-06-25 00:12:37 +02:00
spec profile_url and atom_url are optional in webfinger 2016-06-25 00:12:37 +02:00
test/dummy fix rubocop offenses for rubocop 0.40.0 2016-05-11 02:22:48 +02:00
.codeclimate.yml add .codeclimate.yml 2015-06-25 02:23:59 +02:00
.editorconfig add .editorconfig 2015-06-19 01:05:06 +02:00
.envrc add .envrc for direnv 2015-06-23 01:09:56 +02:00
.gitignore add jekyll temp files to .gitignore 2016-06-24 06:56:10 +02:00
.rspec WIP: move test dependencies to gemspec 2015-06-24 03:09:14 +02:00
.rubocop.yml bump rubocop and pronto-rubocop 2016-01-19 01:32:22 +01:00
.ruby-gemset initial commit 2015-06-10 03:13:44 +02:00
.ruby-version initial commit 2015-06-10 03:13:44 +02:00
.travis.yml drop ruby 2.0 support 2016-06-20 03:48:35 +02:00
.yardopts use yard from github, to fix an error with private_class_method 2016-06-20 07:37:28 +02:00
CONTRIBUTING.md Overhaul README, add contributing notes. 2016-06-26 03:37:48 +02:00
diaspora_federation-rails.gemspec move repo into the diaspora organization 2016-06-26 03:16:14 +02:00
diaspora_federation-test.gemspec move repo into the diaspora organization 2016-06-26 03:16:14 +02:00
diaspora_federation.gemspec move repo into the diaspora organization 2016-06-26 03:16:14 +02:00
Gemfile use yard from github, to fix an error with private_class_method 2016-06-20 07:37:28 +02:00
Gemfile.lock use yard from github, to fix an error with private_class_method 2016-06-20 07:37:28 +02:00
Guardfile add guard-rubocop 2016-01-16 00:31:02 +01:00
LICENSE use host-meta xml generator from raven24's gem 2015-06-17 04:45:37 +02:00
Rakefile split rails part into separate gem 2015-07-04 20:01:37 +02:00
README.md Overhaul README, add contributing notes. 2016-06-26 03:37:48 +02:00

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

This repository contains two gems:

  • diaspora_federation provides the functionality for de-/serialization and de-/encryption of Entities in the protocols used for communication among the various installations of diaspora*.
  • diaspora_federation-rails 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

Contributing

See our contribution guide for more information on how to contribute to the diaspora* federation library.

License

GNU Affero General Public License.