From 26308908c72f57d2c8f537f8f761d9d2f6fa739b Mon Sep 17 00:00:00 2001 From: Nate Mueller Date: Wed, 27 Jul 2011 19:52:36 -0700 Subject: Updated for ruby 1.9. Not sure how important this actually is. Works on both now. --- lib/puppet/provider/vcsrepo/git.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb index e624b49..6756fc0 100644 --- a/lib/puppet/provider/vcsrepo/git.rb +++ b/lib/puppet/provider/vcsrepo/git.rb @@ -234,7 +234,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo) end def on_branch? - at_path { git_with_identity('branch', '-a') }.split(/\n/).grep(/\*/).to_s.gsub('*', '').strip + at_path { git_with_identity('branch', '-a') }.split(/\n/).grep(/\*/).first.to_s.gsub('*', '').strip end def tags @@ -260,7 +260,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo) elsif remote_branch_revision? canonical = at_path { git_with_identity('rev-parse', 'origin/' + @resource.value(:revision)).strip } end - current = @resource.value(:revision) if current == canonical + current = @resource.value(:revision) if current == canonical end return current end -- cgit v1.2.3