staticz 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d778ec6e3bd50f39361d84393c7de56ae57888e5bc59d22a6237af9f81c9ba4
4
- data.tar.gz: 655bf3dff47d221a2b8baa1e84917d9dd958c641b278ecd1e4cb3bf1ea2e8a72
3
+ metadata.gz: 18903b9d06f2c505eae4c6e385461a6c82562a0c527d2cfb4474dd58759b1413
4
+ data.tar.gz: d14b7be4560eeaadab43aa4749cf63c50fb60f1f27cef7e0d96d3fd052e837e5
5
5
  SHA512:
6
- metadata.gz: 505c8756fdb68da5e127cb84f0df493615f5390f5abeed9b1a739b77fa42c2f76582ce1ac1979eb58589f2cdbd90f144d52e225710f42f8816481993e34a4914
7
- data.tar.gz: f8936d899637624582117c0178c90c0494f7696d78874d99e02a056a96f4775117de5d521fbaf301f083035690c6e72557f9662eaf16dc179c4e826516c71318
6
+ metadata.gz: 32741ea3f2b95ada6ef444fa4db52ee92323bb5bfe82c2bf8ea510c678f77dae199920487eda5770947510f672e739d523e165e25857a71433a48db7c01ca79d
7
+ data.tar.gz: d110fd34a052eb8b551caeb080840909a32eaa9a8baf218ad37204b705a4dcb8501e840300ac7657d575a7026a629b371a289a180cf45a531cda8b5bba3c732a
data/lib/settings.rb CHANGED
@@ -17,3 +17,11 @@ module Staticz
17
17
  end
18
18
  end
19
19
  end
20
+
21
+ def development?
22
+ Staticz::Settings.development?
23
+ end
24
+
25
+ def production?
26
+ Staticz::Settings.production?
27
+ end
data/lib/utils/helpers.rb CHANGED
@@ -1,8 +1,8 @@
1
- def render(component, &block)
1
+ def render(component, locals: {}, &block)
2
2
  engine = ::Haml::Engine.new(File.read("src/#{component}.haml"))
3
3
 
4
4
  if block
5
- engine.render({}, &block)
5
+ engine.render(Object.new, locals, &block)
6
6
  else
7
7
  engine.render
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: staticz
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philipp Schlesinger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-29 00:00:00.000000000 Z
11
+ date: 2022-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: haml