summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/provider/vcsrepo/bzr.rb4
-rw-r--r--lib/puppet/type/vcsrepo.rb22
2 files changed, 13 insertions, 13 deletions
diff --git a/lib/puppet/provider/vcsrepo/bzr.rb b/lib/puppet/provider/vcsrepo/bzr.rb
index fff25b3..6688ce8 100644
--- a/lib/puppet/provider/vcsrepo/bzr.rb
+++ b/lib/puppet/provider/vcsrepo/bzr.rb
@@ -54,10 +54,10 @@ Puppet::Type.type(:vcsrepo).provide(:bzr, :parent => Puppet::Provider::Vcsrepo)
end
end
- def latest
+ def latest
at_path do
bzr('version-info', ':parent')[/^revision-id:\s+(\S+)/, 1]
- end
+ end
end
def latest?
diff --git a/lib/puppet/type/vcsrepo.rb b/lib/puppet/type/vcsrepo.rb
index 4b53235..45ac455 100644
--- a/lib/puppet/type/vcsrepo.rb
+++ b/lib/puppet/type/vcsrepo.rb
@@ -38,16 +38,16 @@ Puppet::Type.newtype(:vcsrepo) do
@should ||= []
case should
- when :present
- return true unless [:absent, :purged, :held].include?(is)
- when :latest
- if is == :latest
- return true
- else
- return false
- end
- when :bare
- return is == :bare
+ when :present
+ return true unless [:absent, :purged, :held].include?(is)
+ when :latest
+ if is == :latest
+ return true
+ else
+ return false
+ end
+ when :bare
+ return is == :bare
end
end
@@ -57,7 +57,7 @@ Puppet::Type.newtype(:vcsrepo) do
end
newvalue :bare, :required_features => [:bare_repositories] do
- if !provider.exists?
+ if !provider.exists?
provider.create
end
end