Sha256: bc457f588859fdf0a6728467795cb314f8ee62e4a05f893883f9fc98d9e6cd12

Contents?: true

Size: 873 Bytes

Versions: 37

Compression:

Stored size: 873 Bytes

Contents

require 'active_support/core_ext/module/delegation'
require 'active_support/core_ext/module/attribute_accessors'

module Cmor
  module System
    module Backend
      module Configuration
        def configure
          yield self
        end

        mattr_accessor(:registered_controllers) { -> {[]} }
        mattr_accessor(:registered_services) { -> {[]} }
        mattr_accessor(:enable_active_storage_backend) { false }
        mattr_accessor(:enable_delayed_job_backend) { false }
        mattr_accessor(:record_factory_name) { 'user' }

        def self.registered_controllers
          rc = @@registered_controllers.call
          rc.reject! { |c| c.name =~ /.*ActiveStorage.*/ } unless enable_active_storage_backend
          rc.reject! { |c| c.name =~ /.*Delayed.*/ } unless enable_delayed_job_backend
          -> { rc }
        end
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
cmor_system_backend-0.0.43.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.42.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.41.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.40.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.39.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.38.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.37.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.36.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.35.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.34.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.33.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.32.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.31.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.30.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.29.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.28.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.27.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.26.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.25.pre lib/cmor/system/backend/configuration.rb
cmor_system_backend-0.0.24.pre lib/cmor/system/backend/configuration.rb