Skip to content

v1.7.1

Latest

Choose a tag to compare

@Ezveus Ezveus released this 28 Apr 13:47

The boot-resilience release. Hardens the gem against several boot-time crash paths so that information gathering and configuration generation can never prevent the host application from starting.

Fixes

  • Fix initialize_from_database when the database is unreachable on Rails 7.1+. Connections are now established lazily at query time, so errors surface from select_value as ActiveRecord::StatementInvalid or adapter-level errors (e.g. PG::ConnectionBad) that don't inherit from ActiveRecordError. The rescue is broadened to StandardError so that DB metadata collection never prevents the application from booting (e.g. running bin/rails db:create on a fresh checkout).
  • Guard Modulorails::Data#initialize_from_configuration against a missing config.name: fall back to the Rails application class name and use safe navigation when deriving @environment_name, so a forgotten config.name '...' no longer crashes the boot with NoMethodError: undefined method 'parameterize' for nil.
  • Move the body construction in Modulorails.send_data inside its begin/rescue block so that an unexpected failure in Modulorails::Data.new (e.g. a malformed configuration) is caught instead of bubbling out of after_initialize and breaking Rails boot.