puppet-resource_api 1.8.14 → 1.8.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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