zorglub 0.1.1 → 0.1.3
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 +4 -4
- data/Changelog +29 -0
- data/lib/zorglub/app.rb +1 -1
- data/lib/zorglub/engines/haml.rb +4 -3
- data/lib/zorglub/engines/sass.rb +3 -2
- data/lib/zorglub.rb +1 -1
- data/spec/data/view/node0/engines.haml +1 -1
- data/spec/node_spec.rb +3 -3
- data/spec/spec_helper.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15b48bc08713bc37d2166bd5b25f38a96f3dad82b0bc44f0bc557138b899ce2a
|
4
|
+
data.tar.gz: 876256741f2d5f0772ebd9563d120216c4297b1deff02825e8e14e8f1feda79a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1268e3cd8632e30dd62ccc24d5232dd65ac0600ada80285b5f350612eab7b6ac873853218a218e3b55f2070cc828ea1f7a7fc82af0e663108fceef42f3da6ef6
|
7
|
+
data.tar.gz: 21f9083de79c46d2c41129efdbeade803874e6c99f0684050c856cf03a11ba699f00366d1e46ab590a54d3d11f59dbb758ba32675f6de90976352306d8e05f2d
|
data/Changelog
CHANGED
@@ -1,3 +1,32 @@
|
|
1
|
+
2024-08-13 Jérémy Zurcher <jeremy@asynk.ch>
|
2
|
+
* release 0.1.3
|
3
|
+
* fix specs
|
4
|
+
* remove Haml __encoding__ option
|
5
|
+
|
6
|
+
2024-08-12 Jérémy Zurcher <jeremy@asynk.ch>
|
7
|
+
* release 0.1.2
|
8
|
+
* fix haml && sass caching
|
9
|
+
|
10
|
+
2024-08-12 Jérémy Zurcher <jeremy@asynk.ch>
|
11
|
+
* release 0.1.1
|
12
|
+
* support ruby 3.x
|
13
|
+
* major update && code formatting
|
14
|
+
|
15
|
+
2019-01-01 Jérémy Zurcher <jeremy@asynk.ch>
|
16
|
+
* release 0.1.0
|
17
|
+
* spec and coverage improvement
|
18
|
+
* remove Haml __ugly__ option
|
19
|
+
|
20
|
+
2014-02-12 Jérémy Zurcher <jeremy@asynk.ch>
|
21
|
+
* release 0.0.9
|
22
|
+
* accept Content-Type change via rack response
|
23
|
+
* improve error_404 log msg
|
24
|
+
* implement Node#no_view!
|
25
|
+
|
26
|
+
2013-09-04 Jérémy Zurcher <jeremy@asynk.ch>
|
27
|
+
* release 0.0.8
|
28
|
+
* implement Node#mime!
|
29
|
+
|
1
30
|
2013-02-01 Jérémy Zurcher <jeremy@asynk.ch>
|
2
31
|
* release 0.0.7
|
3
32
|
* zorglub.rb swallows version.rb
|
data/lib/zorglub/app.rb
CHANGED
data/lib/zorglub/engines/haml.rb
CHANGED
@@ -5,12 +5,13 @@ module Zorglub
|
|
5
5
|
module Engines
|
6
6
|
module Haml
|
7
7
|
def self.proc(path, obj)
|
8
|
-
haml = ::Haml::Template.new(path)
|
9
8
|
if obj.app.opt(:engines_cache_enabled)
|
10
9
|
key = path.sub obj.app.opt(:root), ''
|
11
|
-
obj.app.engines_cache[key]
|
10
|
+
haml = obj.app.engines_cache[key] || ::Haml::Template.new(obj.app.opt(:haml_options)) { ::File.read(path) }
|
11
|
+
else
|
12
|
+
haml = ::Haml::Template.new(obj.app.opt(:haml_options)) { ::File.read(path) }
|
12
13
|
end
|
13
|
-
html = haml.render(obj
|
14
|
+
html = haml.render(obj)
|
14
15
|
[html, 'text/html']
|
15
16
|
end
|
16
17
|
end
|
data/lib/zorglub/engines/sass.rb
CHANGED
@@ -4,10 +4,11 @@ module Zorglub
|
|
4
4
|
module Engines
|
5
5
|
module Sass
|
6
6
|
def self.proc(path, obj)
|
7
|
-
sass = ::Sass::Engine.new(::File.read(path), obj.app.opt(:sass_options))
|
8
7
|
if obj.app.opt(:engines_cache_enabled)
|
9
8
|
key = path.sub obj.app.opt(:root), ''
|
10
|
-
obj.app.engines_cache[key]
|
9
|
+
sass = obj.app.engines_cache[key] || ::Sass::Engine.new(::File.read(path), obj.app.opt(:sass_options))
|
10
|
+
else
|
11
|
+
sass = ::Sass::Engine.new(::File.read(path), obj.app.opt(:sass_options))
|
11
12
|
end
|
12
13
|
css = sass.render
|
13
14
|
[css, 'text/css']
|
data/lib/zorglub.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
%h1="Hello
|
1
|
+
%h1="Hello #{@name}"
|
data/spec/node_spec.rb
CHANGED
@@ -73,7 +73,7 @@ describe Zorglub do
|
|
73
73
|
end
|
74
74
|
|
75
75
|
it 'should raise error when too much arguments' do
|
76
|
-
expect
|
76
|
+
expect { Node0.my_call '/with_2args/1/2/3' }.to raise_error ArgumentError
|
77
77
|
end
|
78
78
|
|
79
79
|
it 'layout proc, method level layout and engine definitions should work' do
|
@@ -266,10 +266,10 @@ describe Zorglub do
|
|
266
266
|
it 'haml engine should work' do
|
267
267
|
Node0.app.opt! :engines_cache_enabled, false
|
268
268
|
r = Node0.my_call '/engines/haml'
|
269
|
-
expect(r.body[0]).to eq "<h1>Hello world</h1>\n"
|
269
|
+
expect(r.body[0]).to eq "<h1>Hello <i>world</i></h1>\n"
|
270
270
|
Node0.app.opt! :engines_cache_enabled, true
|
271
271
|
r = Node0.my_call '/engines/haml'
|
272
|
-
expect(r.body[0]).to eq "<h1>Hello world</h1>\n"
|
272
|
+
expect(r.body[0]).to eq "<h1>Hello <i>world</i></h1>\n"
|
273
273
|
end
|
274
274
|
|
275
275
|
it 'sass engine should work' do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zorglub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jérémy Zurcher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This is a very stripped down version of innate.
|
14
14
|
email:
|