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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b283190f2ca2912e814ef840f67711519392f8c339bc206d0b657d6c73161e8
4
- data.tar.gz: b3b718e263251aa9105bdd41fda74b0c29059eb99d0fa89193a5be025385d3aa
3
+ metadata.gz: c2d82a2e4da0effe1238f8b1c093a6ced304557100c6c69974a4f7785348a334
4
+ data.tar.gz: 8ba702e6cf87fc64958089d6b1fc5615ea6921f81d36da27637704c9af9da9bb
5
5
  SHA512:
6
- metadata.gz: e59df33cbb85d0582050bf47800362f9f353230e2e6cd487921a33d36bc30ead174701be0b0681bea5a6a6b1699c58979e355509f2f23490b7fafc90993f5aaa
7
- data.tar.gz: 0544655150a9a26c4a3d9f8dbd34b7d85b5ce8b6aa39f7e34bdcfc7d8459a5a163f126433e7cd40a823b966fd2699ed6db078397ff841bd38b815856fe2283fd
6
+ metadata.gz: c24b61bc4642cc347415051b43d1621ccc7b9d7bb48a413a731f006a70c6e9e6272e77b4be0b911b42535f5822dc651e29c8abe18df1878024afa068050bb7ee
7
+ data.tar.gz: 1c544cf99a6fb8e4df7e5767421e32a96e656a33abb865576806a0a053455a06ebce3676d7adcc8207e30274e2852ced3e1963882feda97783f7f022a9c9b131
@@ -1,5 +1,5 @@
1
1
  module Slim
2
2
  module Rails
3
- VERSION = "3.5.0"
3
+ VERSION = "3.5.1"
4
4
  end
5
5
  end
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
- if defined?(CacheDigests::DependencyTracker)
17
- # 'cache_digests' gem being used (overrides Rails 4 implementation)
18
- CacheDigests::DependencyTracker.register_tracker :slim, CacheDigests::DependencyTracker::ERBTracker
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
- if ::Rails.env.development?
21
- # recalculate cache digest keys for each request
22
- CacheDigests::TemplateDigestor.cache = ActiveSupport::Cache::NullStore.new
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
- elsif ::Rails.version.to_s >= "4.0"
25
- # will only apply if Rails 4, which includes 'action_view/dependency_tracker'
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.0
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-09 00:00:00.000000000 Z
12
+ date: 2022-05-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack