fastball 0.3.1 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9c654553b5c92ec10bb6c9617a9b4daada688ad
4
- data.tar.gz: b50e7ef30feb61d1dbb925db96f2b21f66db1e9f
3
+ metadata.gz: bd46188b5c2f55f1b6857d5800542bfe1455eafc
4
+ data.tar.gz: 41bb457b5fc021df06a327961bc9fb5be5914f5f
5
5
  SHA512:
6
- metadata.gz: 4a91b65dbc2b9ea2daf01daa7b9714e215ddcbf693023b387571d9439f9538c09c79b0e465e7d04cdc112e707a083151c5c91466ceae285fdbd166bc5ab1bc09
7
- data.tar.gz: ca27559af58c05bcba657f555ad69bf65c61af5fcd187349211eadcee15339be79bf3e60618c221c0537929219e537185a3fec4952bb3fe4745a1f24f139e0bf
6
+ metadata.gz: 4d311b1025de64fb746fe85f68ae5c184d216fc48d2c87217366e9a94ce30e031c89f04978cb09fa1881e073b05091b3a5bd5ba4dcb23779c66a8fd481696c26
7
+ data.tar.gz: b6687b2d159480ab6680dba97db576863e36ef49a2ccfefffe349a4e65bd24be1a057ccf163e3b036718f5597cdc25a21c79a72a4ed73ef7bc9814a874798952
@@ -128,7 +128,7 @@ module Fastball
128
128
 
129
129
  def render_template(path)
130
130
  progress "rendering '#{path}'"
131
- template = ERB.new File.read(path)
131
+ template = ERB.new pre_process_template(path)
132
132
  template_binding = config.instance_eval { binding }
133
133
  template.result template_binding
134
134
  end
@@ -139,6 +139,12 @@ module Fastball
139
139
  File.write real_path, result
140
140
  end
141
141
 
142
+ def pre_process_template(path)
143
+ File.read(path)
144
+ .gsub(/\{\{ */, '<%= ')
145
+ .gsub(/ *\}\}/, ' %>')
146
+ end
147
+
142
148
  end
143
149
 
144
150
  end
@@ -1,3 +1,3 @@
1
1
  module Fastball
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastball
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Bach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-03 00:00:00.000000000 Z
11
+ date: 2015-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -120,3 +120,4 @@ signing_key:
120
120
  specification_version: 4
121
121
  summary: The safest, fastest way to build and deploy dynamic applications.
122
122
  test_files: []
123
+ has_rdoc: