From eb78a8422a67f2bcc7f563e44ac255b34af0cc87 Mon Sep 17 00:00:00 2001 From: Thomas Kadauke Date: Sun, 31 Mar 2013 22:15:29 +0200 Subject: [PATCH] Add optional automatic Bundler support. This commit adds bundler support, including an optional :spec group when running the specs. To use, require bundler from the Rakefile before requiring motion/project. Add all your build and runtime dependencies to your Gemfile, and all testing dependencies to the :spec group. --- lib/motion/project.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/motion/project.rb b/lib/motion/project.rb index 062c7ec9..ab1685ae 100644 --- a/lib/motion/project.rb +++ b/lib/motion/project.rb @@ -30,6 +30,8 @@ App = Motion::Project::App +Bundler.require if Object.const_defined?(:Bundler) + # Check for software updates. system('/usr/bin/motion update --check') if $?.exitstatus == 2 @@ -124,6 +126,7 @@ desc "Run the test/spec suite on the simulator" task :simulator do App.config.spec_mode = true + Bundler.require :default, :spec if Object.const_defined?(:Bundler) Rake::Task["simulator"].invoke end