Sha256: c6a4f2c99a0303663d40d35462dff46084fe326a41884bf9d9b2de3c95133a21

Contents?: true

Size: 318 Bytes

Versions: 5

Compression:

Stored size: 318 Bytes

Contents

require 'pre-commit/utils'

module PreCommit
  class GemfilePathCheck
    def self.call(staged_files)
      return unless staged_files.include?("Gemfile")
      errors = `#{Utils.grep} 'path:|:path\\s*=>' Gemfile`.strip
      return unless $?.success?
      "local path found in Gemfile:\n#{errors}"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pre-commit-0.11.0 lib/pre-commit/checks/gemfile_path_check.rb
pre-commit-0.10.0 lib/pre-commit/checks/gemfile_path_check.rb
pre-commit-0.9.2 lib/pre-commit/checks/gemfile_path_check.rb
pre-commit-0.9.1 lib/pre-commit/checks/gemfile_path_check.rb
pre-commit-0.9.0 lib/pre-commit/checks/gemfile_path_check.rb