scrivito_sdk 1.19.0 → 1.20.0
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/app/cms/scrivito/binary_param_verifier.rb +1 -1
- data/app/cms/scrivito/cms_routing.rb +6 -3
- data/app/cms/scrivito/migrations/migration.rb +3 -1
- data/app/cms/scrivito/model_library.rb +10 -3
- data/app/cms/scrivito/routing_extensions.rb +1 -1
- data/app/cms/scrivito/sdk_engine.rb +2 -1
- data/app/cms/scrivito/workspace/publish_checker.rb +1 -1
- data/config/ca-bundle.crt +141 -826
- data/lib/assets/javascripts/scrivito_with_js_sdk.js +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 83ab8abce7b3bdd3029afc044601146bc3b1702af66106e19943de299c05e951
|
|
4
|
+
data.tar.gz: b30c1c3499e2ddd522981f2b665c04e008934c66064885c433fa7051ef2bcf61
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 72f68ad2c3c7cff70d055deac8a346c24b401ac3bdecb17dff39cc01145a85d034688f2f18283dcbc95f5ccc09b844ec2a3579b86c827e5a67c24973dd612281
|
|
7
|
+
data.tar.gz: f86f9983e797d8cad89ecd24d28be0daaf5b1b25221522a100949c667d00497da17959e173c7db93d98da716ff296f5f31483d758a56f8935deaa0999ec7fcfd
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require 'cgi/escape'
|
|
2
|
+
|
|
1
3
|
module Scrivito
|
|
2
4
|
|
|
3
5
|
class CmsRouting < Struct.new(:request, :context, :scrivito_engine, :image_options)
|
|
@@ -20,18 +22,19 @@ class CmsRouting < Struct.new(:request, :context, :scrivito_engine, :image_optio
|
|
|
20
22
|
|
|
21
23
|
if $2.present?
|
|
22
24
|
begin
|
|
23
|
-
uri = URI.parse($2)
|
|
25
|
+
uri = URI.parse(CGI.unescapeHTML($2))
|
|
24
26
|
options.merge!(extract_query(uri))
|
|
25
27
|
options[:anchor] = uri.fragment
|
|
26
28
|
rescue
|
|
27
29
|
end
|
|
28
30
|
end
|
|
29
31
|
|
|
32
|
+
safe = "".html_safe
|
|
30
33
|
if editing_context.display_mode == 'editing'
|
|
31
34
|
options[:id] = obj.id
|
|
32
|
-
scrivito_engine.base_id_path(options)
|
|
35
|
+
safe + scrivito_engine.base_id_path(options)
|
|
33
36
|
else
|
|
34
|
-
path_or_url(obj, :path, options)
|
|
37
|
+
safe + path_or_url(obj, :path, options)
|
|
35
38
|
end
|
|
36
39
|
else
|
|
37
40
|
"#__target_object_not_reachable"
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require 'benchmark'
|
|
2
|
+
|
|
1
3
|
module Scrivito
|
|
2
4
|
module Migrations
|
|
3
5
|
class Migration
|
|
@@ -21,7 +23,7 @@ module Scrivito
|
|
|
21
23
|
def migrate
|
|
22
24
|
announce 'migrating'
|
|
23
25
|
|
|
24
|
-
time = Benchmark.measure { up }
|
|
26
|
+
time = ::Benchmark.measure { up }
|
|
25
27
|
|
|
26
28
|
announce 'migrated (%.4fs)' % time.real; puts
|
|
27
29
|
end
|
|
@@ -110,11 +110,18 @@ class ModelLibrary
|
|
|
110
110
|
|
|
111
111
|
def require_dependencies
|
|
112
112
|
@require_dependencies ||= begin
|
|
113
|
+
zeitwerk_dirs = Rails.autoloaders.main.dirs.map(&:to_s)
|
|
113
114
|
paths.each do |path|
|
|
115
|
+
path = path.to_s
|
|
114
116
|
Dir["#{path}/**/*.rb"].sort.each do |file_path|
|
|
115
117
|
begin
|
|
116
|
-
|
|
117
|
-
|
|
118
|
+
if zeitwerk_dirs.include?(path)
|
|
119
|
+
relative = file_path.delete_prefix("#{path}/").delete_suffix('.rb')
|
|
120
|
+
relative.camelize.constantize
|
|
121
|
+
else
|
|
122
|
+
require file_path
|
|
123
|
+
end
|
|
124
|
+
rescue TypeError, NameError => e
|
|
118
125
|
raise e if file_path.starts_with?(Rails.root.to_s)
|
|
119
126
|
end
|
|
120
127
|
end
|
|
@@ -123,7 +130,7 @@ class ModelLibrary
|
|
|
123
130
|
end
|
|
124
131
|
|
|
125
132
|
def autoload_model_paths
|
|
126
|
-
|
|
133
|
+
Rails.autoloaders.main.dirs.select do |path|
|
|
127
134
|
path.to_s.ends_with?('/app/models')
|
|
128
135
|
end
|
|
129
136
|
end
|
|
@@ -67,7 +67,7 @@ module RoutingExtensions
|
|
|
67
67
|
options[:constraints] = {id: /[a-f0-9]{16}/} if route_name == :slug_id
|
|
68
68
|
|
|
69
69
|
begin
|
|
70
|
-
match(path, options)
|
|
70
|
+
match(path, **options)
|
|
71
71
|
rescue ArgumentError => error
|
|
72
72
|
if error.message.include?(route.helper_name)
|
|
73
73
|
raise ScrivitoError,
|
|
@@ -11,7 +11,7 @@ module ::Scrivito
|
|
|
11
11
|
def self.to_prepare
|
|
12
12
|
Scrivito::Configuration.to_prepare
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
if Rails.application.config.enable_reloading
|
|
15
15
|
Scrivito.models.clear_cache
|
|
16
16
|
end
|
|
17
17
|
end
|
|
@@ -68,6 +68,7 @@ module ::Scrivito
|
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
scrivito_path = root.join('app', 'cms').to_s
|
|
71
|
+
$LOAD_PATH.unshift(scrivito_path) unless $LOAD_PATH.include?(scrivito_path)
|
|
71
72
|
config.autoload_paths += [scrivito_path, root.join('app', 'models').to_s]
|
|
72
73
|
config.autoload_once_paths += [scrivito_path]
|
|
73
74
|
end
|