kitchen_hooks 1.7.14 → 1.7.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/kitchen_hooks/helpers.rb +18 -9
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d79c5b35992c0b702d82ca724450adf64d278543
4
- data.tar.gz: ffd258c665a0e05c247c226131b3f86a55f7a16d
3
+ metadata.gz: 0767338529153daae3c90cfa549ce169b0f07046
4
+ data.tar.gz: 48e21d056a8cc1930d14603c442aa51b299f59e4
5
5
  SHA512:
6
- metadata.gz: 189e45821445f040498ccce4f56a1d604fa1f3cc8e738ba7c2a025974c27f5a5181901148b0cf9fc117ab24350e6db37b950b6bfb9fcc69ae6fe2c14352f580c
7
- data.tar.gz: b5d4cf3c1e4a9651f566f14e21529873ae641d097ccac9621fcfe3f482b6572fc0a882b466913b329356d302b882fdbb63d3a0c662dfc72a316e6de8c9f37ae3
6
+ metadata.gz: ac75ccfc01f538d04b1e998c1693a468e974a60e619c1e705b215084099fc861081ed243e07e8be1d6ad6f8f1da25fbca8b167e095b4bcc77bae10aec0fc9052
7
+ data.tar.gz: f4f3bf51efe89bd2ebc25bdb3276460b76805ad37a18b2ad6c15e8de9d58c1b57fe497d8fadeb818a3f3a2b388b51f83e3e00a7a0f19b018e628ee7f70749045
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.7.14
1
+ 1.7.15
@@ -113,9 +113,9 @@ module KitchenHooks
113
113
  do_update = !File::exist?(berksfile_lock)
114
114
 
115
115
  $stdout.puts 'Uploading dependencies'
116
- berks_install berksfile
117
- berks_update berksfile if do_update
118
116
  knives.peach do |knife|
117
+ berks_install berksfile, knife
118
+ # berks_update berksfile, knife if do_update
119
119
  berks_upload berksfile, knife
120
120
  end
121
121
 
@@ -162,21 +162,26 @@ module KitchenHooks
162
162
  verify: false
163
163
  }
164
164
  }
165
+ $stdout.puts 'Berkshelf config: %s' % JSON::pretty_generate(config)
165
166
  config_path = File.join tmp, "#{SecureRandom.hex}-berkshelf.json"
166
167
  File.open(config_path, 'w') do |f|
167
- f.puts JSON::pretty_generate config
168
+ f.puts JSON::generate(config)
168
169
  end
169
170
  return config_path
170
171
  end
171
172
 
172
173
 
173
- def self.berks_update berksfile
174
+ def self.berks_update berksfile, knife=nil
174
175
  $stdout.puts 'started berks_update berksfile=%s' % berksfile.inspect
175
176
  env_git_dir = ENV.delete 'GIT_DIR'
176
177
  env_git_work_tree = ENV.delete 'GIT_WORK_TREE'
177
178
 
178
- cmd = "berks update --debug --berksfile %s" % [
179
- Shellwords::escape(berksfile)
179
+ knife_args = if knife
180
+ '--config %s' % Shellwords::escape(berkshelf_config knife)
181
+ end
182
+
183
+ cmd = "berks update --debug --berksfile %s %s" % [
184
+ Shellwords::escape(berksfile), knife_args
180
185
  ]
181
186
  begin
182
187
  $stdout.puts "berks_update: %s" % cmd
@@ -194,13 +199,17 @@ module KitchenHooks
194
199
  end
195
200
 
196
201
 
197
- def self.berks_install berksfile
202
+ def self.berks_install berksfile, knife=nil
198
203
  $stdout.puts 'started berks_install berksfile=%s' % berksfile.inspect
199
204
  env_git_dir = ENV.delete 'GIT_DIR'
200
205
  env_git_work_tree = ENV.delete 'GIT_WORK_TREE'
201
206
 
202
- cmd = "berks install --debug --berksfile %s" % [
203
- Shellwords::escape(berksfile)
207
+ knife_args = if knife
208
+ '--config %s' % Shellwords::escape(berkshelf_config knife)
209
+ end
210
+
211
+ cmd = "berks install --debug --berksfile %s %s" % [
212
+ Shellwords::escape(berksfile), knife_args
204
213
  ]
205
214
  begin
206
215
  $stdout.puts "berks_install: %s" % cmd
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen_hooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.14
4
+ version: 1.7.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Clemmer