Module: ActiveRecordPostgresqlXverify

Defined in:
lib/active_record_postgresql_xverify/utils.rb,
lib/active_record_postgresql_xverify/config.rb,
lib/active_record_postgresql_xverify/logger.rb,
lib/active_record_postgresql_xverify/version.rb,
lib/active_record_postgresql_xverify/verifier.rb,
lib/active_record_postgresql_xverify/constants.rb,
lib/active_record_postgresql_xverify/error_handler.rb,
lib/active_record_postgresql_xverify/verifiers/aurora_master.rb

Defined Under Namespace

Modules: ErrorHandler, Utils, Verifier, Verifiers

Constant Summary collapse

VERSION =
'0.1.1'
EXTEND_VERIFY_FLAG =
"#{ActiveRecordPostgresqlXverify}_EXTEND_VERIFY_FLAG"

Class Method Summary collapse

Class Method Details

.handle_ifObject



15
16
17
# File 'lib/active_record_postgresql_xverify/config.rb', line 15

def handle_if
  @config.fetch(:handle_if)
end

.handle_if=(proc) ⇒ Object



11
12
13
# File 'lib/active_record_postgresql_xverify/config.rb', line 11

def handle_if=(proc)
  @config[:handle_if] = proc
end

.loggerObject



5
6
7
8
9
10
11
# File 'lib/active_record_postgresql_xverify/logger.rb', line 5

def logger
  @logger ||= if defined?(Rails)
                Rails.logger || ActiveRecord::Base.logger || Logger.new($stderr)
              else
                ActiveRecord::Base.logger || Logger.new($stderr)
              end
end

.only_on_errorObject



31
32
33
# File 'lib/active_record_postgresql_xverify/config.rb', line 31

def only_on_error
  @config.fetch(:only_on_error)
end

.only_on_error=(bool) ⇒ Object



27
28
29
# File 'lib/active_record_postgresql_xverify/config.rb', line 27

def only_on_error=(bool)
  @config[:only_on_error] = bool
end

.verifyObject



23
24
25
# File 'lib/active_record_postgresql_xverify/config.rb', line 23

def verify
  @config.fetch(:verify)
end

.verify=(proc) ⇒ Object



19
20
21
# File 'lib/active_record_postgresql_xverify/config.rb', line 19

def verify=(proc)
  @config[:verify] = proc
end