Sha256: fe3c27e162a0b5d3041541e6585c99a0d93c9b151776a9a3b32c641968e2e5f6

Contents?: true

Size: 529 Bytes

Versions: 34

Compression:

Stored size: 529 Bytes

Contents

require 'plugins/pre_commit/configuration/providers/git'

module PreCommit
  class Configuration
    class Providers

      class GitOld < Git

        def self.priority
          11
        end

        def [](name)
          value = super(name)
          if
            name == :checks && value && ! value.kind_of?(Array)
          then
            value = value.chomp.split(/,\s*/).map(&:to_sym) || []
            update(name, value) unless value.empty?
          end
          value
        end

      end

    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
pre-commit-0.40.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.39.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.38.1 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.38.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.37.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.36.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.35.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.34.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.33.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.32.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.31.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.30.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.29.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.28.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.27.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.26.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.25.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.24.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.23.0 lib/plugins/pre_commit/configuration/providers/git_old.rb
pre-commit-0.22.1 lib/plugins/pre_commit/configuration/providers/git_old.rb