erb_sandbox 0.1.0 → 0.1.2

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: 8bb82867229a983ff1d0a02bf4a5d2840f03ee17
4
- data.tar.gz: 1e489677a85e5210406ecf2b81195e77be086a3d
3
+ metadata.gz: 18a2ff0e45e63c6917c4e1e7b84897c6a59b988f
4
+ data.tar.gz: 3a799a123690de2e07fda68c05e12c42484cbc70
5
5
  SHA512:
6
- metadata.gz: eda72dd9b44e94c8961434116892c7784d0c9a9066805ea5b01f552443a3081abe5de55a7b98a2ebe4fa453a984f434e983e38fc7390ad3bc95c38bac1eeef4b
7
- data.tar.gz: d3a0bdc9151eca3d0bda722ec605e657cf544483df6159b77ed847aa3db10b7462e8844d25f4003dac5e823b196a64f57c261386b45e1696d418b7c50190fe5f
6
+ metadata.gz: ecd4c92d5c06b0532ffc3fcca0c13ff660da7a96a70a46f1120043550182aa0cb9f7460cefbd70f31379df44889324d0a9c9f65f445d9e0320edaf8deda977c9
7
+ data.tar.gz: 8a4e59238d659a64cf846c50963193670cd7db9836479e5aa9981551fbfca06c1fe1ac0cb048207973d7ed991fba2052f21ee2b0ce654fad44f477d3aaed959a
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # ERB Sandbox v0.1.0
1
+ # ERB Sandbox v0.1.2
2
2
  ERB Sandbox allows you to encapsulate your program from ERB.
3
3
 
4
4
  ### Problem
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'erb_sandbox'
3
- s.version = '0.1.0'
3
+ s.version = '0.1.2'
4
4
  s.date = '2015-12-04'
5
5
  s.summary = 'ERB Sandbox'
6
6
  s.description = 'Gem allows you to render ERB templates in sandbox with predefined vars'
@@ -20,11 +20,12 @@ module ErbSandbox
20
20
  #
21
21
  def self.render(template, variables = {})
22
22
  file = Tempfile.new 'erb_sandbox', encoding: 'UTF-8'
23
+ file.write "<%#-*- coding: UTF-8 -*-%>\n"
23
24
  file.write variables_init_code variables
24
25
  file.write template
25
26
  file.close
26
27
 
27
- output, status = Open3.capture2e "erb #{file.path}" # supress stderr
28
+ output, status = Open3.capture2e "erb -T 1 #{file.path}" # supress stderr
28
29
  file.unlink
29
30
 
30
31
  fail(StatusIsNotZero, output) unless status.to_i.zero?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erb_sandbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Non