Sha256: b39a85e086e6faeee9c6eb20d239663f93bc5aacc493eb2d9d1bc132e25953c2

Contents?: true

Size: 942 Bytes

Versions: 17

Compression:

Stored size: 942 Bytes

Contents

module Notee
  module Configuration

    VALID_OPTIONS_KEY = [
      :notee_id,
      :notee_password,
      :recaptcha_key,
      :recaptcha_secret_key,
      :blog_meta,
      :google_analytics
    ].freeze

    # root-user
    DEFAULT_NOTEE_ID = nil
    DEFAULT_NOTEE_PASSWORD = nil

    # recaptcha
    DEFAULT_RECAPTCHA_KEY = nil
    DEFAULT_RECAPTCHA_SECRET_KEY = nil

    # blog
    DEFAULT_BLOG_META = nil

    # google-analytics
    DEFAULT_GOOGLE_ANALYTICS = nil


    attr_accessor *VALID_OPTIONS_KEY

    def configure
      yield self
    end

    def self.extended(base)
      base.reset
    end

    def reset
      self.notee_id = DEFAULT_NOTEE_ID
      self.notee_password = DEFAULT_NOTEE_PASSWORD
      self.recaptcha_key = DEFAULT_RECAPTCHA_KEY
      self.recaptcha_secret_key = DEFAULT_RECAPTCHA_SECRET_KEY
      self.blog_meta = DEFAULT_BLOG_META
      self.google_analytics = DEFAULT_GOOGLE_ANALYTICS
    end

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
notee-1.1.2.4 lib/notee/configuration.rb
notee-1.1.2.3 lib/notee/configuration.rb
notee-1.1.2.2 lib/notee/configuration.rb
notee-1.1.2.1 lib/notee/configuration.rb
notee-1.1.2 lib/notee/configuration.rb
notee-1.1.1 lib/notee/configuration.rb
notee-1.1.0 lib/notee/configuration.rb
notee-1.0.8 lib/notee/configuration.rb
notee-1.0.7 lib/notee/configuration.rb
notee-1.0.6 lib/notee/configuration.rb
notee-1.0.5 lib/notee/configuration.rb
notee-1.0.4 lib/notee/configuration.rb
notee-1.0.3 lib/notee/configuration.rb
notee-1.0.2 lib/notee/configuration.rb
notee-1.0.1 lib/notee/configuration.rb
notee-1.0.0 lib/notee/configuration.rb
notee-0.4.0 lib/notee/configuration.rb