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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb9277f23528fc7aeb48ba0a8a10d9861c70917b
4
- data.tar.gz: e1379467c6ffe436d779e6d32ed472352aa31e43
3
+ metadata.gz: aa7f46e1eb70773b5bfacf698d04a89225eb95ed
4
+ data.tar.gz: 12121c4b25f7a217724da9a8ec040aba3411e576
5
5
  SHA512:
6
- metadata.gz: c703e14db35cff6e1a95778a7d7e0abc0519ff1f1ede27c11daf6d27bd8128cb18e1a36960187c3bcee0c4450af41939817706fbfc0d0fbad9bb839a7aa4d810
7
- data.tar.gz: 1a833e697752e67acb1b0eda8a44ec825cc1d8e084ebd72ea72462e0b5ef3890a554f4d2397371cc61a4faabf170e96e4992326165c7115d8ec29b1ea3b6eb27
6
+ metadata.gz: d527a0a19a001c6e1efcbc2638727ac9f8eab6e389c693bc3efca07f5438757283f709e10621f986e7ad929cf4345b2f52835898703c7a13cf4be4c029b90b6a
7
+ data.tar.gz: eb924a9ed4ccc11fcd2e8850de9c95e1c9cd2c2d30926278419ba8cd99814c27cc4ba6ca5d0230cb3bf10135735f143331478e8a00f8331460b190782b322a6a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v0.20.1 (2014-03-14)
2
+ * Unbreak omnibus and chain packagers. (#69)
3
+
1
4
  # v0.20.0 (2014-03-07)
2
5
  * Add `--tmp-root` command line option.
3
6
  * Add `--pkg-dir` command line option.
@@ -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 ...
@@ -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 |recipe_class|
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.to_hash).run
107
+ FPM::Cookery::OmnibusPackager.new(packager, config).run
109
108
  elsif recipe.chain_package == true
110
- FPM::Cookery::ChainPackager.new(packager, config.to_hash).run
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?
@@ -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
- Book.instance.load_recipe(File.expand_path(omni_recipe + '.rb', File.dirname(filename))) do |recipe|
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
  }
@@ -1,5 +1,5 @@
1
1
  module FPM
2
2
  module Cookery
3
- VERSION = '0.20.0'
3
+ VERSION = '0.20.1'
4
4
  end
5
5
  end
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.0
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-07 00:00:00.000000000 Z
11
+ date: 2014-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec