Class: OpenHood::Rake::CITask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- OpenHood::Rake::CITask
- Includes:
- Gem
- Defined in:
- lib/openhood/rake/ci.rb
Instance Method Summary collapse
-
#initialize ⇒ CITask
constructor
A new instance of CITask.
Constructor Details
#initialize ⇒ CITask
Returns a new instance of CITask.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/openhood/rake/ci.rb', line 9 def initialize namespace :ci do desc 'Run all features and specs' task :all do ENV['RACK_ENV'] = 'test' error = 0 rake_bin = "#{File.join(Config::CONFIG['bindir'], 'rake')} " ["#{rake_bin} spec", "#{rake_bin} features"].each do |command| if system command error += $?.to_i else error += 1 end end at_exit {exit error} if(error != 0) end end end |