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

Initial refactoring of yumrepo. #2086

Merged
merged 7 commits into from Feb 14, 2014

Replace .select! with delete_if for ruby 1.8.7

  • Loading branch information...
Ashley Penney
Ashley Penney committed Feb 10, 2014
commit 601b0fa77d63dd918d8f5373d29c2a45f5fc1efb
@@ -45,7 +45,9 @@ def self.reposdir(conf='/etc/yum.conf', dirs=['/etc/yum.repos.d', '/etc/yum/repo
reposdir = find_conf_value('reposdir', conf)
dirs << reposdir if reposdir
dirs.select! { |dir| Puppet::FileSystem.exist?(dir) }
# We can't use the below due to Ruby 1.8.7
# dirs.select! { |dir| Puppet::FileSystem.exist?(dir) }
dirs.delete_if { |dir| ! Puppet::FileSystem.exist?(dir) }
if dirs.empty?
fail('No yum directories were found on the local filesystem')
else
ProTip! Use n and p to navigate between commits in a pull request.