bosh-template 1.3215.4.0 → 1.3232.0
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/bosh/template/evaluation_context.rb +2 -2
- data/lib/bosh/template/evaluation_link.rb +2 -2
- data/lib/bosh/template/evaluation_link_instance.rb +3 -1
- data/lib/bosh/template/renderer.rb +1 -1
- data/lib/bosh/template/unknown_property.rb +1 -1
- data/lib/bosh/template/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: f9eac9a78f77ddf5d63258792d46733540892f3a
|
4
|
+
data.tar.gz: da5533f20c5e3a16078471f7befff9d126ee0106
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4691f25f963c63f12f4d03f9b68c15d2d7cf2d305e5a54cccbc7f865c30023de30fff03d9a2970aca2e725f302cc3301289b2e4ef1e986a4d7411d01196decde
|
7
|
+
data.tar.gz: 5fe3838dc57cdb0e3ecb3f759ef5273d4d03e9c4363e2b37350c0b9168f874279849343853fbb1604d085b99d81a693ab63dbac75dcabae39f7b8fc24e900de0
|
@@ -99,7 +99,7 @@ module Bosh
|
|
99
99
|
|
100
100
|
if result.has_key?("instances")
|
101
101
|
instance_array = result["instances"].map do |link_spec|
|
102
|
-
EvaluationLinkInstance.new(link_spec["name"], link_spec["index"], link_spec["id"], link_spec["az"], link_spec["address"], link_spec["properties"])
|
102
|
+
EvaluationLinkInstance.new(link_spec["name"], link_spec["index"], link_spec["id"], link_spec["az"], link_spec["address"], link_spec["properties"], link_spec["bootstrap"])
|
103
103
|
end
|
104
104
|
return EvaluationLink.new(instance_array, result["properties"])
|
105
105
|
end
|
@@ -129,7 +129,7 @@ module Bosh
|
|
129
129
|
return ActiveElseBlock.new(self)
|
130
130
|
else
|
131
131
|
instance_array = link_found["instances"].map do |link_spec|
|
132
|
-
EvaluationLinkInstance.new(link_spec["name"], link_spec["index"], link_spec["id"], link_spec["az"], link_spec["address"], link_spec["properties"])
|
132
|
+
EvaluationLinkInstance.new(link_spec["name"], link_spec["index"], link_spec["id"], link_spec["az"], link_spec["address"], link_spec["properties"], link_spec["bootstrap"])
|
133
133
|
end
|
134
134
|
|
135
135
|
yield EvaluationLink.new(instance_array, link_found["properties"])
|
@@ -26,12 +26,12 @@ module Bosh
|
|
26
26
|
def if_p(*names)
|
27
27
|
values = names.map do |name|
|
28
28
|
value = lookup_property(@properties, name)
|
29
|
-
return ActiveElseBlock.new(self) if value.nil?
|
29
|
+
return Bosh::Template::EvaluationContext::ActiveElseBlock.new(self) if value.nil?
|
30
30
|
value
|
31
31
|
end
|
32
32
|
|
33
33
|
yield *values
|
34
|
-
InactiveElseBlock.new
|
34
|
+
Bosh::Template::EvaluationContext::InactiveElseBlock.new
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -11,14 +11,16 @@ module Bosh
|
|
11
11
|
attr_reader :az
|
12
12
|
attr_reader :address
|
13
13
|
attr_reader :properties
|
14
|
+
attr_reader :bootstrap
|
14
15
|
|
15
|
-
def initialize(name, index, id, az, address, properties)
|
16
|
+
def initialize(name, index, id, az, address, properties, bootstrap)
|
16
17
|
@name = name
|
17
18
|
@index = index
|
18
19
|
@id = id
|
19
20
|
@az = az
|
20
21
|
@address = address
|
21
22
|
@properties = properties
|
23
|
+
@bootstrap = bootstrap
|
22
24
|
end
|
23
25
|
|
24
26
|
def p(*args)
|
@@ -12,7 +12,7 @@ module Bosh
|
|
12
12
|
def render(template_name)
|
13
13
|
spec = JSON.parse(@context)
|
14
14
|
evaluation_context = EvaluationContext.new(spec)
|
15
|
-
template = ERB.new(File.read(template_name))
|
15
|
+
template = ERB.new(File.read(template_name), safe_level = nil, trim_mode = "-")
|
16
16
|
template.result(evaluation_context.get_binding)
|
17
17
|
end
|
18
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh-template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3232.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pivotal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semi_semantic
|