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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/pakyow-slim.rb +21 -6
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 715b04918eae195da00c893e97e1fff48b98d6f1
4
- data.tar.gz: 9e0cf951c304a19bb6e15908e1e6910b71529ada
3
+ metadata.gz: 29d38825b565c52dd0735eab6956ebbf73a33946
4
+ data.tar.gz: eea716b321f0e726508fef322f5a3e4b00b88c9c
5
5
  SHA512:
6
- metadata.gz: 3ce372433bbfd87dbb31dc6a6926893b8d699fd44a0023e0185635e9c2099db664e0b7bde96bd02fe8079751cab887db5688e9ff0af18f7400db891c36c87e56
7
- data.tar.gz: 1d268bf6339d51f1b46a68b76de5d0e0579014de698b94185e4654f21169ca21d0ac035cc64b87dd3e085494c713d5afb11df9e870e9554d3e57a1c9cdbb8105
6
+ metadata.gz: 0db88ca32afe2648f63231a0e8119271b8c3536e499816f56583638b33970d8bc687df6a2ef4f777c948f66cda0c85ad06b480e424e584596cf0d8725ad9ad15
7
+ data.tar.gz: 5f758440c2d6e10a5ef6ef40bc2296459c26f05dcdd1a73a32ea40fb992bae4dcc9b2c6e6ecf99891bf9230fe9efe2e8bbfaa425966e33ae0ae05ddd8ea94df1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.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
- temp = Tempfile.new('foo')
8
- temp.write(content)
9
- temp.rewind
10
- processed_content = Slim::Template.new(temp.path).render
11
- temp.close
12
- temp.unlink
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.1.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-22 00:00:00.000000000 Z
11
+ date: 2014-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pakyow-core