izi_lightup 1.0.14 → 1.0.15

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: b4fe3f152ceb2ca19f1a2fe17b50d4900304d9f90fe653ac85b93107f5263704
4
- data.tar.gz: 570e5b0973a51cb297d2d1aecc67335433b432875b9d57400fa483d17efd2024
3
+ metadata.gz: 2e7e30e1ff97cc6b16730239bcf02e5f358bc82044955814691b1e6316f276cf
4
+ data.tar.gz: 7fd8a0f1c1a3307d24b7b4ea3097d96097a00b0f852a03e1162022f56a7ff742
5
5
  SHA512:
6
- metadata.gz: 356a0ba218ce60072b3680f423f385cdf1bc6f81e4477997a8ef2c80d666c3bb72683905fde9073078373059db0f86de5ecff85749471ddd8164b30cda4ada69
7
- data.tar.gz: 9820ed029cc0d237fe35bcb67183945c0108eb95efdaa38ff29ba53c96895f85ce4449fec5174671542a0c55051062c6551064cc1665e07ab17ca25ccaaf1d94
6
+ metadata.gz: 1241aa88ea51a93c0f758c562e874b9ece8ae5deb0529f3caeaf97e680cda17956872c1bd531fd3da86ba7a5c540049ab18bcc3bfe920a887dcc9b3ebf7ec91f
7
+ data.tar.gz: aac72a7034f95f5986933b918cde5316c9d6b8744246b5e914d6f4427be83e2c0f4f5ad416db96a6e19a03a35ee32b37b21815a9f5ebe66e9fb25381fe56fe2b
@@ -52,16 +52,27 @@ module CriticalHelper
52
52
  IziLightup::SmartPicture.render(object, *args, **xargs, &block)
53
53
  end
54
54
 
55
+ def debug_critical_css(scope_name = 'critical')
56
+ {
57
+ lookup: scoped_css_files(scope_name),
58
+ found: find_scoped_css(scope_name)
59
+ }.to_json.html_safe
60
+ end
61
+
55
62
  private
56
63
 
57
- def find_scoped_css(scope_name)
64
+ def scoped_css_files(scope_name)
58
65
  [
59
66
  File.join(scope_name, "#{controller_path}_#{action_name}.css"),
60
67
  File.join(scope_name, "#{controller_path}.css"),
61
68
  File.join(scope_name, "#{controller_name}_#{action_name}.css"),
62
69
  File.join(scope_name, "#{controller_name}.css"),
63
70
  "#{scope_name}.css"
64
- ].detect { |n| asset_exist?(n) }
71
+ ].uniq
72
+ end
73
+
74
+ def find_scoped_css(scope_name)
75
+ scoped_css_files(scope_name).detect { |n| asset_exist?(n) }
65
76
  end
66
77
 
67
78
  def fetch_items(object, fields)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IziLightup
4
- VERSION = '1.0.14'
4
+ VERSION = '1.0.15'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: izi_lightup
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.14
4
+ version: 1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - IzikAJ
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-25 00:00:00.000000000 Z
11
+ date: 2021-01-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  Utils to speed up page load by using critical css &