Sha256: d7f89681915eb5106bf943d5325769c5d93688a1f9b2b89e7efc0a829ffd5896
Contents?: true
Size: 484 Bytes
Versions: 11
Compression:
Stored size: 484 Bytes
Contents
require 'pre-commit/checks/plugin' module PreCommit module Checks class Local < Plugin DEFAULT_LOCATION = "config/pre-commit.rb" def call(staged_files, script=Local::DEFAULT_LOCATION) return unless File.exist?(script) output = `ruby #{script} #{staged_files.join(" ")} 2>&1` "#{script} failed:\n#{output}" unless $?.success? end def self.description "Executes 'ruby #{DEFAULT_LOCATION}'." end end end end
Version data entries
11 entries across 11 versions & 1 rubygems