critical-path-css-rails 0.2.3 → 0.2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d0af0687576d971b5d2215ab09b2e3f05c23a65
4
- data.tar.gz: cbb52f2708080cb064b032a1789f54fe3bc32e2f
3
+ metadata.gz: 95bdd37882da54487a75f7757f4df5f45a0daa45
4
+ data.tar.gz: 468b72efbff091a327d69a7fe1876f4698d0d363
5
5
  SHA512:
6
- metadata.gz: b25d684c21f1b880236fe716c1b54d118fae1139b1badcf5799f93cbff0df886756d0f07f47c24c55f9a9f6a2a1e575d867bf1153d1ff91411cee670edea62ae
7
- data.tar.gz: ddf5eb90f078e67a26256ec42fc9bde4c07555d78e10a58577de1c70ec5edad04a92149f8c7e501f58292ebdae68a39cd2cb6e3b9e3c00bd741dd34530aecfc9
6
+ metadata.gz: a6868c40d8d58f03a185cdf5b002ca010e27e7fcd22368a2ad498314362a1069b5166303f1d469f7808df7c4307730d6e47014fea433d4271d2580343b2687a5
7
+ data.tar.gz: 36c659a731465c67db6a2b695bea134a321a333a95b9d715525049bf0c197932231508d258315bb5681019688edbbba683a3778a48cb1229ad1244278ea4576a
data/README.md CHANGED
@@ -74,8 +74,9 @@ A simple example using loadcss-rails looks like:
74
74
  <script>
75
75
  loadCSS("<%= stylesheet_path('application') %>");
76
76
  </script>
77
+ <link rel="preload" href="<%= stylesheet_path('application') %>" as="style" onload="this.rel='stylesheet'">
77
78
  <noscript>
78
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
79
+ <link rel="stylesheet" href="<%= stylesheet_path('application') %>">
79
80
  </noscript>
80
81
  ```
81
82
 
@@ -5,7 +5,7 @@ module CriticalPathCss
5
5
 
6
6
  def self.generate
7
7
  CssFetcher.new.fetch.each do |route, css|
8
- Rails.cache.write(route, css, namespace: CACHE_NAMESPACE)
8
+ Rails.cache.write(route, css, namespace: CACHE_NAMESPACE, expires_in: nil)
9
9
  end
10
10
  end
11
11
 
@@ -1,9 +1,10 @@
1
+ require 'erb'
1
2
  module CriticalPathCss
2
3
  class Configuration
3
4
  CONFIGURATION_FILENAME = 'critical_path_css.yml'
4
5
 
5
6
  def initialize
6
- @configurations = YAML.load_file(configuration_file_path)[Rails.env]
7
+ @configurations = YAML.load(ERB.new(File.read(configuration_file_path)).result)[Rails.env]
7
8
  end
8
9
 
9
10
  def base_url
@@ -1,6 +1,6 @@
1
1
  module CriticalPathCSS
2
2
  module Rails
3
- VERSION = '0.2.3'
3
+ VERSION = '0.2.4'
4
4
  PENTHOUSE_VERSION = '0.3.4'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: critical-path-css-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Misshore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-18 00:00:00.000000000 Z
11
+ date: 2016-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: phantomjs
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  version: '0'
69
69
  requirements: []
70
70
  rubyforge_project:
71
- rubygems_version: 2.4.8
71
+ rubygems_version: 2.5.1
72
72
  signing_key:
73
73
  specification_version: 4
74
74
  summary: Critical Path CSS for Rails!