erb_asterisk 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/erb_asterisk/version.rb +1 -1
- data/lib/erb_asterisk.rb +6 -2
- 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: 124bb817f6e9799290a789694e9be27b777d6530
|
4
|
+
data.tar.gz: af58874559e1b969d11bdfe3e41ba6512cc04978
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31ec76833416111df756969553f613e36dcdd64dca87fe6b0dfe3e1ecbb95cb025b105780c6137b6d99b8274b0f9992f713193527fe950bdaf595dda62e2fe4b
|
7
|
+
data.tar.gz: c2c040017c0bb3977507e2f767e111056629fb3b38dc9b3f1f11e1258b0b14ef42a5a367dc15d94549d102b904b1185a65492857ebc4e30e29dc480bb5bae36c
|
data/lib/erb_asterisk/version.rb
CHANGED
data/lib/erb_asterisk.rb
CHANGED
@@ -6,7 +6,7 @@ module ErbAsterisk
|
|
6
6
|
# Render template
|
7
7
|
def render(template, vars = {})
|
8
8
|
tpl = read_template(template)
|
9
|
-
e =
|
9
|
+
e = new_erb(tpl)
|
10
10
|
|
11
11
|
b = binding
|
12
12
|
vars.each do |name, value|
|
@@ -136,7 +136,7 @@ module ErbAsterisk
|
|
136
136
|
erbs.each do |file, value|
|
137
137
|
# Declare global variable with current erb file name for include_to method:
|
138
138
|
TOPLEVEL_BINDING.local_variable_set(:current_conf_file, value[:config])
|
139
|
-
erbs[file][:content] =
|
139
|
+
erbs[file][:content] = new_erb(value[:content]).result
|
140
140
|
end
|
141
141
|
end
|
142
142
|
|
@@ -166,4 +166,8 @@ module ErbAsterisk
|
|
166
166
|
|
167
167
|
raise "Template not found: #{template}"
|
168
168
|
end
|
169
|
+
|
170
|
+
def new_erb(content)
|
171
|
+
ERB.new(content, nil, '-')
|
172
|
+
end
|
169
173
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: erb_asterisk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artem Baikuzin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slop
|