marfa 0.7.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/marfa/controllers/base_controller.rb +2 -1
- data/lib/marfa/helpers/classes/array.rb +6 -0
- data/lib/marfa/helpers/classes/false_class.rb +6 -0
- data/lib/marfa/helpers/classes/hash.rb +6 -0
- data/lib/marfa/helpers/classes/nil_class.rb +6 -0
- data/lib/marfa/helpers/classes/numeric.rb +6 -0
- data/lib/marfa/helpers/classes/object.rb +6 -0
- data/lib/marfa/helpers/classes/string.rb +6 -0
- data/lib/marfa/helpers/classes/time.rb +6 -0
- data/lib/marfa/helpers/classes/true_class.rb +6 -0
- data/lib/marfa/helpers/controller.rb +4 -2
- data/lib/marfa/version.rb +1 -1
- data/marfa.gemspec +1 -1
- 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: 3e60d2144bd63fc9e3bd552836a8269089cbb1a0
|
4
|
+
data.tar.gz: be94416542673b74c5d005f7047505ddf6809319
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 643ada8e6a1c00cce4d6709b5e8823646494f19c0a18e02695b3a4f04c7cd69d57b3d81f515fa803246ac74aba079865c9c251d29688e3da59f52b35134e74e3
|
7
|
+
data.tar.gz: fea2023a9a93e7216f0bd416bfe4e97a3e7800354bccf79ac02402d7381091a2583b4ae577cc2b719b620d7559fae735bceff0c065e28a181b44e59a6521b2b6
|
@@ -10,7 +10,8 @@ module Marfa
|
|
10
10
|
# render_content('some_key', 'path/url', {})
|
11
11
|
# @return [String] rendered content
|
12
12
|
def render_content(path, data)
|
13
|
-
|
13
|
+
template_engine = Marfa.config.template_engine || :haml
|
14
|
+
render(template_engine, :"#{path}", locals: data)
|
14
15
|
end
|
15
16
|
|
16
17
|
# Rendering cached content
|
@@ -117,7 +118,8 @@ module Marfa
|
|
117
118
|
# @return [String] HTML
|
118
119
|
def render_pagination(data, template = nil)
|
119
120
|
template ||= Marfa.config.pagination_template
|
120
|
-
|
121
|
+
template_engine = Marfa.config.template_engine || :haml
|
122
|
+
render(template_engine, :"#{template}", locals: data)
|
121
123
|
end
|
122
124
|
|
123
125
|
# Render block with data from cache, return html
|
data/lib/marfa/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Version constant
|
2
2
|
module Marfa
|
3
3
|
# The version constant for the current version of Marfa
|
4
|
-
VERSION = '0.
|
4
|
+
VERSION = '0.8.1'.freeze unless defined?(Marfa::VERSION)
|
5
5
|
|
6
6
|
# The current Marfa version.
|
7
7
|
# @return [String] The version number
|
data/marfa.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marfa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Krechetov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-12-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: haml
|