maglevcms 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/vite.json +4 -3
- data/lib/maglev/engine.rb +15 -5
- data/lib/maglev/version.rb +1 -1
- 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: 1592154952ea460b1a251f422ff5c2a195671024b1dc7cff35244eb0f22121bc
|
4
|
+
data.tar.gz: '09969af10aa25986f2df6c5ce062f57889489befcc9bbd3d6c122a4fc7d70aba'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3937431f0c1da7bfed8238baf1f1179145b128537ebe82184a99ed659aeaf01b523c836c926cb87800e61cfd21ae119b35eecdde85ace9cb3d10f6d8ddf43d7
|
7
|
+
data.tar.gz: a44cf3da138c61c43cdabd1be26c0253242cc3bfeb817bb59d65952ef716c55527138fcba2b76525d19523f8ff4fa8a6cebe095e9fe50154386415aa6b22fd03
|
data/config/vite.json
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
{
|
2
2
|
"all": {
|
3
3
|
"sourceCodeDir": "app/frontend",
|
4
|
-
"watchAdditionalPaths": []
|
4
|
+
"watchAdditionalPaths": [],
|
5
|
+
"publicOutputDir": "maglev-assets"
|
5
6
|
},
|
6
7
|
"development": {
|
7
8
|
"autoBuild": true,
|
8
|
-
"publicOutputDir": "maglev-assets",
|
9
|
+
"publicOutputDir": "maglev-assets-dev",
|
9
10
|
"port": 3136
|
10
11
|
},
|
11
12
|
"test": {
|
12
13
|
"autoBuild": true,
|
13
|
-
"publicOutputDir": "maglev-assets",
|
14
|
+
"publicOutputDir": "maglev-assets-test",
|
14
15
|
"port": 3137
|
15
16
|
}
|
16
17
|
}
|
data/lib/maglev/engine.rb
CHANGED
@@ -41,15 +41,25 @@ module Maglev
|
|
41
41
|
delegate :vite_ruby, to: :class
|
42
42
|
|
43
43
|
def self.vite_ruby
|
44
|
-
@vite_ruby ||= ::ViteRuby.new(root: root)
|
44
|
+
@vite_ruby ||= ::ViteRuby.new(root: root, mode: Rails.env)
|
45
45
|
end
|
46
46
|
|
47
47
|
# Serves the engine's vite-ruby when requested
|
48
48
|
initializer 'maglev.vite_rails.static' do |app|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
if Rails.application.config.public_file_server.enabled
|
50
|
+
# this is the right setup when the main application is already
|
51
|
+
# using Vite for the theme assets.
|
52
|
+
app.middleware.insert_after ActionDispatch::Static,
|
53
|
+
Rack::Static,
|
54
|
+
urls: ["/#{vite_ruby.config.public_output_dir}"],
|
55
|
+
root: root.join(vite_ruby.config.public_dir)
|
56
|
+
else
|
57
|
+
# mostly when running the application in production behind NGINX or APACHE
|
58
|
+
app.middleware.insert_before 0,
|
59
|
+
Rack::Static,
|
60
|
+
urls: ["/#{vite_ruby.config.public_output_dir}"],
|
61
|
+
root: root.join(vite_ruby.config.public_dir)
|
62
|
+
end
|
53
63
|
end
|
54
64
|
|
55
65
|
initializer 'maglev.vite_rails_engine.proxy' do |app|
|
data/lib/maglev/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maglevcms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Didier Lafforgue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jbuilder
|