From d4f68c2b28e08158b53e3f7606c94de7481bc74a Mon Sep 17 00:00:00 2001 From: Garrett Honeycutt Date: Wed, 29 Aug 2012 00:20:34 +0200 Subject: Removes trailing whitespace --- lib/puppet/provider/vcsrepo/bzr.rb | 2 +- lib/puppet/provider/vcsrepo/cvs.rb | 11 +++++------ lib/puppet/provider/vcsrepo/svn.rb | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'lib/puppet/provider') diff --git a/lib/puppet/provider/vcsrepo/bzr.rb b/lib/puppet/provider/vcsrepo/bzr.rb index 3a93e35..f9d58e2 100644 --- a/lib/puppet/provider/vcsrepo/bzr.rb +++ b/lib/puppet/provider/vcsrepo/bzr.rb @@ -26,7 +26,7 @@ Puppet::Type.type(:vcsrepo).provide(:bzr, :parent => Puppet::Provider::Vcsrepo) def destroy FileUtils.rm_rf(@resource.value(:path)) end - + def revision at_path do current_revid = bzr('version-info')[/^revision-id:\s+(\S+)/, 1] diff --git a/lib/puppet/provider/vcsrepo/cvs.rb b/lib/puppet/provider/vcsrepo/cvs.rb index 85178f1..5cdcfb8 100644 --- a/lib/puppet/provider/vcsrepo/cvs.rb +++ b/lib/puppet/provider/vcsrepo/cvs.rb @@ -6,7 +6,7 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo) optional_commands :cvs => 'cvs' defaultfor :cvs => :exists has_features :gzip_compression, :reference_tracking, :modules - + def create if !@resource.value(:source) create_repository(@resource.value(:path)) @@ -28,12 +28,12 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo) def working_copy_exists? File.directory?(File.join(@resource.value(:path), 'CVS')) end - + def destroy FileUtils.rm_rf(@resource.value(:path)) end - def latest? + def latest? debug "Checking for updates because 'ensure => latest'" at_path do # We cannot use -P to prune empty dirs, otherwise @@ -44,10 +44,10 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo) return is_current end end - + def latest # CVS does not have a conecpt like commit-IDs or change - # sets, so we can only have the current branch name (or the + # sets, so we can only have the current branch name (or the # requested one, if that differs) as the "latest" revision. should = @resource.value(:revision) current = self.revision @@ -117,5 +117,4 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo) set_ownership end end - end diff --git a/lib/puppet/provider/vcsrepo/svn.rb b/lib/puppet/provider/vcsrepo/svn.rb index bd420b5..85c5089 100644 --- a/lib/puppet/provider/vcsrepo/svn.rb +++ b/lib/puppet/provider/vcsrepo/svn.rb @@ -41,7 +41,7 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo) end end end - + def buildargs args = ['--non-interactive'] if @resource.value(:basic_auth_username) && @resource.value(:basic_auth_password) @@ -58,7 +58,7 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo) svn(*args)[/^Last Changed Rev:\s+(\d+)/m, 1] end end - + def revision args = buildargs.push('info') at_path do -- cgit v1.2.3