No description
Before we only tested with the latest rails version and without rails, that made it possible to accidentally break with older rails versions without noticing it. The old way of keeping separate Gemfiles (and lockfiles) was too complicated to keep up to date, especially with many supported rails versions. This allows now to run with different rails version with just the same Gemfile using an env-var. For CI the Gemfile.lock is only used for the latest rails version (7.0 at the moment), as it obviously doesn't fit for other versions. I think that's fine, as if we are not compatible with a too new version of something, we need to add a maximum version there anyway. The `ruby/setup-ruby@v1` step automatically uses the deployment mode when a Gemfile.lock is present, so the `BUNDLE_FROZEN` env-var is not required, even if a Gemfile.lock is used. |
||
|---|---|---|
| .github/workflows | ||
| app/controllers/diaspora_federation | ||
| bin | ||
| config | ||
| docs | ||
| lib | ||
| spec | ||
| test | ||
| .codeclimate.yml | ||
| .editorconfig | ||
| .gitignore | ||
| .rspec | ||
| .rubocop.yml | ||
| .ruby-gemset | ||
| .ruby-version | ||
| .yardopts | ||
| Changelog.md | ||
| CONTRIBUTING.md | ||
| COPYRIGHT | ||
| diaspora_federation-json_schema.gemspec | ||
| diaspora_federation-rails.gemspec | ||
| diaspora_federation-test.gemspec | ||
| diaspora_federation.gemspec | ||
| Gemfile | ||
| Gemfile.lock | ||
| LICENSE | ||
| Rakefile | ||
| README.md | ||
diaspora* federation library
A library that provides functionalities needed for the diaspora* federation protocol
Gem Documentation | Protocol Documentation | Bugtracker
This repository contains two gems:
diaspora_federationprovides the functionality for de-/serialization and de-/encryption of Entities in the protocols used for communication among the various installations of diaspora*.diaspora_federation-railsis 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.