[Pkg-puppet-devel] [facter] 07/61: (maint) Rakefile loads all the libraries it can.
Stig Sandbeck Mathisen
ssm at debian.org
Mon Nov 4 15:01:39 UTC 2013
This is an automated email from the git hooks/post-receive script.
ssm pushed a commit to branch master
in repository facter.
commit ad902bdaf5efa47e729038b3fda93c9fc9335860
Author: Josh Partlow <joshua.partlow at puppetlabs.com>
Date: Mon Jul 8 16:39:13 2013 -0700
(maint) Rakefile loads all the libraries it can.
The call to load ext/packaging/packaging.rake will fail unless the
packaging system has been bootstrapped. Previously this failure would
prevent attempts to load other libraries (notably rspec), and a `be rake
spec` would return silently without executing any specs.
Requires each lib separately so that failure to load one does not
prevent others.
---
Rakefile | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/Rakefile b/Rakefile
index 792af41..acc0dfa 100644
--- a/Rakefile
+++ b/Rakefile
@@ -10,13 +10,19 @@ require 'rake'
begin
load File.join(File.dirname(__FILE__), 'ext', 'packaging', 'packaging.rake')
- require 'rubygems'
- require 'rspec'
- require 'rspec/core/rake_task'
- require 'rcov'
rescue LoadError
end
+['rubygems',
+'rspec',
+'rspec/core/rake_task',
+'rcov',].each do |lib|
+ begin
+ require lib
+ rescue LoadError
+ end
+end
+
Dir['tasks/**/*.rake'].each { |t| load t }
build_defs_file = 'ext/build_defaults.yaml'
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git
More information about the Pkg-puppet-devel
mailing list