Sha256: f2c0b352c80a2b48a9f32822d8cce51f860fd1d54a9b3e578fe71666c1a282b4

Contents?: true

Size: 1.96 KB

Versions: 6

Compression:

Stored size: 1.96 KB

Contents

require 'rails_base/configuration/base'

module RailsBase
  module Configuration
    class App < Base
      DEFAULT_VALUES = {
        base_url: {
          type: :string,
          default: ENV.fetch('BASE_URL', 'http://localhost'),
          description: 'Base url. Used for things like SSO.'
        },
        base_port: {
          type: :string_nil,
          default: ENV.fetch('BASE_URL_PORT', nil),
          description: 'Base port. Used for things like SSO.'
        },
        web_name_logged_in: {
          type: :string_proc,
          default: ->(user) { Rails.application.class.parent_name },
          description: 'Name of the application when authenticated user is present. Name in the tab of the browser. Allows for dynamic tab names'
        },
        web_name_logged_out: {
          type: :string_proc,
          default: ->(*) { Rails.application.class.parent_name },
          description: 'Name of the application when no authenticated user. Name in the tab of the browser. Allows for dynamic tab names'
        },
        web_title_logged_in: {
          type: :string_proc,
          default: ->(user) { Rails.application.class.parent_name },
          description: 'Title in nav for the web when logged in. String or proc accepted. When proc, current user will be passed in.'
        },
        web_title_logged_out: {
          type: :string_proc,
          default: ->(*) { Rails.application.class.parent_name },
          description: 'Title in nav for the web when logged in. String or proc accepted. When proc, current user will be passed in.'
        },
        communication_name: {
          type: :string_proc,
          default: ->(*) { Rails.application.class.parent_name },
          description: 'Name used when communicating with users.'
        },
        favicon_path: {
          type: :string_nil,
          default: 'rails_base/favicon.ico',
          description: 'Favicon path'
        },
      }

      attr_accessor *DEFAULT_VALUES.keys
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails_base-0.53.0 lib/rails_base/configuration/app.rb
rails_base-0.52.3 lib/rails_base/configuration/app.rb
rails_base-0.52.1 lib/rails_base/configuration/app.rb
rails_base-0.52.0 lib/rails_base/configuration/app.rb
rails_base-0.51.1 lib/rails_base/configuration/app.rb
rails_base-0.51.0 lib/rails_base/configuration/app.rb