No description
Find a file
Benjamin Neff 68df3cf555
Remove support for ruby 2.1, 2.2, 2.3 and 2.4, add 2.6 instead
all older than 2.3 are already EOL and 2.4 will be EOL soon and the next
diaspora major version will already depend on newer versions, so we can
already remove it now.
2019-10-21 03:11:12 +02: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 Allow fetching of posts with dot in the GUID 2018-10-05 00:57:11 +02:00
docs Merge pull request #110 from diaspora/cmrd-senya-patch-1 2019-04-28 12:27:04 +02:00
lib Remove support for ruby 2.1, 2.2, 2.3 and 2.4, add 2.6 instead 2019-10-21 03:11:12 +02:00
spec Remove rails 4 support 2019-10-21 03:11:12 +02:00
test Remove rails 4 support 2019-10-21 03:11:12 +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
.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 Remove support for ruby 2.1, 2.2, 2.3 and 2.4, add 2.6 instead 2019-10-21 03:11:12 +02:00
.ruby-gemset initial commit 2015-06-10 03:13:44 +02:00
.ruby-version Remove support for ruby 2.1, 2.2, 2.3 and 2.4, add 2.6 instead 2019-10-21 03:11:12 +02:00
.travis.yml Remove support for ruby 2.1, 2.2, 2.3 and 2.4, add 2.6 instead 2019-10-21 03:11:12 +02:00
.yardopts add changelog to gems and documentation 2016-07-14 20:02:46 +02:00
Changelog.md Merge pull request #110 from diaspora/cmrd-senya-patch-1 2019-04-28 12:27:04 +02: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 Bump rubocop 2018-03-05 23:33:46 +01:00
diaspora_federation-rails.gemspec Remove support for ruby 2.1, 2.2, 2.3 and 2.4, add 2.6 instead 2019-10-21 03:11:12 +02:00
diaspora_federation-test.gemspec Remove support for ruby 2.1, 2.2, 2.3 and 2.4, add 2.6 instead 2019-10-21 03:11:12 +02:00
diaspora_federation.gemspec Remove support for ruby 2.1, 2.2, 2.3 and 2.4, add 2.6 instead 2019-10-21 03:11:12 +02:00
Gemfile Bump pronto-rubocop 2018-10-05 00:46:17 +02:00
Gemfile.lock Remove rails 4 support 2019-10-21 03:11:12 +02: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 Bump rubocop 2018-03-05 23:33:46 +01:00
README.md Fix server_uri in README 2018-08-25 01:05:50 +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 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 = URI("http://localhost:3000")

  # ... other settings

  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(
          # ... copy person attributes to WebFinger object
        )
      end
    end

    on :fetch_person_for_hcard do |guid|
      # ... fetch hcard information
    end

    # ... other callbacks
  end
end

The available config settings can be found here and the callbacks are listed here in the gem documentation.

Contributing

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

License

GNU Affero General Public License.