deface 1.5.2 → 1.5.3
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/deface.gemspec +1 -1
- data/lib/deface/railtie.rb +14 -2
- 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: d6fdcb87226be6d4fc38d8b056826594fc3ceb74d9234efcd398817f39121e5a
|
4
|
+
data.tar.gz: 7183351e3cd1fe93e4f0d7321e5dbf78f42d9104b465ada920d352d05ebe88b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 828dd08f7d102616db1786851f3e3d9c68aac40a3bc4a2bb04b384d8638e6d38eec98ee76cc5c25d513feb649ea43ff9ad68897b7cb26e2c30fdbcc438d11cd9
|
7
|
+
data.tar.gz: cd2f685fd6ad04b559fafadfda375f6f5d58c480db307f34b0d2dddef062d02369f1ed3c8d2dd3f5d7f2a643fe33235291dd55f538a04f1119735eb46e71cbad
|
data/deface.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "deface"
|
3
|
-
s.version = "1.5.
|
3
|
+
s.version = "1.5.3"
|
4
4
|
|
5
5
|
s.authors = ["Brian D Quinn"]
|
6
6
|
s.description = "Deface is a library that allows you to customize ERB, Haml and Slim views in a Rails application without editing the underlying view."
|
data/lib/deface/railtie.rb
CHANGED
@@ -36,7 +36,7 @@ module Deface
|
|
36
36
|
initializer "deface.tweak_eager_loading", :before => :set_load_path do |app|
|
37
37
|
|
38
38
|
# application
|
39
|
-
app
|
39
|
+
tweak_eager_loading(app)
|
40
40
|
|
41
41
|
# railites / engines / extensions
|
42
42
|
railties = if Rails.version >= "4.0"
|
@@ -47,8 +47,10 @@ module Deface
|
|
47
47
|
|
48
48
|
railties.each do |railtie|
|
49
49
|
next unless railtie.respond_to?(:root) && railtie.config.respond_to?(:eager_load_paths)
|
50
|
-
|
50
|
+
|
51
|
+
tweak_eager_loading(railtie)
|
51
52
|
end
|
53
|
+
|
52
54
|
end
|
53
55
|
|
54
56
|
# sets up deface environment and requires / loads all
|
@@ -87,5 +89,15 @@ module Deface
|
|
87
89
|
end
|
88
90
|
end
|
89
91
|
|
92
|
+
private
|
93
|
+
|
94
|
+
def tweak_eager_loading(railtie)
|
95
|
+
paths_to_reject = railtie.config.eager_load_paths.select { |path| path.to_s =~ /app\/overrides\z/ }
|
96
|
+
railtie.config.eager_load_paths = railtie.config.eager_load_paths.reject { |path| path.in?(paths_to_reject) }
|
97
|
+
|
98
|
+
if Rails.version >= "6.0" && Rails.configuration.autoloader == :zeitwerk
|
99
|
+
Rails.autoloaders.each { |autoloader| autoloader.ignore(*paths_to_reject) }
|
100
|
+
end
|
101
|
+
end
|
90
102
|
end
|
91
103
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deface
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian D Quinn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|