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
- @@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'
- @@actor_types =
{}
- @@data_types =
{}
Class Method Summary collapse
- .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
.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
88 89 90 |
# File 'lib/federails/configuration.rb', line 88 def self.register_actor_class(klass, config = {}) @@actor_types[klass.name] = config.merge(class: klass) end |
.register_data_type(klass, config = {}) ⇒ Object
96 97 98 |
# File 'lib/federails/configuration.rb', line 96 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 54
|
.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.
71 |
# File 'lib/federails/configuration.rb', line 71 mattr_accessor :remote_follow_url_method |