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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '084da093ef867a02e12e2976920c66d9c5ece051'
4
- data.tar.gz: 22c49bc080cbe45d7f173fa44b4c0ce4e47e3c14
3
+ metadata.gz: 124bb817f6e9799290a789694e9be27b777d6530
4
+ data.tar.gz: af58874559e1b969d11bdfe3e41ba6512cc04978
5
5
  SHA512:
6
- metadata.gz: 3522c39bd30eabc58c9b8c27bf788e40dc613e5505fb0455b9db2c723d3ac08b95e64c034b053c244ada3a6c26484f32f21806254de82aeb1e0b0212cb8b2793
7
- data.tar.gz: bc4f0aac21c7070cc3173d9a99b920f3fc91c45c61339ff2592a4da3d37db05bccb7b973fb0e472a0eae5facb1429479a6f399ef433f00d10c2d0e4cba6ba08e
6
+ metadata.gz: 31ec76833416111df756969553f613e36dcdd64dca87fe6b0dfe3e1ecbb95cb025b105780c6137b6d99b8274b0f9992f713193527fe950bdaf595dda62e2fe4b
7
+ data.tar.gz: c2c040017c0bb3977507e2f767e111056629fb3b38dc9b3f1f11e1258b0b14ef42a5a367dc15d94549d102b904b1185a65492857ebc4e30e29dc480bb5bae36c
@@ -1,3 +1,3 @@
1
1
  module ErbAsterisk
2
- VERSION = '0.0.11'.freeze
2
+ VERSION = '0.0.12'.freeze
3
3
  end
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 = ERB.new(tpl)
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] = ERB.new(value[:content]).result
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.11
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-07 00:00:00.000000000 Z
11
+ date: 2017-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slop