Sha256: 0a04764490233d0b6ba75a19f9c349dca8a3126d23399c4b8791f5e0ce6e0620
Contents?: true
Size: 1.19 KB
Versions: 31
Compression:
Stored size: 1.19 KB
Contents
require "danger/plugin_support/plugin" # Danger module Danger # Handles interacting with local only plugin inside a Dangerfile. # It is support pluggin for dry_run command and does not expose any methods. # But you can still use other plugins like git # # @example Check that added lines contains agreed form of words # # git.diff.each do |chunk| # chunk.patch.lines.grep(/^\+/).each do |added_line| # if added_line.gsub!(/(?<cancel>cancel)(?<rest>[^l[[:space:]][[:punct:]]]+)/i, '>>\k<cancel>-l-\k<rest><<') # fail "Single 'L' for cancellation-alike words in '#{added_line}'" # end # end # end # # @see danger/danger # @tags core, local_only # class DangerfileLocalOnlyPlugin < Plugin # So that this init can fail. def self.new(dangerfile) return nil if dangerfile.env.request_source.class != Danger::RequestSources::LocalOnly super end def initialize(dangerfile) super(dangerfile) @local_repo = dangerfile.env.request_source end # The instance name used in the Dangerfile # @return [String] # def self.instance_name "local_repo" end end end
Version data entries
31 entries across 31 versions & 1 rubygems