(#22474) Update forge/repository.rb to conditionally include zlib#1886
Merged
adrienthebo merged 1 commit intopuppetlabs:stablefrom Sep 11, 2013
haus:ticket/stable/22474_conditionally_require_zlib
Merged
(#22474) Update forge/repository.rb to conditionally include zlib#1886adrienthebo merged 1 commit intopuppetlabs:stablefrom haus:ticket/stable/22474_conditionally_require_zlib
adrienthebo merged 1 commit intopuppetlabs:stablefrom
haus:ticket/stable/22474_conditionally_require_zlib
Conversation
Previously using the --no-zlib flag or using puppet on a ruby without zlib support would result in a load error and stacktrace, because lib/puppet/forge/repository.rb requires zlib and uses a constant defined by Zlib. This commit updates repository.rb to only require zlib and use its constant if the zlib feature is available and the --no-zlib flag was not passed (zlib is enabled by default in defaults.rb). With this commit running puppet on a ruby without zlib does not throw a stacktrace or other error related to zlib.
Contributor
Author
|
Note: I tried making a test for this, but it is very hard to test at the spec level because the spec_helper has a require on puppet, which loads zlib. If there is a way of testing this that I am missing, I am all ears. |
|
CLA signed by all contributors. |
adrienthebo
added a commit
that referenced
this pull request
Sep 11, 2013
…require_zlib (#22474) Update forge/repository.rb to conditionally include zlib
Contributor
|
summary: merged into stable in 1188879; this should be released in 3.3.1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously using the --no-zlib flag or using puppet on a ruby without zlib
support would result in a load error and stacktrace, because
lib/puppet/forge/repository.rb requires zlib and uses a constant defined by
Zlib. This commit updates repository.rb to only require zlib and use its
constant if the zlib feature is available and the --no-zlib flag was not passed
(zlib is enabled by default in defaults.rb).
With this commit running puppet on a ruby without zlib does not throw a
stacktrace or other error related to zlib.