diaspora_federation-json_schema

1.1.0last stable release 2 years ago
Complexity Score
Medium
Open Issues
10
Dependent Projects
0
Weekly Downloadsglobal
28

License

  • AGPL-3.0
    • Yesattribution
    • Copyleftlinking
    • Copyleftdistribution
    • Copyleftmodification
    • Yesprivate use

Downloads

Readme

diaspora* federation library

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

master: | develop:

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.

Dependencies

No runtime dependency information found for this package.

CVE IssuesActive
0
Scorecards Score
3.20
Test Coverage
100.00%
Follows Semver
Yes
Github Stars
101
Dependenciestotal
0
DependenciesOutdated
0
DependenciesDeprecated
0
Threat Modelling
No
Repo Audits
No

Learn how to distribute diaspora_federation-json_schema in your own private RubyGems registry

gem install diaspora_federation-json_schema
Processing...
Done

13 Releases

RubyGems on Cloudsmith

Getting started with RubyGems on Cloudsmith is fast and easy.