Sha256: 107fcd633abee5ac9c200a037552650735dac5e09c745a246ffc3ea77b1fe9b8

Contents?: true

Size: 996 Bytes

Versions: 4

Compression:

Stored size: 996 Bytes

Contents

# encoding: utf-8
require 'term/ansicolor'

module RakeNBake
  class AssistantBaker
    def self.log_step message
      puts Term::ANSIColor.blue +
        Term::ANSIColor.underline +
        '● ' +
        message +
        Term::ANSIColor.reset
    end

    def self.log_warn message
      puts Term::ANSIColor.red +
        Term::ANSIColor.underline +
        '● ' +
        message +
        Term::ANSIColor.reset
    end

    def self.log_passed message
      puts Term::ANSIColor.green +
        message +
        Term::ANSIColor.reset
    end

    def self.log_missing_gem gem_name, tool_name = gem_name
      $stderr.puts \
        Term::ANSIColor.yellow +
        Term::ANSIColor.underline +
        "! This task is not available because '#{tool_name}' is not available." +
        Term::ANSIColor.reset

      $stderr.puts \
        "Try adding \"gem '#{gem_name}'\" to your Gemfile or run `gem install #{gem_name}` and try again." +
        Term::ANSIColor.reset
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rake-n-bake-1.3.0 lib/assistant_baker.rb
rake-n-bake-1.2.0 lib/assistant_baker.rb
rake-n-bake-1.1.5 lib/assistant_baker.rb
rake-n-bake-1.1.4 lib/assistant_baker.rb