izi_lightup 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/critical_helper.rb +13 -2
- data/lib/izi_lightup/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2e7e30e1ff97cc6b16730239bcf02e5f358bc82044955814691b1e6316f276cf
|
|
4
|
+
data.tar.gz: 7fd8a0f1c1a3307d24b7b4ea3097d96097a00b0f852a03e1162022f56a7ff742
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
-
].
|
|
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)
|
data/lib/izi_lightup/version.rb
CHANGED
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.
|
|
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-
|
|
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 &
|