server-blender-manifest 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.11
1
+ 0.0.12
@@ -1,5 +1,11 @@
1
1
  module Blender
2
2
  module Manifest
3
3
  ROOT = File.expand_path("../manifest/root.rb", __FILE__)
4
+
5
+ # run the root manifest with shadow_puppet of the given VERSION
6
+ # @param [String] shadow_puppet_version the version of the shadow_puppet gem to use
7
+ def self.run(shadow_puppet_version)
8
+ system "shadow_puppet", "_#{shadow_puppet_version}_", ROOT
9
+ end
4
10
  end
5
11
  end
@@ -23,8 +23,18 @@ class Root < ::ShadowPuppet::Manifest
23
23
  def execute_user_recipe
24
24
  raise "no RECIPE to execute" unless recipe = ENV['RECIPE']
25
25
 
26
+ # first load user's recipe
26
27
  code = open(recipe).read
27
28
  instance_eval(code, recipe)
29
+
30
+ # next load OS specific recipe. This gives user's recipe
31
+ # the opportunity to redefine it if needed
32
+ _os = os.downcase
33
+ unless respond_to?(_os)
34
+ mix _os
35
+ end
36
+ send _os
37
+
28
38
  end
29
39
  recipe :execute_user_recipe
30
40
  end
@@ -34,5 +44,5 @@ include Blender::Manifest::Mixer
34
44
  # "project" recipe directory
35
45
  $: << "recipes"
36
46
 
37
- # add all libs in the ./cookbook directory to the path
38
- $:.concat Dir["cookbook/*/recipes"]
47
+ # add all recipes in the cookbooks directory to the path
48
+ $:.concat Dir["cookbooks/*/recipes"]
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{server-blender-manifest}
8
- s.version = "0.0.11"
8
+ s.version = "0.0.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Vitaly Kushner"]
12
- s.date = %q{2010-06-15}
12
+ s.date = %q{2010-06-17}
13
13
  s.description = %q{This gem is part of the server-blender family (http://astrails.com/opensource/server-blender)
14
14
  It contains server-side root manifest implementation for blender recipes. See server-blender for more information.
15
15
  }
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 11
9
- version: 0.0.11
8
+ - 12
9
+ version: 0.0.12
10
10
  platform: ruby
11
11
  authors:
12
12
  - Vitaly Kushner
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-15 00:00:00 +03:00
17
+ date: 2010-06-17 00:00:00 +03:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency