kitchen_hooks 1.5.6 → 1.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/kitchen_hooks/helpers.rb +25 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 046154a4b88d80717a736a92fe23ef563a8ad0c6
|
4
|
+
data.tar.gz: 9b744168be0fb82f447e1671d252fe67ff273989
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45cacae260772d904a5891f561cdcdb90aa82622b11b85c105361a0937b16605c8002fc06fd583ccafa03153038fe6a35671b823f55c856eb65b48c107e8ec20
|
7
|
+
data.tar.gz: c9a2d6ffd3c7161f80fc2cc92669e6a7c0b4e7e6e3826441720833b7771977762e8edb72c62dda6d737f55384489a265e8f6179ef3db5d5e877b9ce1dd1093ff
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.5.
|
1
|
+
1.5.7
|
@@ -98,6 +98,7 @@ module KitchenHooks
|
|
98
98
|
|
99
99
|
if File::exist? berksfile_lock
|
100
100
|
logger.info 'Uploading dependencies'
|
101
|
+
berks_install berksfile
|
101
102
|
knives.each do |knife|
|
102
103
|
berks_upload berksfile, knife
|
103
104
|
end
|
@@ -129,23 +130,40 @@ module KitchenHooks
|
|
129
130
|
end
|
130
131
|
|
131
132
|
|
132
|
-
def
|
133
|
-
logger.debug 'started
|
134
|
-
|
135
|
-
|
136
|
-
config_path = berkshelf_config(knife)
|
133
|
+
def berks_install berksfile
|
134
|
+
logger.debug 'started berks_install berksfile=%s' % berksfile.inspect
|
135
|
+
env_git_dir = ENV.delete 'GIT_DIR'
|
136
|
+
env_git_work_tree = ENV.delete 'GIT_WORK_TREE'
|
137
137
|
|
138
138
|
cmd = "berks install --debug --berksfile %s" % [
|
139
139
|
Shellwords::escape(berksfile)
|
140
140
|
]
|
141
141
|
logger.debug "berks_install: %s" % cmd
|
142
142
|
system cmd
|
143
|
+
raise 'Could not perform berks_install with config %s' % [
|
144
|
+
berksfile.inspect
|
145
|
+
] unless $?.exitstatus.zero?
|
146
|
+
|
147
|
+
ENV['GIT_DIR'] = env_git_dir
|
148
|
+
ENV['GIT_WORK_TREE'] = env_git_work_tree
|
149
|
+
logger.debug 'finished berks_install: %s' % berksfile
|
150
|
+
end
|
151
|
+
|
152
|
+
|
153
|
+
def berks_upload berksfile, knife, options={}
|
154
|
+
logger.debug 'started berks_upload berksfile=%s, knife=%s' % [
|
155
|
+
berksfile.inspect, knife.inspect
|
156
|
+
]
|
157
|
+
config_path = berkshelf_config(knife)
|
143
158
|
|
144
159
|
cmd = "berks upload --debug --berksfile %s --config %s" % [
|
145
160
|
Shellwords::escape(berksfile), Shellwords::escape(config_path)
|
146
161
|
]
|
147
162
|
logger.debug "berks_upload: %s" % cmd
|
148
163
|
system cmd
|
164
|
+
raise 'Could not perform berks_upload with config %s, knife %s' % [
|
165
|
+
berksfile.inspect, knife.inspect
|
166
|
+
] unless $?.exitstatus.zero?
|
149
167
|
|
150
168
|
FileUtils.rm_rf config_path
|
151
169
|
logger.debug 'finished berks_upload: %s' % berksfile
|
@@ -186,7 +204,8 @@ module KitchenHooks
|
|
186
204
|
knives.map do |k|
|
187
205
|
cmd = command % { knife: Shellwords::escape(k) }
|
188
206
|
logger.debug 'with_each_knife: %s' % cmd
|
189
|
-
|
207
|
+
system cmd
|
208
|
+
# No error handling here; do that on "berks upload"
|
190
209
|
end
|
191
210
|
end
|
192
211
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen_hooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kelly Wong
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hipchat
|