summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Stone <aaron@serendipity.cx>2013-07-19 12:35:23 -0700
committerAaron Stone <aaron@serendipity.cx>2013-07-19 12:44:23 -0700
commita2ef96e0de924d43b2cb56ac8fd979c9eee59d72 (patch)
tree0b98a11fa510f03858acf765e99bbdeb9fe8feb0
parent481cbe15a83fb397aa023c97aaf5ec19ee2f0632 (diff)
downloadpuppet-vcsrepo-a2ef96e0de924d43b2cb56ac8fd979c9eee59d72.tar.gz
puppet-vcsrepo-a2ef96e0de924d43b2cb56ac8fd979c9eee59d72.tar.bz2
Style and comments
-rw-r--r--lib/puppet/provider/vcsrepo/svn.rb20
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/puppet/provider/vcsrepo/svn.rb b/lib/puppet/provider/vcsrepo/svn.rb
index 0c911bf..3132c36 100644
--- a/lib/puppet/provider/vcsrepo/svn.rb
+++ b/lib/puppet/provider/vcsrepo/svn.rb
@@ -22,14 +22,12 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
def working_copy_exists?
if File.directory?(@resource.value(:path))
- if File.directory?(File.join(@resource.value(:path), '.svn'))
- return true
- end
- if svnlook('uuid',@resource.value(:path))
- return true
- end
+ # :path is an svn checkout
+ return true if File.directory?(File.join(@resource.value(:path), '.svn'))
+ # :path is an svn server
+ return true if svnlook('uuid', @resource.value(:path))
end
- return false
+ false
end
def exists?
@@ -42,11 +40,7 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
def latest?
at_path do
- if self.revision < self.latest then
- return false
- else
- return true
- end
+ self.revision >= self.latest
end
end
@@ -66,7 +60,7 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
args.push('--config-dir', @resource.value(:configuration))
end
- return args
+ args
end
def latest