quilt_ui 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/helpers/components/component.rb +0 -8
- data/helpers/ui_helper.rb +32 -0
- data/lib/quilt/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d24e1d2e08127bfd3f56bf377439d41752b938d1
|
4
|
+
data.tar.gz: 7a9763eae6c829ce41205d339830a9a667996c6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c79436f72d00ae3db635b8c86ba4ff978effb1babbc015339b321c401fa3a6ba4993c0564ac02ae0dc1176a21859358d3f6fc729d5052e0e727736c4a67e49d
|
7
|
+
data.tar.gz: 3e1d835c5717150a6bfb2392ecd6ca5a0fb22d25807f0f618393f098eb64e90516f52e0abdb5db8d9ccd767bc4429bf9ba40f91311d48472e663110fb49a6c13
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Quilt
|
2
|
+
module UIHelper
|
3
|
+
cattr_accessor :render_fallback
|
4
|
+
cattr_accessor :logger_callback
|
5
|
+
|
6
|
+
self.render_fallback = false
|
7
|
+
|
8
|
+
def self.comment_wrapping!
|
9
|
+
include(CommentWrapping)
|
10
|
+
end
|
11
|
+
|
12
|
+
module CommentWrapping
|
13
|
+
extend ActiveSupport::Concern
|
14
|
+
|
15
|
+
included do
|
16
|
+
instance_methods.each do |method_name|
|
17
|
+
next unless method_name.to_s.starts_with?('ui_')
|
18
|
+
|
19
|
+
original_ui_method = instance_method(method_name)
|
20
|
+
|
21
|
+
define_method(method_name) do |*args, &block|
|
22
|
+
safe_join [
|
23
|
+
"<!-- start #{method_name} -->".html_safe,
|
24
|
+
original_ui_method.bind(self).call(*args, &block),
|
25
|
+
"<!-- end #{method_name} -->".html_safe
|
26
|
+
]
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/quilt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quilt_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Sauve
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: smart_properties
|
@@ -63,6 +63,7 @@ files:
|
|
63
63
|
- assets/stylesheets/quilt/global/typography.scss
|
64
64
|
- helpers/components/badge.rb
|
65
65
|
- helpers/components/component.rb
|
66
|
+
- helpers/ui_helper.rb
|
66
67
|
- lib/quilt/engine.rb
|
67
68
|
- lib/quilt/version.rb
|
68
69
|
- lib/quilt_ui.rb
|