Rake

rake-osc7501 reports task activity and the outcome of a Rake run to a terminal supporting OSC 7501.

Add the gem to your Gemfile and install it:

gem 'rake-osc7501'
bundle install

Load it in your Rakefile, then run bundle exec rake:

require 'rake/osc7501'

The run uses a root status record. A new Rake run replaces that root record. Tasks report activity without a percentage. Dry runs, task listings, skipped file tasks, and deduplicated invocations do not report executed work.

# RSpec tasks

To report standard RSpec Rake tasks as children, also add rspec-osc7501 version 0.1.4 or newer and run bundle install:

gem 'rspec-osc7501', '>= 0.1.4'

Load both integrations before top-level execution and define the task:

require 'rspec/core/rake_task'
require 'rake/osc7501'

RSpec::Core::RakeTask.new(:spec)

Run bundle exec rake spec. Either require order works. Direct rspec commands still need the RSpec formatter. Child records can remain after the parent finishes.

# Output

RAKE_OSC7501=auto is the default: report to stdout when it is a TTY and TERM is not dumb. Set it to force to report even when redirected or off to disable Rake reporting and automatic RSpec activation. Other values raise ArgumentError.

Version 0.1.2 targets MRI Ruby 2.1 or newer and Rake 12.3.3 or newer. Other Ruby engines are unverified. See the released gem and source for details.

Source, Issues, Apache-2.0 license, Release