Sha256: 5be5f59e1c965ae7b15c8fa7d1ba301aa2b853034328c4b982e5864114472ae5

Contents?: true

Size: 607 Bytes

Versions: 12

Compression:

Stored size: 607 Bytes

Contents

require_relative 'base_logger'

module Locomotive::Wagon

  class SyncLogger < BaseLogger

    def initialize
      subscribe :start do |event|
        log "\n"
        log "Syncing #{event.payload[:name].camelcase}", { color: :black, background: :white }
      end

      subscribe :writing do |event|
        log "writing #{event.payload[:label]}", :white, 2, true
      end

      subscribe :write_with_success do |event|
        log ' [' + 'done'.colorize(:green) + ']'
      end
    end

    private

    def subscribe(action = nil, &block)
      _subscribe('sync', action, &block)
    end

  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
locomotivecms_wagon-3.2.0.alpha2 lib/locomotive/wagon/commands/loggers/sync_logger.rb
locomotivecms_wagon-3.2.0.alpha1 lib/locomotive/wagon/commands/loggers/sync_logger.rb
locomotivecms_wagon-3.1.1 lib/locomotive/wagon/commands/loggers/sync_logger.rb
locomotivecms_wagon-3.1.0 lib/locomotive/wagon/commands/loggers/sync_logger.rb
locomotivecms_wagon-3.1.0.beta1 lib/locomotive/wagon/commands/loggers/sync_logger.rb
locomotivecms_wagon-3.0.5 lib/locomotive/wagon/commands/loggers/sync_logger.rb
locomotivecms_wagon-3.0.4 lib/locomotive/wagon/commands/loggers/sync_logger.rb
locomotivecms_wagon-3.0.3 lib/locomotive/wagon/commands/loggers/sync_logger.rb
locomotivecms_wagon-3.0.2 lib/locomotive/wagon/commands/loggers/sync_logger.rb
locomotivecms_wagon-3.0.0 lib/locomotive/wagon/commands/loggers/sync_logger.rb
locomotivecms_wagon-3.0.0.rc0 lib/locomotive/wagon/commands/loggers/sync_logger.rb
locomotivecms_wagon-3.0.0.beta2 lib/locomotive/wagon/commands/loggers/sync_logger.rb