itamae 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/itamae/definition.rb +5 -4
- data/lib/itamae/version.txt +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7c058fb908e33acf3e8c5f97bd56b39532df70a
|
4
|
+
data.tar.gz: 5c8164aad7d68c4a745cc14eb7a6903e3acc1401
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2781bd7cd7f012c464b6ba484e8c3a287c71a1e52d020838ab6b94c1941493347b53f366a3dce36ac0284ee5e474b3043a947b332aee9a7202698faf280106af
|
7
|
+
data.tar.gz: 2c40ca0c74cb5d735f854495aa28d453069c3ca24b15f775b63240bb819f861a91fd7d6067fc29c2d9825b8291a5af5b7952cf6d3b4e8da5ac33028243822d63
|
data/lib/itamae/definition.rb
CHANGED
@@ -28,7 +28,7 @@ module Itamae
|
|
28
28
|
|
29
29
|
construct_resources
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
def action_run(options)
|
33
33
|
@children.run(options)
|
34
34
|
end
|
@@ -38,7 +38,7 @@ module Itamae
|
|
38
38
|
def construct_resources
|
39
39
|
block = self.class.definition_block
|
40
40
|
|
41
|
-
context = Context.new(@attributes.merge(name: resource_name))
|
41
|
+
context = Context.new(self, @attributes.merge(name: resource_name))
|
42
42
|
context.instance_exec(&block)
|
43
43
|
@children = context.children
|
44
44
|
end
|
@@ -47,7 +47,8 @@ module Itamae
|
|
47
47
|
attr_reader :params
|
48
48
|
attr_reader :children
|
49
49
|
|
50
|
-
def initialize(params, &block)
|
50
|
+
def initialize(definition, params, &block)
|
51
|
+
@definition = definition
|
51
52
|
@params = params
|
52
53
|
@children = RecipeChildren.new
|
53
54
|
end
|
@@ -61,7 +62,7 @@ module Itamae
|
|
61
62
|
|
62
63
|
def method_missing(method, name, &block)
|
63
64
|
klass = Resource.get_resource_class(method)
|
64
|
-
resource = klass.new(
|
65
|
+
resource = klass.new(@definition.recipe, name, &block)
|
65
66
|
@children << resource
|
66
67
|
end
|
67
68
|
end
|
data/lib/itamae/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.7
|