Sha256: 60069191495d4f1a619bf4fef678f105c75f2924351bf7bd1cc1fd21ca336fa3

Contents?: true

Size: 694 Bytes

Versions: 1

Compression:

Stored size: 694 Bytes

Contents

module Calagator
  class Engine < ::Rails::Engine
    isolate_namespace Calagator

    config.before_initialize do
      # Read secrets
      require 'secrets_reader'
      ::SECRETS = SecretsReader.read
    end
  end

  # settings with defaults
  class << self
    mattr_accessor :title, :tagline, :url, :venues_map_options, :blacklist_patterns

    self.title = 'Calagator'
    self.tagline = 'A Tech Calendar'
    self.url = 'http://my-calagator.org/'
    self.venues_map_options = {}
    self.blacklist_patterns = [
      /\b(online|overseas).+(drugstore|pharmacy)\b/,
      /\bcialis\b/,
    ]

    # map the attrs from initializer
    def setup(&block)
      yield self
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
calagator-0.0.1.pre1 lib/calagator/engine.rb