izi_lightup 1.0.16 → 1.0.17
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 +17 -6
 - 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: f1c5603ca13de2a4cdacbde2661a234b2bc2840658a261914f35ff47cb98d07e
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: be1513d0fa4e6cb010e80acb83babff7c4464e7d07f566aec0594d23bf37820d
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: f879475075c1d7e5915cdfd1b13b9583da64c80eeb88aacde80193c2d6e780b8ad4e1b5a7e1f7c078d415408b38023c9db6b48c8a4e63ac6a32ea5ca2d3058fe
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: b74a74d53569055e21493ca675c7bfd6a0634e8108201a891fbf0d06c427cc84e926882fa6011a346d9d211e7953968c681967450288ca6a29e57f1aab0edc7e
         
     | 
| 
         @@ -63,12 +63,23 @@ module CriticalHelper 
     | 
|
| 
       63 
63 
     | 
    
         | 
| 
       64 
64 
     | 
    
         
             
              def scoped_css_files(scope_name)
         
     | 
| 
       65 
65 
     | 
    
         
             
                [
         
     | 
| 
       66 
     | 
    
         
            -
                   
     | 
| 
       67 
     | 
    
         
            -
                   
     | 
| 
       68 
     | 
    
         
            -
                   
     | 
| 
       69 
     | 
    
         
            -
                   
     | 
| 
       70 
     | 
    
         
            -
                   
     | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
      
 66 
     | 
    
         
            +
                  "#{controller_path}_#{action_name}",
         
     | 
| 
      
 67 
     | 
    
         
            +
                  controller_path,
         
     | 
| 
      
 68 
     | 
    
         
            +
                  *scoped_namespace_file(scope_name),
         
     | 
| 
      
 69 
     | 
    
         
            +
                  "#{controller_name}_#{action_name}",
         
     | 
| 
      
 70 
     | 
    
         
            +
                  controller_name,
         
     | 
| 
      
 71 
     | 
    
         
            +
                  scope_name
         
     | 
| 
      
 72 
     | 
    
         
            +
                ].compact.uniq.map { |l| File.join(scope_name, "#{l}.css") }
         
     | 
| 
      
 73 
     | 
    
         
            +
              end
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
              def scoped_namespace_file(scope_name)
         
     | 
| 
      
 76 
     | 
    
         
            +
                scopes = []
         
     | 
| 
      
 77 
     | 
    
         
            +
                return scopes if controller_path == controller_name
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
                parts = controller_path.gsub(/\/#{controller_name}$/, '').split('/').reject(&:blank?)
         
     | 
| 
      
 80 
     | 
    
         
            +
                parts.each { |p| scopes.unshift(File.join([scopes.first, p].compact)) }
         
     | 
| 
      
 81 
     | 
    
         
            +
             
     | 
| 
      
 82 
     | 
    
         
            +
                scopes.uniq
         
     | 
| 
       72 
83 
     | 
    
         
             
              end
         
     | 
| 
       73 
84 
     | 
    
         | 
| 
       74 
85 
     | 
    
         
             
              def find_scoped_css(scope_name)
         
     | 
    
        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.17
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - IzikAJ
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2021-02- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2021-02-18 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       13 
13 
     | 
    
         
             
            description: |-
         
     | 
| 
       14 
14 
     | 
    
         
             
              Utils to speed up page load by using critical css &
         
     |