puppet-ci-testing 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/check_file_syntax +28 -0
- data/spec/check_file_syntax_spec.rb +1 -2
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d9c843949f048de64d28da8773c54f5ee2adb08
|
4
|
+
data.tar.gz: 67afbacdd7801509864a8bd49e46d887de878d94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5848da4fc76f141175026427fde9414d46fd261e17dadfeb72fdde42f142a5c07bc0b7aa8f093a017aa0c75e032cfa9e015adba6e6b421d5b6a859c157f54a55
|
7
|
+
data.tar.gz: f8fd7b67d8d3aa1f8eb3996c3b1d5da0cac009cbb2cb6d14049a9f32315e75d2888e3bd8a85da4172d1a2cc48ec9cebd346c5140805432b760a7fba2f7fb2248
|
data/bin/check_file_syntax
CHANGED
@@ -58,6 +58,34 @@ EOH
|
|
58
58
|
opts.on('--git-hook', '-g', 'Execute as a Git pre-commit hook') do
|
59
59
|
options[:git_hook] = true
|
60
60
|
end
|
61
|
+
|
62
|
+
opts.on('--initialize', '--init', '-I', 'Setup Git pre-commit hook') do
|
63
|
+
# insure that we see the .git directory
|
64
|
+
unless Dir.exists? '.git'
|
65
|
+
puts "Not able to locate Git hooks directory."
|
66
|
+
puts "Please rerun the command at the top of the Git directory tree."
|
67
|
+
exit 1
|
68
|
+
end
|
69
|
+
|
70
|
+
# insure that the hooks directory exists
|
71
|
+
unless Dir.exists? '.git/hooks'
|
72
|
+
FileUtils.mkdir '.git/hooks', :mode => 0755
|
73
|
+
end
|
74
|
+
|
75
|
+
# Now create the pre-commit file unless it exists
|
76
|
+
if File.exists? '.git/hooks/pre-commit'
|
77
|
+
puts "The Git pre-commit hook already exists (.git/hooks/pre-commit)."
|
78
|
+
puts "Please remove this file and rerun the command to create the pre-commit hook."
|
79
|
+
exit 1
|
80
|
+
end
|
81
|
+
|
82
|
+
open('.git/hooks/pre-commit', 'w') do |fp|
|
83
|
+
fp.puts "check_file_syntax --git-hook || (echo "[1m[31mpuppet-ci-testing gem is not installed[0m" && exit 1)"
|
84
|
+
end
|
85
|
+
FileUtils.chmod 0755, '.git/hooks/pre-commit'
|
86
|
+
exit 0
|
87
|
+
end
|
88
|
+
|
61
89
|
end.parse!
|
62
90
|
|
63
91
|
# check for an optional directory to
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-ci-testing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerard Hickey
|
@@ -164,6 +164,20 @@ dependencies:
|
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '1.0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: fakefs
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 0.10.0
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 0.10.0
|
167
181
|
description: ''
|
168
182
|
email: hickey@kinetic-compute.com
|
169
183
|
executables:
|