No description
Find a file
Benjamin Neff b274cc3dad
Fix some validators for nil values
Using the real entities for the tests also uncovered some bugs where for
example empty strings are converted to nil and the validation wasn't
invalid in this case, but should be.
2018-02-14 01:50:39 +01:00
app/controllers/diaspora_federation Replace legacy webfinger with new route from .well-known 2017-05-29 00:43:39 +02:00
bin Fix bin/bundle 2017-05-20 17:04:34 +02:00
config Switch PercentLiteralDelimiters to new default 2017-06-30 02:23:44 +02:00
docs Remove participants limit for conversations 2018-01-18 02:50:04 +01:00
lib Fix some validators for nil values 2018-02-14 01:50:39 +01:00
spec Fix some validators for nil values 2018-02-14 01:50:39 +01:00
test Bump dependency gems and update gemfiles 2018-02-09 21:50:02 +01: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 Fix typo in rspec-persistence.txt 2017-04-05 00:36:52 +02:00
.rspec WIP: move test dependencies to gemspec 2015-06-24 03:09:14 +02:00
.rubocop.yml Bump rubocop 2018-01-18 04:00:20 +01:00
.ruby-gemset initial commit 2015-06-10 03:13:44 +02:00
.ruby-version Add ruby 2.4 2017-01-19 01:53:07 +01:00
.travis.yml Bump ruby versions on travis and add ruby 2.5 2018-01-19 01:48:07 +01:00
.yardopts add changelog to gems and documentation 2016-07-14 20:02:46 +02:00
Changelog.md Update changelog for 0.2.3 2018-01-27 02:09:16 +01:00
CONTRIBUTING.md Fix type in CONTRIBUTING.md 2017-08-27 02:45:23 +02:00
COPYRIGHT Add AGPL-3.0 license text 2017-02-12 20:56:37 +01:00
diaspora_federation-json_schema.gemspec Add DiasporaFederation::Schemas to access JSON schema 2017-08-01 20:17:55 +02:00
diaspora_federation-rails.gemspec Only set actionpack as dependency for diaspora_federation-rails 2017-04-05 00:36:52 +02:00
diaspora_federation-test.gemspec Fix overly strict dependencies 2017-09-16 04:36:29 +02:00
diaspora_federation.gemspec Bump faraday 2018-01-26 23:37:45 +01:00
Gemfile Bump rubocop 2018-01-18 04:00:20 +01:00
Gemfile.lock Bump dependency gems and update gemfiles 2018-02-09 21:50:02 +01:00
Guardfile add guard-rubocop 2016-01-16 00:31:02 +01:00
LICENSE Add AGPL-3.0 license text 2017-02-12 20:56:37 +01:00
Rakefile Make rspec work without rails dependency 2017-04-05 02:02:04 +02:00
README.md Use https link for protocol documentation link 2017-01-05 01:19:18 +01: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

Gem Documentation | Protocol 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.