Commit 31e2e4b9 authored by Ben Asher's avatar Ben Asher

Added rake task to check submodules

parent 9969b1db
...@@ -30,6 +30,14 @@ begin ...@@ -30,6 +30,14 @@ begin
title 'Building the gem' title 'Building the gem'
end end
task :check_submodules do
title 'Ensuring submodules are initialized'
submodule_help_msg = 'Run git submodule update --init --recursive to ensure submodules are initialized'
raise submodule_help_msg if `git submodule status`.split("\n").any? do |line|
line.start_with? '-'
end
end
require 'bundler/gem_tasks' require 'bundler/gem_tasks'
require 'bundler/setup' require 'bundler/setup'
...@@ -287,7 +295,7 @@ begin ...@@ -287,7 +295,7 @@ begin
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
desc 'Run all specs' desc 'Run all specs'
task :spec => 'spec:all' task :spec => [:check_submodules, 'spec:all']
task :default => :spec task :default => :spec
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment