itamae 1.1.10 → 1.1.11

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: 616cfc3511d0ccaed6104add74b3502120fc80a5
4
- data.tar.gz: fdec38243e8406d3646df667690fd19129ff61cd
3
+ metadata.gz: 54ac557a58fa9efee07fc0dce29f5a6dc4746f64
4
+ data.tar.gz: 6e8a44e41dd103d32aaebd84f51e4de1c6029291
5
5
  SHA512:
6
- metadata.gz: 22cec5cb03fe430522b6afbd3f2159ff626f79cc8787d398224d69a6a78dd9ef801c937e0a056cd015d840113080a9b42b4c0afe60c268e87007173f34501b5b
7
- data.tar.gz: 300eead221e03c2e58c6604e150a6d1149646d826bfb1266fb527ceeed8dcdef0ad88790a70c6c2b0bf2b8775ea464b5f9ba3e7d809e33b3a29ffc5113d85e59
6
+ metadata.gz: e5193dc0d26d428f634030d966e2b4f59d59c2e4d582546ef808c5f8d78ac4b77a97ec8cce231288206a8aa3ea745ed2114bd36431604622e2894b087409d677
7
+ data.tar.gz: 122321d75100144a5bd5295e385bbd3addc4d30795d890cfc0c35a8f0edbaebb81aebfb2414e6970a301f3fd9dd0b24d90b74a20cff5a37f871ba9263337ef12
@@ -1,3 +1,10 @@
1
+ ## v1.1.11
2
+
3
+ Bugfixes
4
+
5
+ - [Do not include recipes which are already included.](https://github.com/itamae-kitchen/itamae/pull/85)
6
+ - This may break backward compatibility.
7
+
1
8
  ## v1.1.10
2
9
 
3
10
  Feature
data/README.md CHANGED
@@ -49,7 +49,8 @@ Further example is here: [spec/integration/recipes/default.rb](spec/integration/
49
49
 
50
50
  ## Documentations
51
51
 
52
- https://github.com/ryotarai/itamae/wiki
52
+ - http://itamae.kitchen/docs.html
53
+ - https://github.com/ryotarai/itamae/wiki
53
54
 
54
55
  ## Run tests
55
56
 
@@ -29,9 +29,11 @@ module Itamae
29
29
  @runner = runner
30
30
  @path = path
31
31
  @delayed_notifications = []
32
+ @children = RecipeChildren.new
33
+ end
32
34
 
33
- context = EvalContext.new(self)
34
- @children = context.children
35
+ def load
36
+ EvalContext.new(self)
35
37
  end
36
38
 
37
39
  def run(options = {})
@@ -49,11 +51,8 @@ module Itamae
49
51
  end
50
52
 
51
53
  class EvalContext
52
- attr_reader :children
53
-
54
54
  def initialize(recipe)
55
55
  @recipe = recipe
56
- @children = RecipeChildren.new
57
56
 
58
57
  instance_eval(File.read(@recipe.path), @recipe.path, 1)
59
58
  end
@@ -76,7 +75,7 @@ module Itamae
76
75
  end
77
76
 
78
77
  resource = klass.new(@recipe, name, &block)
79
- @children << resource
78
+ @recipe.children << resource
80
79
  end
81
80
 
82
81
  def define(name, params = {}, &block)
@@ -104,12 +103,13 @@ module Itamae
104
103
  end
105
104
 
106
105
  if runner.children.find_recipe_by_path(path)
107
- Logger.debug "Recipe, #{target}, is skipped because it is already included"
106
+ Logger.debug "Recipe, #{path}, is skipped because it is already included"
108
107
  return
109
108
  end
110
109
 
111
110
  recipe = Recipe.new(runner, path)
112
- @children << recipe
111
+ @recipe.children << recipe
112
+ recipe.load
113
113
  end
114
114
 
115
115
  def node
@@ -68,6 +68,7 @@ module Itamae
68
68
  def deps_in_dot
69
69
  result = ""
70
70
  result << "digraph recipes {\n"
71
+ result << " rankdir=LR;\n"
71
72
  result << _deps_in_dot
72
73
  result << "}"
73
74
 
@@ -101,7 +101,9 @@ module Itamae
101
101
 
102
102
  def load_recipes(paths)
103
103
  paths.each do |path|
104
- children << Recipe.new(self, File.expand_path(path))
104
+ recipe = Recipe.new(self, File.expand_path(path))
105
+ children << recipe
106
+ recipe.load
105
107
  end
106
108
  end
107
109
 
@@ -1 +1 @@
1
- 1.1.10
1
+ 1.1.11
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.10
4
+ version: 1.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-17 00:00:00.000000000 Z
11
+ date: 2015-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  version: '0'
222
222
  requirements: []
223
223
  rubyforge_project:
224
- rubygems_version: 2.2.2
224
+ rubygems_version: 2.4.5
225
225
  signing_key:
226
226
  specification_version: 4
227
227
  summary: Simple Configuration Management Tool