puppet-resource_api 1.8.14 → 1.8.18

Sign up to get free protection for your applications and to get access to all the features.
data/contrib/pre-commit DELETED
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- # Code modified from: https://gist.github.com/hanloong/9849098
5
- require 'English'
6
-
7
- changed_files = `git diff --name-only --cached --diff-filter=ACM`.split(%r{\n})
8
- changed_files = changed_files.select { |file_name|
9
- File.extname(file_name) == '.rb'
10
- }.join(' ')
11
-
12
- system("bundle exec rubocop -a #{changed_files}") unless changed_files.empty?
13
-
14
- if $CHILD_STATUS.to_s[-1].to_i.zero? && !changed_files.empty?
15
- system("git add #{changed_files}")
16
- end
17
-
18
- exit $CHILD_STATUS.to_s[-1].to_i