Sha256: b3acaf731aee91b7dda9596cfaff26db39f8a9eb948d08019f644e289baa81f2

Contents?: true

Size: 506 Bytes

Versions: 1

Compression:

Stored size: 506 Bytes

Contents

require 'active_support/configurable'

module SqlTracker
  class Config
    include ActiveSupport::Configurable
    config_accessor :tracked_paths, :tracked_sql_command, :output_path, :enabled

    class << self
      def apply_defaults
        self.enabled = enabled.nil? ? true : enabled
        self.tracked_paths ||= %w(app lib)
        self.tracked_sql_command ||= %w(SELECT INSERT UPDATE DELETE)
        self.output_path ||= File.join(Rails.root.to_s, 'tmp')
        self
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sql_tracker-1.0.1 lib/sql_tracker/config.rb