slim-rails 3.5.0 → 3.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/slim-rails/version.rb +1 -1
- data/lib/slim-rails.rb +14 -12
- 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: c2d82a2e4da0effe1238f8b1c093a6ced304557100c6c69974a4f7785348a334
|
4
|
+
data.tar.gz: 8ba702e6cf87fc64958089d6b1fc5615ea6921f81d36da27637704c9af9da9bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c24b61bc4642cc347415051b43d1621ccc7b9d7bb48a413a731f006a70c6e9e6272e77b4be0b911b42535f5822dc651e29c8abe18df1878024afa068050bb7ee
|
7
|
+
data.tar.gz: 1c544cf99a6fb8e4df7e5767421e32a96e656a33abb865576806a0a053455a06ebce3676d7adcc8207e30274e2852ced3e1963882feda97783f7f022a9c9b131
|
data/lib/slim-rails/version.rb
CHANGED
data/lib/slim-rails.rb
CHANGED
@@ -13,21 +13,23 @@ module Slim
|
|
13
13
|
|
14
14
|
ActiveSupport.on_load(:action_view) do
|
15
15
|
ActiveSupport.on_load(:after_initialize) do
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
begin # rubocop:disable Style/RedundantBegin
|
17
|
+
if defined?(CacheDigests::DependencyTracker)
|
18
|
+
# 'cache_digests' gem being used (overrides Rails 4 implementation)
|
19
|
+
CacheDigests::DependencyTracker.register_tracker :slim, CacheDigests::DependencyTracker::ERBTracker
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
21
|
+
if ::Rails.env.development?
|
22
|
+
# recalculate cache digest keys for each request
|
23
|
+
CacheDigests::TemplateDigestor.cache = ActiveSupport::Cache::NullStore.new
|
24
|
+
end
|
25
|
+
elsif ::Rails.version.to_s >= "4.0"
|
26
|
+
# will only apply if Rails 4, which includes 'action_view/dependency_tracker'
|
27
|
+
require "action_view/dependency_tracker"
|
28
|
+
ActionView::DependencyTracker.register_tracker :slim, ActionView::DependencyTracker::ERBTracker
|
23
29
|
end
|
24
|
-
|
25
|
-
#
|
26
|
-
require "action_view/dependency_tracker"
|
27
|
-
ActionView::DependencyTracker.register_tracker :slim, ActionView::DependencyTracker::ERBTracker
|
30
|
+
rescue
|
31
|
+
# likely this version of Rails doesn't support dependency tracking
|
28
32
|
end
|
29
|
-
rescue
|
30
|
-
# likely this version of Rails doesn't support dependency tracking
|
31
33
|
end
|
32
34
|
end
|
33
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slim-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonardo Almeida
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-05-
|
12
|
+
date: 2022-05-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|