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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4407d16e10916e6557a4bba227ad9846f38f1cea
4
- data.tar.gz: 1def38c77c6d37fb770f0729f40bd3cc73291ccd
3
+ metadata.gz: d24e1d2e08127bfd3f56bf377439d41752b938d1
4
+ data.tar.gz: 7a9763eae6c829ce41205d339830a9a667996c6c
5
5
  SHA512:
6
- metadata.gz: f928814a38b3a55d68715a73c76c9fe163582de40591124406f5b4c00da5b9c767053bfba489996f6581a468133606a5e107282c6f386fede5e670d56f26bc4b
7
- data.tar.gz: a5de664f06a59cafb3feb5a04bd7233e554fbbb7ff8fbba0e14408da4b67b5e624fd4161cb9a0ba47c0675cdabcde464243566c816797d98aed0f50c3266b685
6
+ metadata.gz: 8c79436f72d00ae3db635b8c86ba4ff978effb1babbc015339b321c401fa3a6ba4993c0564ac02ae0dc1176a21859358d3f6fc729d5052e0e727736c4a67e49d
7
+ data.tar.gz: 3e1d835c5717150a6bfb2392ecd6ca5a0fb22d25807f0f618393f098eb64e90516f52e0abdb5db8d9ccd767bc4429bf9ba40f91311d48472e663110fb49a6c13
@@ -2,14 +2,6 @@ require 'smart_properties'
2
2
 
3
3
  module Quilt
4
4
  module UIHelper
5
- def self.logger_callback
6
- nil
7
- end
8
-
9
- def self.render_fallback
10
- false
11
- end
12
-
13
5
  class Component < SimpleDelegator
14
6
  # rubocop:disable Alias
15
7
  alias view_context __getobj__
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Quilt
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
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.6
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-19 00:00:00.000000000 Z
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