Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the error with accessing a non-existent attribute in the config #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AnotherRegularDude
Copy link

Changes

Fixes

  • Fixed an error that occurred when checking for the existence of attributes (before_fork_callbacks, after_fork_callbacks) in the config: when checking the value for nil, we can get a NoMethodError if no one has set this attribute before.

@AnotherRegularDude
Copy link
Author

Any review, pease 🙏

Logs with NoMethodError is very annoying and gem doesn't work as expected in some cases.

@@ -18,6 +18,7 @@
require_relative 'simplecov_helper'
require 'bigcommerce/prometheus'
require 'pry'
require 'rails'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gem is used in non-rails systems, so we shouldn't pull in this dependency here.

@@ -36,6 +36,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'bundler-audit', '>= 0.6'
spec.add_development_dependency 'null-logger', '>= 0.1'
spec.add_development_dependency 'pry', '>= 0.12'
spec.add_development_dependency 'railties', '>= 6.0.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gem supports Rails 5.2+, so we'll need to not limit this to 6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants