summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Mueller <nate@nearbuysystems.com>2011-07-27 19:52:36 -0700
committerNate Mueller <nate@nearbuysystems.com>2011-07-27 19:52:36 -0700
commit26308908c72f57d2c8f537f8f761d9d2f6fa739b (patch)
treebd7f2c24d318451351d16b8898a6e3ba32fab79d
parent16e2e1efc2cc41f603cf499394d3c117a301a078 (diff)
Updated for ruby 1.9. Not sure how important this actually is. Works on both now.
-rw-r--r--lib/puppet/provider/vcsrepo/git.rb4
1 files 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