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

move toml dependency to avoid toml missing when not needing ldap feature #370

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gilwi
Copy link

@gilwi gilwi commented Jun 27, 2024

Pull Request (PR) description

This pull request tries to address installing the module in a restricted environment (no gem install available for toml) without failing as the LDAP feature is not needed in my scenario.

This Pull Request (PR) fixes the following issues

Fixes #338

@@ -156,6 +155,7 @@ def generate
end

def eval_generate
require 'toml'
Copy link
Member

Choose a reason for hiding this comment

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

@joshcooper do you know if it's a good idea to move the require for an external gem into the eval_generate method?

Choose a reason for hiding this comment

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

@bastelfreak that should be fine, as long as that's the first code path that attempt use use toml. Alternatively, if you implement the pre_run_check lifecycle method then you could require it there.

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.

Toml gem required even when not using ldap_cfg
3 participants