Sha256: 4a008955359eb6533c6442ea9660bb64230948a28f77462d78de442c161ecafe

Contents?: true

Size: 859 Bytes

Versions: 19

Compression:

Stored size: 859 Bytes

Contents

require 'pre-commit/runner'

module PreCommit

  # Can not delete this method with out a deprecation strategy.
  # It is refered to in the generated pre-commit hook in versions 0.0-0.1.1
  #
  # NOTE: The deprecation strategy *may* be just delete it since, we're still
  # pre 1.0.
  #
  # Actually, on the deprecation note. This method isn't really the problem.
  # The problem is the default generated pre-commit hook. It shouldn't have
  # logic in it. The we have freedom to change the gem implementation however
  # we want, and nobody is forced to update their pre-commit binary.
  def self.checks_to_run
    warn "WARNING: You are using old hook version, you can update it with: pre-commit install"
    runner.list_to_run(:checks)
  end

  def self.run
    runner.run or exit 1
  end

  def self.runner
    @runner ||= PreCommit::Runner.new
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
pre-commit-0.26.0 lib/pre-commit.rb
pre-commit-0.25.0 lib/pre-commit.rb
pre-commit-0.24.0 lib/pre-commit.rb
pre-commit-0.23.0 lib/pre-commit.rb
pre-commit-0.22.1 lib/pre-commit.rb
pre-commit-0.22.0 lib/pre-commit.rb
pre-commit-0.21.0 lib/pre-commit.rb
pre-commit-0.20.0 lib/pre-commit.rb
pre-commit-0.19.0 lib/pre-commit.rb
pre-commit-0.18.0 lib/pre-commit.rb
pre-commit-0.17.0 lib/pre-commit.rb
pre-commit-0.16.3 lib/pre-commit.rb
pre-commit-0.16.2 lib/pre-commit.rb
pre-commit-0.16.1 lib/pre-commit.rb
pre-commit-0.16.0 lib/pre-commit.rb
pre-commit-0.15.0 lib/pre-commit.rb
pre-commit-0.14.1 lib/pre-commit.rb
pre-commit-0.14.0 lib/pre-commit.rb
pre-commit-0.13.0 lib/pre-commit.rb