Module: Federails::Configuration
- Defined in:
- lib/federails/configuration.rb
Overview
Stores the Federails configuration in a singleton.
Constant Summary collapse
- @@app_name =
nil- @@app_version =
nil- @@force_ssl =
nil- @@site_host =
nil- @@site_port =
nil- @@enable_discovery =
true- @@open_registrations =
false- @@nodeinfo_metadata =
{}
- @@app_layout =
nil- @@server_routes_path =
:federation- @@client_routes_path =
:app- @@base_client_controller =
'ActionController::Base'- @@remote_follow_url_method =
'federails.new_client_following_url'- @@remote_entities_cache_duration =
1.day
- @@job_queue =
:default- @@actor_types =
{}
- @@data_types =
{}
Class Method Summary collapse
- .nodeinfo_metadata ⇒ Object
- .open_registrations ⇒ Object
- .register_actor_class(klass, config = {}) ⇒ Object
- .register_data_type(klass, config = {}) ⇒ Object
-
.remote_follow_url_method ⇒ Object
Route method for remote-following requests.
-
.remote_follow_url_method=(value) ⇒ Object
Sets the route method for remote-following requests.
- .site_host=(value) ⇒ Object
- .site_port=(value) ⇒ Object
Class Method Details
.nodeinfo_metadata ⇒ Object
42 43 44 |
# File 'lib/federails/configuration.rb', line 42 def self. @@nodeinfo_metadata.is_a?(Proc) ? @@nodeinfo_metadata.call : @@nodeinfo_metadata end |
.open_registrations ⇒ Object
34 35 36 |
# File 'lib/federails/configuration.rb', line 34 def self.open_registrations @@open_registrations.is_a?(Proc) ? @@open_registrations.call : @@open_registrations end |
.register_actor_class(klass, config = {}) ⇒ Object
106 107 108 |
# File 'lib/federails/configuration.rb', line 106 def self.register_actor_class(klass, config = {}) @@actor_types[klass.name] = config.merge(class: klass) end |
.register_data_type(klass, config = {}) ⇒ Object
114 115 116 |
# File 'lib/federails/configuration.rb', line 114 def self.register_data_type(klass, config = {}) @@data_types[klass.name] = config.merge(class: klass) end |
.remote_follow_url_method ⇒ Object
Route method for remote-following requests
|
|
# File 'lib/federails/configuration.rb', line 62
|
.remote_follow_url_method=(value) ⇒ Object
Sets the route method for remote-following requests
The route should lead to a page displaying the remote actor and a button to follow it. Remote actor is specified in the uri query parameter.
Its value defaults to a route of the Federails client, so your application will break if you don’t use the client routes and don’t override this value.
79 |
# File 'lib/federails/configuration.rb', line 79 mattr_accessor :remote_follow_url_method |