From d834dafdd47422a6ed7cd36d78e1fc49945b4fe4 Mon Sep 17 00:00:00 2001 From: Branan Purvine-Riley Date: Fri, 15 Jun 2012 16:22:45 -0700 Subject: [PATCH] Wrap puppetlabs_spec_helper in a begin/rescue This Rakefile includes extra tasks beyond the standard set included with spechelper. Wrapping the spechelper load in a begin/rescue allows using these custom tasks without having the puppetlabs_spec_helper gem installed. --- Rakefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 3d5e8e3..3c72e39 100644 --- a/Rakefile +++ b/Rakefile @@ -5,7 +5,13 @@ # # -require 'puppetlabs_spec_helper/rake_tasks' +begin + require 'puppetlabs_spec_helper/rake_tasks' +rescue LoadError + puts "!!!!!" + puts "puppetlabs_spec_helper not found. This may cause some rake tasks to be unavailable." + puts "!!!!!" +end repo_file = 'other_repos.yaml' default_modulepath = '/etc/puppet/modules'