You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The main idea is to add support for the Rails built-in environment variable SECRET_KEY_BASE_DUMMY. If a user has added this variable, we skip any kind of validations for required attributes. This could be useful for executing bundle exec rails assets:precompile in CI/CD pipelines.
Describe the solution you'd like
As far as I can see (I'm not very familiar with the gem's codebase), we could add an additional condition to the validate_required_attributes method:
defvalidate_required_attributes!self.class.required_attributes.selectdo |name|
val=values.dig(*name.to_s.split(".").map(&:to_sym))val.nil? || (val.is_a?(String) && val.empty?)end.thendo |missing|
nextifmissing.empty? || ENV['SECRET_KEY_BASE_DUMMY'].present? <- Addvalidationhereraise_validation_error"The following config parameters for `#{self.class.name}(config_name: #{self.class.config_name})` are missing or empty: #{missing.join(", ")}"endend
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The main idea is to add support for the Rails built-in environment variable
SECRET_KEY_BASE_DUMMY
. If a user has added this variable, we skip any kind of validations for required attributes. This could be useful for executingbundle exec rails assets:precompile
in CI/CD pipelines.Describe the solution you'd like
As far as I can see (I'm not very familiar with the gem's codebase), we could add an additional condition to the
validate_required_attributes
method:Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: