Class: PreCommit::GemfilePathCheck
- Inherits:
-
Object
- Object
- PreCommit::GemfilePathCheck
- Defined in:
- lib/pre-commit/checks/gemfile_path_check.rb
Class Method Summary collapse
Class Method Details
.call(staged_files) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/pre-commit/checks/gemfile_path_check.rb', line 5 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 |