Sha256: 4ab72f76fa46ec5bf089e39e27b2f8f0ba589cc423c1ac0ea87b6c85a51808fc

Contents?: true

Size: 688 Bytes

Versions: 1

Compression:

Stored size: 688 Bytes

Contents

module Danger
  # @see  Shinobu Okano/danger-homete
  # @tags homete
  #
  class DangerHomete < Plugin
    # A globbed string or array of strings which should match the files that you want to test.
    #
    # @param    [String or [String]] value
    # @return   [[String]]
    attr_accessor :test_files

    def test_files
      [@test_files].flatten.compact
    end

    # If you change the test code, you will be praised.
    #
    # @param    [String or [String]] 	praises
    # @return   [void]
    def homete(messages = ["えらい!"])
      test_files.each { |v| message [messages].flatten.compact.sample if git.modified_files.any? { |f| File.fnmatch(v, f) } }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
danger-homete-1.0.0 lib/homete/plugin.rb