From 83e928c8c82c08a52859a51cf8c8e8f70d16f68c Mon Sep 17 00:00:00 2001 From: Reto Kaiser Date: Fri, 8 Aug 2014 14:12:24 +0200 Subject: [PATCH] Expect modules to have only "Puppetfile" (no Modulefile nor metadata.json) --- features/install.feature | 10 ++++++++++ lib/librarian/puppet/source/local.rb | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/features/install.feature b/features/install.feature index 77fe34de..876bba17 100644 --- a/features/install.feature +++ b/features/install.feature @@ -40,3 +40,13 @@ Feature: cli/install """ Unable to parse .*/bad_modulefile/Modulefile, ignoring: Missing version """ + + Scenario: Running install with no Modulefile nor metadata.json + Given a file named "Puppetfile" with: + """ + forge "http://forge.puppetlabs.com" + + mod 'puppetlabs/stdlib', :git => 'https://github.com/puppetlabs/puppetlabs-stdlib.git', :ref => '3.0.0' + """ + When I run `librarian-puppet install` + Then the exit status should be 0 diff --git a/lib/librarian/puppet/source/local.rb b/lib/librarian/puppet/source/local.rb index 26b04fbc..81e10827 100644 --- a/lib/librarian/puppet/source/local.rb +++ b/lib/librarian/puppet/source/local.rb @@ -118,8 +118,9 @@ def parsed_metadata end } else - warn { "Could not find metadata.json nor Modulefile at #{filesystem_path}" } - {} + { + 'dependencies' => [] + } end @metadata end