pakyow-slim 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/pakyow-slim.rb +21 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29d38825b565c52dd0735eab6956ebbf73a33946
|
4
|
+
data.tar.gz: eea716b321f0e726508fef322f5a3e4b00b88c9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0db88ca32afe2648f63231a0e8119271b8c3536e499816f56583638b33970d8bc687df6a2ef4f777c948f66cda0c85ad06b480e424e584596cf0d8725ad9ad15
|
7
|
+
data.tar.gz: 5f758440c2d6e10a5ef6ef40bc2296459c26f05dcdd1a73a32ea40fb992bae4dcc9b2c6e6ecf99891bf9230fe9efe2e8bbfaa425966e33ae0ae05ddd8ea94df1
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/lib/pakyow-slim.rb
CHANGED
@@ -3,12 +3,27 @@ $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
|
|
3
3
|
|
4
4
|
require 'slim'
|
5
5
|
|
6
|
+
|
7
|
+
module SetSlimOptions
|
8
|
+
Slim::Engine.set_options(
|
9
|
+
shortcut:
|
10
|
+
{ '@@' => { tag: 'div', attr: 'data-scope' },
|
11
|
+
'@' => { tag: 'div', attr: 'data-prop' },
|
12
|
+
'#' => { tag: 'div', attr: 'id' },
|
13
|
+
'.' => { tag: 'div', attr: 'class' }
|
14
|
+
}
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
6
18
|
Pakyow::App.processor :slim do |content|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
19
|
+
begin
|
20
|
+
temp = Tempfile.new('foo')
|
21
|
+
temp.write(content)
|
22
|
+
temp.rewind
|
23
|
+
processed_content = Slim::Template.new(temp.path).render
|
24
|
+
ensure
|
25
|
+
temp.close
|
26
|
+
temp.unlink
|
27
|
+
end
|
13
28
|
processed_content
|
14
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pakyow-slim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan McGuire
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pakyow-core
|