mini_erb 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aff6f338bd13d799f411d961cfdff3567c970257
4
- data.tar.gz: 5f52a24d7c91a2e9f023e9bbac0099df920a1091
3
+ metadata.gz: a7ea2f7f7a5f77c5ff4efc3a2733d064a57ba2b3
4
+ data.tar.gz: 7c621bcb57b6503e652722643b08b350dada8f8a
5
5
  SHA512:
6
- metadata.gz: 6af56e3cba6a6f1db760840d6dce4298f7fb2c1bc33d9bb66f7d0e15a3066aeae1103a642d0031c0a71fbe595476797f075f970cc4b36e64dc1eff3468ba096b
7
- data.tar.gz: 2749572d1280b968f2eb61a855d94592971dbeebe526de074efcc9c545f838f67996e693732a0e450557ec5d5804c334dae64519c5367f2dd2441cd9eb7818f9
6
+ metadata.gz: be9a6fe299ed165f39aa4fad8d7aa8f809df2b247f6e351fdc5762886196ca3600dc12cda3c7ac0628b367010463e868843622ef87db9a622ee94d91479cbe24
7
+ data.tar.gz: dc66680e11fc0d552bc863a8300f9f59c86ba1de01593c12c95850ffac2d4b738c142c5b414662a01efe992442bbc0e6ef2f75a17d13286b965b66da2d348bd1
data/README.md CHANGED
@@ -206,7 +206,8 @@ made this gem possible.
206
206
 
207
207
  The next step is to execute the transpiled code in an environment. This
208
208
  environment is a ruby binding to the virtual location of the code execution.
209
- In effect, code is executed from the place where the binding is taken.
209
+ In effect, code is executed as if it was placed in the spot where the binding
210
+ is taken.
210
211
 
211
212
  This use of bindings allows access to any variables that may have been defined
212
213
  in that a location and also allows the state of that location to be modified.
@@ -33,8 +33,6 @@ class MiniErb
33
33
  text, code, string = string.partition(/<%.*?%>/m)
34
34
 
35
35
  text.sub!(/\A$\r?\n?/, "") if suppress
36
- suppress = false
37
-
38
36
  buffer << "#{@eoutvar}<<#{text.inspect};" unless text.empty?
39
37
 
40
38
  unless code.empty?
@@ -50,7 +48,7 @@ class MiniErb
50
48
  end
51
49
  end
52
50
 
53
- @eoutvar + "='';" + buffer.join + @eoutvar
51
+ @eoutvar + "=String.new;" + buffer.join + @eoutvar
54
52
  end
55
53
 
56
54
  # Return the mini erb text with embedded Ruby results.
@@ -1,6 +1,6 @@
1
1
 
2
2
  class MiniErb
3
- VERSION = "0.1.0".freeze
3
+ VERSION = "0.1.1".freeze
4
4
 
5
5
  DESCRIPTION = "mini_erb: A simplified, streamlined erb replacement.".freeze
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_erb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - PeterCamilleri
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-08 00:00:00.000000000 Z
11
+ date: 2019-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler