fastball 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastball/config.rb +7 -1
- data/lib/fastball/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd46188b5c2f55f1b6857d5800542bfe1455eafc
|
4
|
+
data.tar.gz: 41bb457b5fc021df06a327961bc9fb5be5914f5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d311b1025de64fb746fe85f68ae5c184d216fc48d2c87217366e9a94ce30e031c89f04978cb09fa1881e073b05091b3a5bd5ba4dcb23779c66a8fd481696c26
|
7
|
+
data.tar.gz: b6687b2d159480ab6680dba97db576863e36ef49a2ccfefffe349a4e65bd24be1a057ccf163e3b036718f5597cdc25a21c79a72a4ed73ef7bc9814a874798952
|
data/lib/fastball/config.rb
CHANGED
@@ -128,7 +128,7 @@ module Fastball
|
|
128
128
|
|
129
129
|
def render_template(path)
|
130
130
|
progress "rendering '#{path}'"
|
131
|
-
template = ERB.new
|
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
|
data/lib/fastball/version.rb
CHANGED
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.
|
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-
|
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:
|