cosme 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cosme.rb +1 -3
- data/lib/cosme/helpers.rb +1 -1
- data/lib/cosme/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51875f3ea020ecbc27f978b01a612059c1e80f09
|
4
|
+
data.tar.gz: f66b21d7e52740da386ced272fcaf0f3bfd33dfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f622aa7472068f6dff8f28e08b1020b7800ddc6223dd16c56d86bb6b60a094b46254be269a4501026bd2c089ced9aa59aefdc788c6ebb0395a498305686748d
|
7
|
+
data.tar.gz: ebb6ced1c50d55ebf5668431a009345651271833837f7f7237d7458ebd0d8a290499daf8618ac62f20ba86623a813fd1f3519699446c220d4d1aa18dc6f4d293
|
data/lib/cosme.rb
CHANGED
@@ -10,9 +10,7 @@ module Cosme
|
|
10
10
|
def define(cosmetic)
|
11
11
|
caller_path = caller_locations(1, 1)[0].path
|
12
12
|
|
13
|
-
|
14
|
-
render_options[:file] ||= default_file_path_for(caller_path) if render_options
|
15
|
-
cosmetic[:render] = render_options
|
13
|
+
cosmetic[:render] = { file: default_file_path_for(caller_path) } unless cosmetic[:render]
|
16
14
|
|
17
15
|
@cosmetics ||= {}
|
18
16
|
@cosmetics[caller_path] = cosmetic
|
data/lib/cosme/helpers.rb
CHANGED
@@ -3,7 +3,7 @@ module Cosme
|
|
3
3
|
def cosmeticize
|
4
4
|
Cosme.all.map do |cosmetic|
|
5
5
|
content = cosmetic[:render] ? render(cosmetic[:render]) : render
|
6
|
-
content_tag(:div, nil, class: 'cosmetic', data: cosmetic.except(:render).merge(content: content))
|
6
|
+
content_tag(:div, nil, class: 'cosmetic', data: cosmetic.except(:render).merge(content: "#{content}"))
|
7
7
|
end.join.html_safe
|
8
8
|
end
|
9
9
|
end
|
data/lib/cosme/version.rb
CHANGED