Module: NdrSupport

Defined in:
lib/ndr_support/version.rb,
lib/ndr_support.rb,
lib/ndr_support/password.rb,
lib/ndr_support/obfuscator.rb,
lib/ndr_support/password/constants.rb,
lib/ndr_support/date_and_time_extensions.rb,
lib/ndr_support/yaml/serialization_migration.rb

Overview

NdrSupport module

Defined Under Namespace

Modules: Obfuscator, Password, YAML

Constant Summary collapse

VERSION =
'5.10.4'

Class Method Summary collapse

Class Method Details

.apply_era_date_formats!Object

Within the NDR, we change default date formatting, as below. This can cause problems with YAML emitted by syck, so we have to patch Date#to_yaml too.



105
106
107
108
109
110
# File 'lib/ndr_support/date_and_time_extensions.rb', line 105

def apply_era_date_formats!
  update_date_formats!
  update_time_formats!

  attempt_date_patch!
end

.attempt_date_patch!Object



112
113
114
115
116
117
# File 'lib/ndr_support/date_and_time_extensions.rb', line 112

def attempt_date_patch!
  # There are potential load order issues with this patch,
  # as it needs to be applied once syck has loaded.
  fail('Date#to_yaml must exist to be patched!') unless Date.respond_to?(:to_yaml)
  apply_date_patch!
end