Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve full build output.

  • Loading branch information...
commit 5cdbba38f83c54607ffba983f2d46547eb25dbbd 1 parent 9c4a71c
@myronmarston authored
Showing with 39 additions and 8 deletions.
  1. +4 −1 Rakefile
  2. +35 −7 script/FullBuildRakeFile
View
5 Rakefile
@@ -5,7 +5,10 @@ Bundler::GemHelper.install_tasks
require 'rake'
require "rspec/core/rake_task"
-RSpec::Core::RakeTask.new(:spec)
+RSpec::Core::RakeTask.new(:spec) do |t|
+ t.verbose = false
+ t.rspec_opts = %w[--format progress] if ENV['FULL_BUILD']
+end
desc "Run all examples using rcov"
RSpec::Core::RakeTask.new :rcov => :cleanup_rcov_files do |t|
View
42 script/FullBuildRakeFile
@@ -1,19 +1,46 @@
# this is in a separate rakefile because our main one depends on the bundled gems
# already being installed. This must be able to run w/o bundled gems installed.
+def rake(command = "")
+ sh "rake #{command} FULL_BUILD=true"
+end
+
desc "Run a full build: install necessary gems with bundler, runs specs, run cukes"
-task :build => :ensure_bundler_installed do
- sh "bundle install"
- sh "rake"
+task :build => :bundle_install do
+ rake
+end
+
+desc "Install necessary gems with bundler and runs specs"
+task :spec => :bundle_install do
+ rake "spec"
+end
+
+desc "Install necessary gems with bundler and runs cukes"
+task :cucumber => :bundle_install do
+ rake "cucumber"
+end
+
+desc "Prints description of current ruby interpreter"
+task :print_ruby_description do
+ description = if defined?(RUBY_DESCRIPTION)
+ RUBY_DESCRIPTION
+ else
+ # RUBY_DESCRIPTION is undefined on 1.8.6
+ "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE} patchlevel #{RUBY_PATCHLEVEL}) [#{RUBY_PLATFORM}]"
+ end
+
+ puts
+ puts "=" * 80
+ puts "Using #{description}"
+ puts "=" * 80
+ puts
end
-desc "Install necessary gems with bundler, runs specs, run cukes"
-task :spec => :ensure_bundler_installed do
+task :bundle_install => :ensure_bundler_installed do
sh "bundle install"
- sh "rake spec"
end
-task :ensure_bundler_installed do
+task :ensure_bundler_installed => :print_ruby_description do
installed = begin
require 'rubygems'
require 'bundler'
@@ -26,3 +53,4 @@ task :ensure_bundler_installed do
sh "gem install bundler"
end
end
+
Please sign in to comment.
Something went wrong with that request. Please try again.