Sha256: 4a89829578d091feca2c6c09209751d3c694ba9042315826bfd123704495ed96

Contents?: true

Size: 584 Bytes

Versions: 5

Compression:

Stored size: 584 Bytes

Contents

# frozen_string_literal: true

require 'lolcommits/plugin/base'
require 'lolcommits/tranzlate/lolspeak'

module Lolcommits
  module Plugin
    class Tranzlate < Base
      extend Lolcommits::Tranzlate::Lolspeak

      ##
      #
      # Pre-capture hook, runs after lolcommits captures.
      #
      # Translate the commmit message with lolspeak
      #
      def run_pre_capture
        debug "Commit message before: #{runner.message}"
        runner.message = self.class.tranzlate(runner.message)
        debug "Commit message after: #{runner.message}"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lolcommits-tranzlate-0.5.2 lib/lolcommits/plugin/tranzlate.rb
lolcommits-tranzlate-0.5.1 lib/lolcommits/plugin/tranzlate.rb
lolcommits-tranzlate-0.5.0 lib/lolcommits/plugin/tranzlate.rb
lolcommits-tranzlate-0.4.0 lib/lolcommits/plugin/tranzlate.rb
lolcommits-tranzlate-0.3.0 lib/lolcommits/plugin/tranzlate.rb