Last active
August 29, 2015 14:18
-
-
Save patrobinson/3ff278f264fdb1384a87 to your computer and use it in GitHub Desktop.
Get Puppet 2.7 to work with Ruby 1.9
This file contains 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
# I can't believe I'm doing this horrible hack, but Puppet 2.7 doesn't support | |
# Ruby versions above 1.8.7. Due to all the testing requirements | |
# we need to run Ruby 1.9.3. The only bug I've hit so far with Puppet 2.7 | |
# and Ruby 1.9.3 is the lack of a "collect" method for a String | |
# which just needs to return an array of itself | |
# Turns out this is an undocumented feature in Ruby 1.8 | |
# | |
# Add this to your spec_helper.rb file for use with rspec-puppet | |
class String | |
def collect | |
[self] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment