caterer 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,9 +12,14 @@ module Caterer
12
12
 
13
13
  def call(env)
14
14
 
15
- if env[:provisioner].is_a? Caterer::Provisioner::ChefSolo or env[:force_berks_clean]
16
- ::Berkshelf.formatter.msg "cleaning Caterer's shelf"
17
- FileUtils.remove_dir(shelf, fore: true)
15
+ config = env[:config]
16
+ image = config.images[env[:image]]
17
+
18
+ image.provisioners.each do |provisioner|
19
+ if provisioner.is_a? Caterer::Provisioner::ChefSolo or env[:force_berks_clean]
20
+ ::Berkshelf.formatter.msg "cleaning Caterer's shelf"
21
+ FileUtils.remove_dir(shelf, fore: true)
22
+ end
18
23
  end
19
24
 
20
25
  @app.call(env)
@@ -20,8 +20,13 @@ module Caterer
20
20
 
21
21
  def call(env)
22
22
 
23
- if env[:provisioner].is_a? Caterer::Provisioner::ChefSolo
24
- configure_cookbooks_path(env[:provisioner])
23
+ config = env[:config]
24
+ image = config.images[env[:image]]
25
+
26
+ image.provisioners.each do |provisioner|
27
+ if provisioner.is_a? Caterer::Provisioner::ChefSolo
28
+ configure_cookbooks_path(provisioner)
29
+ end
25
30
  end
26
31
 
27
32
  if needs_update? or env[:force_berks_install]
@@ -31,7 +31,7 @@ module Caterer
31
31
 
32
32
  Caterer.config_keys.register(:berkshelf) { Config::Berkshelf }
33
33
 
34
- Caterer.actions[:provision].insert(Caterer::Action::Provisioner::Prepare, install)
34
+ Caterer.actions[:provision].insert(Caterer::Action::Server::Lock, install)
35
35
 
36
36
  Caterer.actions[:clean].use clean
37
37
 
@@ -1,3 +1,3 @@
1
1
  module Caterer
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caterer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -271,7 +271,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
271
271
  version: '0'
272
272
  segments:
273
273
  - 0
274
- hash: -3139505216028486009
274
+ hash: -1508035868694574119
275
275
  required_rubygems_version: !ruby/object:Gem::Requirement
276
276
  none: false
277
277
  requirements:
@@ -280,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
280
280
  version: '0'
281
281
  segments:
282
282
  - 0
283
- hash: -3139505216028486009
283
+ hash: -1508035868694574119
284
284
  requirements: []
285
285
  rubyforge_project:
286
286
  rubygems_version: 1.8.23