summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2016-06-06 17:39:12 -0700
committerJohn Keiser <john@johnkeiser.com>2016-06-06 17:39:12 -0700
commit79b29424cef808916faa1358204404ca5678adc2 (patch)
tree94b0cbcc892300c0c0a7cb8ff087f6d2346a4193
parent139b722e3825f10691f6bb2dcb9bfbf14915dc6e (diff)
downloadchef-jk/chef-config-no-rspec.tar.gz
Make chef-config Rakefile run without rspecjk/chef-config-no-rspec
-rw-r--r--chef-config/Rakefile12
-rwxr-xr-xci/bundle_install.sh2
2 files changed, 9 insertions, 5 deletions
diff --git a/chef-config/Rakefile b/chef-config/Rakefile
index 151c2754c3..46f87c96c9 100644
--- a/chef-config/Rakefile
+++ b/chef-config/Rakefile
@@ -1,4 +1,3 @@
-require "rspec/core/rake_task"
require "chef-config/package_task"
ChefConfig::PackageTask.new(File.expand_path("..", __FILE__), "ChefConfig") do |package|
@@ -7,7 +6,12 @@ end
task :default => :spec
-desc "Run standard specs"
-RSpec::Core::RakeTask.new(:spec) do |t|
- t.pattern = FileList["spec/**/*_spec.rb"]
+begin
+ require "rspec/core/rake_task"
+ desc "Run standard specs"
+ RSpec::Core::RakeTask.new(:spec) do |t|
+ t.pattern = FileList["spec/**/*_spec.rb"]
+ end
+rescue LoadError
+ STDERR.puts "\n*** RSpec not available. (sudo) gem install rspec to run unit tests. ***\n\n"
end
diff --git a/ci/bundle_install.sh b/ci/bundle_install.sh
index 37c5db9068..6c6d76dc5d 100755
--- a/ci/bundle_install.sh
+++ b/ci/bundle_install.sh
@@ -4,6 +4,6 @@ set -evx
gem environment
bundler_version=$(grep bundler omnibus_overrides.rb | cut -d'"' -f2)
-gem install bundler -v $bundler_version --user-install
+gem install bundler -v $bundler_version --user-install --conservative
export BUNDLE_WITHOUT=default:omnibus_package:test:pry:integration:docgen:maintenance:changelog:travis:aix:bsd:linux:mac_os_x:solaris:windows
bundle _${bundler_version}_ install