rails_critical_css 0.3.9 → 0.4.0

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: 1fce5ce61aaba300ef0817a1cf6f33d66f97be54a59d863aa2626363abcd0618
4
- data.tar.gz: 605b23b501b0a1f5ef199b34fc4a6e736fd44f9b9aecb712c9e9bbcfd8d6e97a
3
+ metadata.gz: c308c56368a1bbd3813bc79d6aea2ed6f99ada5dfa0194427fdd5db9c2eb9d41
4
+ data.tar.gz: d2728f0dccae7d03304dab47f6edfc8285d2136ee8a7cb4df18b520af82d60db
5
5
  SHA512:
6
- metadata.gz: a56bad87de70bbf0d7516a9335b5f6a736a8bdb333a9bc644a0c4b68c2ddd773e7eb51106b57b5a992f336255629f5dadd9621dfd43ab7b680d22e77ad5bd9d5
7
- data.tar.gz: 190044c5b832af0b9ecf86e4528ab423694a6433bd4f7a9100369dd4941470c5887e0377b558236bc3874e0b5c189aaf75e378a275c00c491fbce4e66cca5539
6
+ metadata.gz: 11e732aae50405dc96a180fe9770e0ae314b2c79073997bb211cc4a3ab75267a7fd56f94f2b9736d698eb41f7c100adec60c24aa777073e67cfcb0d2494c6dc0
7
+ data.tar.gz: 345aabd893152bec074d23e5e5274a200a315554eb0315d598754b3100aee0acad152fbb1b13890613205b880d3c5a6aa294313fa5e260b2a5dbdec5100eb30b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_critical_css (0.3.9)
4
+ rails_critical_css (0.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -56,8 +56,8 @@ In template:
56
56
 
57
57
  # depending on critical_css? flag (it returns false if critical css is being generated)
58
58
  # it emits link(href="your_file" rel="stylesheet") or link(href="your_file" rel="preload" onload="this.rel = 'stylesheet'")
59
- = critical_css_link href: 'css/vendors.css'
60
- = critical_css_link href: 'css/vendors.css', media: 'print'
59
+ = critical_css_link 'css/vendors.css'
60
+ = critical_css_link 'css/vendors.css', media: 'print'
61
61
 
62
62
  # If you have custom link helper (which for example loads css tag after GDPR accept) you can use helper below
63
63
  # Generator will extract hrefs from emitted html and generate stylesheet output
@@ -31,11 +31,11 @@ module RailsCriticalCss::Helpers
31
31
  end
32
32
  end
33
33
 
34
- def critical_css_link(href:, media: nil)
34
+ def critical_css_link(href, media: nil)
35
35
  if critical_css?
36
36
  link_to(href: href, rel: 'preload', as: 'style', media: media, onload: "this.rel = 'stylesheet'")
37
37
  else
38
- append_css_tags_assets(content) do
38
+ append_css_tags_assets do
39
39
  link_to(href: href, rel: 'stylesheet', media: media)
40
40
  end
41
41
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsCriticalCss
4
- VERSION = '0.3.9'
4
+ VERSION = '0.4.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_critical_css
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mateusz Bagiński