[DRE-commits] [librarian-puppet] 72/97: Show a message if no versions are found for a module
Stig Sandbeck Mathisen
ssm at debian.org
Tue Mar 11 12:12:51 UTC 2014
This is an automated email from the git hooks/post-receive script.
ssm pushed a commit to branch master
in repository librarian-puppet.
commit 557ede96c92601f22c4f036ce674e34519cd43b9
Author: Carlos Sanchez <csanchez at maestrodev.com>
Date: Sun Jan 26 21:23:47 2014 +0100
Show a message if no versions are found for a module
---
lib/librarian/puppet/source/forge.rb | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/librarian/puppet/source/forge.rb b/lib/librarian/puppet/source/forge.rb
index 99bd59a..fa1a100 100644
--- a/lib/librarian/puppet/source/forge.rb
+++ b/lib/librarian/puppet/source/forge.rb
@@ -19,7 +19,11 @@ module Librarian
def versions
return @versions if @versions
@versions = api_data[name].map { |r| r['version'] }.reverse
- debug { " Module #{name} found versions: #{@versions.join(", ")}" }
+ if @versions.empty?
+ info { "No versions found for module #{name}" }
+ else
+ debug { " Module #{name} found versions: #{@versions.join(", ")}" }
+ end
@versions
end
@@ -136,6 +140,9 @@ module Librarian
def debug(*args, &block)
environment.logger.debug(*args, &block)
end
+ def info(*args, &block)
+ environment.logger.info(*args, &block)
+ end
private
def api_data
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/librarian-puppet.git
More information about the Pkg-ruby-extras-commits
mailing list