Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diaspora/diaspora_federation
A library that provides functionalities needed for the diaspora* federation protocol.
https://github.com/diaspora/diaspora_federation
diaspora documentation engine federation federation-library federation-protocol hacktoberfest protocol rails ruby
Last synced: 4 days ago
JSON representation
A library that provides functionalities needed for the diaspora* federation protocol.
- Host: GitHub
- URL: https://github.com/diaspora/diaspora_federation
- Owner: diaspora
- License: agpl-3.0
- Created: 2015-06-10T01:08:15.000Z (over 9 years ago)
- Default Branch: develop
- Last Pushed: 2023-06-15T23:30:42.000Z (over 1 year ago)
- Last Synced: 2024-03-26T02:19:33.346Z (10 months ago)
- Topics: diaspora, documentation, engine, federation, federation-library, federation-protocol, hacktoberfest, protocol, rails, ruby
- Language: Ruby
- Homepage:
- Size: 4.59 MB
- Stars: 100
- Watchers: 28
- Forks: 29
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - diaspora/diaspora_federation - A library that provides functionalities needed for the diaspora* federation protocol. (hacktoberfest)
README
# diaspora* federation library
### A library that provides functionalities needed for the diaspora\* federation protocol**master:** [![Build Status master](https://travis-ci.org/diaspora/diaspora_federation.svg?branch=master)](https://travis-ci.org/diaspora/diaspora_federation) |
**develop:** [![Build Status develop](https://travis-ci.org/diaspora/diaspora_federation.svg?branch=develop)](https://travis-ci.org/diaspora/diaspora_federation)[![Code Climate](https://codeclimate.com/github/diaspora/diaspora_federation/badges/gpa.svg)](https://codeclimate.com/github/diaspora/diaspora_federation)
[![Test Coverage](https://codeclimate.com/github/diaspora/diaspora_federation/badges/coverage.svg)](https://codeclimate.com/github/diaspora/diaspora_federation/coverage)
[![Inline docs](https://inch-ci.org/github/diaspora/diaspora_federation.svg?branch=master)](https://inch-ci.org/github/diaspora/diaspora_federation)
[![Gem Version](https://badge.fury.io/rb/diaspora_federation.svg)](https://badge.fury.io/rb/diaspora_federation)[Gem Documentation](http://www.rubydoc.info/gems/diaspora_federation/) |
[Protocol Documentation](https://diaspora.github.io/diaspora_federation/) |
[Bugtracker](https://github.com/diaspora/diaspora_federation/issues)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```:
```ruby
gem "diaspora_federation-rails"
```Mount the routes in your ```config/routes.rb```:
```ruby
mount DiasporaFederation::Engine => "/"
```Configure the engine in ```config/initializers/diaspora_federation.rb```:
```ruby
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
endon :fetch_person_for_hcard do |guid|
# ... fetch hcard information
end# ... other callbacks
end
end
```The available config settings can be found [here](https://www.rubydoc.info/gems/diaspora_federation/DiasporaFederation#class_attr_details) and the callbacks are listed [here](https://www.rubydoc.info/gems/diaspora_federation/DiasporaFederation#define_callbacks-class_method) in the gem documentation.
## Contributing
See [our contribution guide](/CONTRIBUTING.md) for more information on how to contribute to the diaspora\* federation library.
## License
[GNU Affero General Public License](/LICENSE).