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


Defined Under Namespace

Modules: Obfuscator, Password, YAML

Constant Summary collapse

VERSION =
'5.5.1'

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.



38
39
40
41
42
43
# File 'lib/ndr_support/date_and_time_extensions.rb', line 38

def apply_era_date_formats!
  update_date_formats!
  update_time_formats!

  attempt_date_patch!
end

.attempt_date_patch!Object



45
46
47
48
49
50
# File 'lib/ndr_support/date_and_time_extensions.rb', line 45

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