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 config_context_list/hash in strict mode #57

Merged
merged 1 commit into from
Jun 13, 2018

Conversation

elyscape
Copy link
Contributor

Without this, config_context_list and config_context_hash are completely broken in strict mode:

irb(main):001:0> require 'mixlib/config'
=> true
irb(main):002:0> class Config
irb(main):003:1>   extend Mixlib::Config
irb(main):004:1>   config_strict_mode true
irb(main):005:1>   config_context_list :tests, :test do
irb(main):006:2*     default :x, 5
irb(main):007:2>   end
irb(main):008:1> end
Mixlib::Config::UnknownConfigOptionError: Reading unsupported config value symbol.

This fixes that.

@elyscape elyscape requested a review from a team May 21, 2018 22:22
@elyscape elyscape force-pushed the fix/complex-config-contexts branch from b780e44 to 5063ed2 Compare May 21, 2018 22:23
Copy link
Contributor

@thommay thommay left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@thommay thommay force-pushed the fix/complex-config-contexts branch from 5063ed2 to f9e5d76 Compare June 13, 2018 11:41
@thommay thommay merged commit 3330e08 into chef:master Jun 13, 2018
@thommay
Copy link
Contributor

thommay commented Jun 13, 2018

Thanks for your contribution, I've released this as 2.2.8.

@elyscape elyscape deleted the fix/complex-config-contexts branch June 13, 2018 19:02
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.

2 participants