Sha256: 8b03eccfcc6c34c508270a72f84d3c9cc385eeb330303b8e7582d721566fb081

Contents?: true

Size: 630 Bytes

Versions: 1

Compression:

Stored size: 630 Bytes

Contents

# frozen_string_literal: true

require "ruby-progressbar"

module Decidim
  module Cdtb
    # Reusable utils for Cdtb Rake tasks.
    module TasksUtils
      def logger
        Rails.logger
      end

      def do_log(msg)
        puts msg
        logger.info(msg)
      end

      def log_task_title(title)
        do_log("⚙️  #{title}")
      end

      def log_task_step(description)
        do_log("➡️  #{description}")
      end

      def log_task_info(info)
        do_log("ℹ️  #{info}")
      end

      def log_task_end
        end_comment= "✅ Done."
        do_log(end_comment)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
decidim-cdtb-0.1.2 lib/decidim/cdtb/tasks_utils.rb