fpm-cookery 0.20.0 → 0.20.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/fpm/cookery/book.rb +2 -2
- data/lib/fpm/cookery/chain_packager.rb +3 -3
- data/lib/fpm/cookery/cli.rb +3 -4
- data/lib/fpm/cookery/omnibus_packager.rb +3 -3
- data/lib/fpm/cookery/recipe.rb +3 -1
- data/lib/fpm/cookery/version.rb +1 -1
- 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: aa7f46e1eb70773b5bfacf698d04a89225eb95ed
|
4
|
+
data.tar.gz: 12121c4b25f7a217724da9a8ec040aba3411e576
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d527a0a19a001c6e1efcbc2638727ac9f8eab6e389c693bc3efca07f5438757283f709e10621f986e7ad929cf4345b2f52835898703c7a13cf4be4c029b90b6a
|
7
|
+
data.tar.gz: eb924a9ed4ccc11fcd2e8850de9c95e1c9cd2c2d30926278419ba8cd99814c27cc4ba6ca5d0230cb3bf10135735f143331478e8a00f8331460b190782b322a6a
|
data/CHANGELOG.md
CHANGED
data/lib/fpm/cookery/book.rb
CHANGED
@@ -11,9 +11,9 @@ module FPM
|
|
11
11
|
|
12
12
|
# Load the given file and instantiate an object. Wrap the class in an
|
13
13
|
# anonymous module to avoid namespace cluttering. (see Kernel.load)
|
14
|
-
def load_recipe(filename, &callback)
|
14
|
+
def load_recipe(filename, config, &callback)
|
15
15
|
Kernel.load(filename, true)
|
16
|
-
callback.call(@recipe)
|
16
|
+
callback.call(@recipe.new(filename, config))
|
17
17
|
end
|
18
18
|
|
19
19
|
def add_recipe_class(klass)
|
@@ -8,7 +8,7 @@ module FPM
|
|
8
8
|
|
9
9
|
attr_reader :packager, :recipe, :config
|
10
10
|
|
11
|
-
def initialize(packager, config
|
11
|
+
def initialize(packager, config)
|
12
12
|
@packager = packager
|
13
13
|
@recipe = packager.recipe
|
14
14
|
@config = config
|
@@ -27,8 +27,8 @@ module FPM
|
|
27
27
|
|
28
28
|
Log.info "Located recipe at #{recipe_file} for child recipe #{name}; starting build"
|
29
29
|
|
30
|
-
FPM::Cookery::Book.instance.load_recipe(recipe_file) do |dep_recipe|
|
31
|
-
depPackager = FPM::Cookery::Packager.new(dep_recipe, config)
|
30
|
+
FPM::Cookery::Book.instance.load_recipe(recipe_file, config) do |dep_recipe|
|
31
|
+
depPackager = FPM::Cookery::Packager.new(dep_recipe, config.to_hash)
|
32
32
|
depPackager.target = FPM::Cookery::Facts.target.to_s
|
33
33
|
|
34
34
|
#Chain, chain, chain ...
|
data/lib/fpm/cookery/cli.rb
CHANGED
@@ -68,8 +68,7 @@ module FPM
|
|
68
68
|
|
69
69
|
FPM::Cookery::BaseRecipe.send(:include, FPM::Cookery::BookHook)
|
70
70
|
|
71
|
-
FPM::Cookery::Book.instance.load_recipe(recipe_file) do |
|
72
|
-
recipe = recipe_class.new(recipe_file, config)
|
71
|
+
FPM::Cookery::Book.instance.load_recipe(recipe_file, config) do |recipe|
|
73
72
|
packager = FPM::Cookery::Packager.new(recipe, config.to_hash)
|
74
73
|
packager.target = FPM::Cookery::Facts.target.to_s
|
75
74
|
|
@@ -105,9 +104,9 @@ module FPM
|
|
105
104
|
|
106
105
|
def exec(config, recipe, packager)
|
107
106
|
if recipe.omnibus_package == true
|
108
|
-
FPM::Cookery::OmnibusPackager.new(packager, config
|
107
|
+
FPM::Cookery::OmnibusPackager.new(packager, config).run
|
109
108
|
elsif recipe.chain_package == true
|
110
|
-
FPM::Cookery::ChainPackager.new(packager, config
|
109
|
+
FPM::Cookery::ChainPackager.new(packager, config).run
|
111
110
|
else
|
112
111
|
packager.dispense
|
113
112
|
end
|
@@ -6,9 +6,9 @@ module FPM
|
|
6
6
|
class OmnibusPackager
|
7
7
|
include FPM::Cookery::Utils
|
8
8
|
|
9
|
-
attr_reader :packager, :recipe
|
9
|
+
attr_reader :packager, :recipe, :config
|
10
10
|
|
11
|
-
def initialize(packager, config
|
11
|
+
def initialize(packager, config)
|
12
12
|
@packager = packager
|
13
13
|
@config = config
|
14
14
|
@recipe = packager.recipe
|
@@ -25,7 +25,7 @@ module FPM
|
|
25
25
|
exit 1
|
26
26
|
end
|
27
27
|
|
28
|
-
FPM::Cookery::Book.instance.load_recipe(recipe_file) do |dep_recipe|
|
28
|
+
FPM::Cookery::Book.instance.load_recipe(recipe_file, config) do |dep_recipe|
|
29
29
|
dep_recipe.destdir = "#{recipe.omnibus_dir}/embedded" if recipe.omnibus_dir
|
30
30
|
dep_recipe.omnibus_installing = true if recipe.omnibus_dir
|
31
31
|
if dep_recipe.omnibus_recipes.any?
|
data/lib/fpm/cookery/recipe.rb
CHANGED
@@ -109,7 +109,9 @@ module FPM
|
|
109
109
|
pkg_depends = self.class.depends_all
|
110
110
|
if self.class.omnibus_package
|
111
111
|
self.class.omnibus_recipes.each { |omni_recipe|
|
112
|
-
|
112
|
+
recipe_file = File.expand_path(omni_recipe + '.rb', File.dirname(filename))
|
113
|
+
|
114
|
+
Book.instance.load_recipe(recipe_file, config) do |recipe|
|
113
115
|
pkg_depends << recipe.depends_all
|
114
116
|
end
|
115
117
|
}
|
data/lib/fpm/cookery/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fpm-cookery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.20.
|
4
|
+
version: 0.20.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernd Ahlers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|