forest_admin_rails 1.12.1 → 1.12.2
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3f8e76e19bc58b11c12dd6d31f125fbe0543d6f33ff4463d9454e68ec43fdb4f
|
|
4
|
+
data.tar.gz: 130779408d7ecf0879ec80cc1cf1fef5be06b7f48848e7e0dcb9ca741ee43783
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6116cedc55a13e68579903a099466eff89536c679f46c87dcbe787c74010ad3268983f5188d33adac1ebce34e4ad177cd0cd6195faa94e20e4aefef25dba18d3
|
|
7
|
+
data.tar.gz: 484024339f54c3a375ef3d65ac8d2ca9f5c1154be65491e0fa33eab698876d8e2319717bb1a3ece1850f6a2b5251524c77dd2ce340f0386b3495faf702529fe0
|
|
@@ -24,6 +24,10 @@ module ForestAdminRails
|
|
|
24
24
|
|
|
25
25
|
extend ActiveSupport::Concern
|
|
26
26
|
|
|
27
|
+
initializer 'forest_admin_rails.add_autoload_paths', before: :set_autoload_paths do |app|
|
|
28
|
+
app.config.autoload_paths << Rails.root.join('lib')
|
|
29
|
+
end
|
|
30
|
+
|
|
27
31
|
initializer 'forest_admin_rails.error_subscribe' do
|
|
28
32
|
Rails.error.subscribe(ForestAdminErrorSubscriber.new)
|
|
29
33
|
end
|
|
@@ -39,7 +43,28 @@ module ForestAdminRails
|
|
|
39
43
|
|
|
40
44
|
def load_configuration
|
|
41
45
|
return unless running_web_server?
|
|
42
|
-
|
|
46
|
+
|
|
47
|
+
old_path = Rails.root.join('app', 'lib', 'forest_admin_rails', 'create_agent.rb')
|
|
48
|
+
new_path = Rails.root.join('lib', 'forest_admin_rails', 'create_agent.rb')
|
|
49
|
+
|
|
50
|
+
# Check for old location and warn user
|
|
51
|
+
if File.exist?(old_path) && !File.exist?(new_path)
|
|
52
|
+
logger = ActiveSupport::Logger.new($stdout)
|
|
53
|
+
logger.warn <<~WARNING
|
|
54
|
+
⚠️ DEPRECATION WARNING: create_agent.rb detected in old location!
|
|
55
|
+
|
|
56
|
+
The file 'app/lib/forest_admin_rails/create_agent.rb' should now be located at:
|
|
57
|
+
'lib/forest_admin_rails/create_agent.rb'
|
|
58
|
+
|
|
59
|
+
Please move your file to the new location:
|
|
60
|
+
mkdir -p lib/forest_admin_rails
|
|
61
|
+
mv app/lib/forest_admin_rails/create_agent.rb lib/forest_admin_rails/create_agent.rb
|
|
62
|
+
|
|
63
|
+
This will become a hard requirement in a future version.
|
|
64
|
+
WARNING
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
return unless File.exist?(new_path) || File.exist?(old_path)
|
|
43
68
|
|
|
44
69
|
# force eager loading models
|
|
45
70
|
Rails.application.eager_load!
|
|
@@ -8,7 +8,7 @@ module ForestAdminRails
|
|
|
8
8
|
@auth_secret = SecureRandom.hex(20)
|
|
9
9
|
@env_secret = env_secret
|
|
10
10
|
template 'initializers/config.rb', 'config/initializers/forest_admin_rails.rb'
|
|
11
|
-
template 'create_agent.rb', '
|
|
11
|
+
template 'create_agent.rb', 'lib/forest_admin_rails/create_agent.rb'
|
|
12
12
|
route 'mount ForestAdminRails::Engine => "#{ForestAdminRails.config[:prefix]}"'
|
|
13
13
|
end
|
|
14
14
|
end
|