infopark_fiona7 1.1.0.0.4 → 1.1.0.0.5
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4907bd859a689f02a8bae66d243fe0a220c37f46
|
4
|
+
data.tar.gz: 0c4575f211bb94278ac1535e2eade5564bd541cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58c06f55d0889cc2eb014db5ea3d753d89599b327be9bfa022cbd191305373062b7c378079d55c329f6b5229ffb33253fed35574b06a3b6d2c535a926f981306
|
7
|
+
data.tar.gz: b2c57e029a10d8495115556a4fcad8f54456e654a385d93116a841095281a50585be8d6a1821e708872652d5caa801a3c029d3e2f97631f1fa7ae103e0267112
|
data/lib/fiona7/engine.rb
CHANGED
@@ -32,6 +32,7 @@ require "fiona7/scrivito_patches/layout_tags"
|
|
32
32
|
require "fiona7/scrivito_patches/log_subscriber"
|
33
33
|
require "fiona7/scrivito_patches/link_parser"
|
34
34
|
require "fiona7/scrivito_patches/migrator"
|
35
|
+
require "fiona7/scrivito_patches/model_library"
|
35
36
|
require "fiona7/scrivito_patches/obj_params_parser"
|
36
37
|
require "fiona7/scrivito_patches/page_config"
|
37
38
|
require "fiona7/scrivito_patches/preset_routes"
|
@@ -13,11 +13,11 @@ module Fiona7
|
|
13
13
|
|
14
14
|
protected
|
15
15
|
def scrivito_sdk_path
|
16
|
-
Gem.loaded_specs['scrivito_sdk'].
|
16
|
+
Gem.loaded_specs['scrivito_sdk'].full_name
|
17
17
|
end
|
18
18
|
|
19
19
|
def fiona_connector_path
|
20
|
-
Gem.loaded_specs['infopark_fiona_connector'].
|
20
|
+
Gem.loaded_specs['infopark_fiona_connector'].full_name
|
21
21
|
end
|
22
22
|
|
23
23
|
def reorder_view_paths(first, second)
|
@@ -5,9 +5,9 @@ module ActionDispatch
|
|
5
5
|
raise ArgumentError, "Invalid route name: '#{name}'" unless name.blank? || name.to_s.match(/^[_a-z]\w*$/i)
|
6
6
|
|
7
7
|
forbidden_paths = [
|
8
|
-
::File.join(Gem.loaded_specs['scrivito_sdk'].
|
9
|
-
::File.join(Gem.loaded_specs['scrivito_sdk'].
|
10
|
-
::File.join(Gem.loaded_specs['infopark_fiona_connector'].
|
8
|
+
::File.join(Gem.loaded_specs['scrivito_sdk'].full_name, "config/routes.rb"),
|
9
|
+
::File.join(Gem.loaded_specs['scrivito_sdk'].full_name, "config/precedence_routes.rb"),
|
10
|
+
::File.join(Gem.loaded_specs['infopark_fiona_connector'].full_name, "config/cms_routes.rb")
|
11
11
|
]
|
12
12
|
|
13
13
|
if caller.any? {|path| forbidden_paths.any? {|fp| path.include?(fp) } }
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require "scrivito/model_library"
|
2
|
+
|
3
|
+
module Scrivito
|
4
|
+
class ModelLibrary
|
5
|
+
|
6
|
+
private
|
7
|
+
# support for ShadowClasses
|
8
|
+
def load_model(class_name, base_class)
|
9
|
+
model_class = class_name.constantize
|
10
|
+
return model_class if model_class.ancestors.include?(base_class)
|
11
|
+
|
12
|
+
if Fiona7.mode == :legacy && model_class.respond_to?(:shadow_class)
|
13
|
+
model_class = model_class.shadow_class
|
14
|
+
model_class if model_class.ancestors.include?(base_class)
|
15
|
+
end
|
16
|
+
rescue NameError
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/fiona7/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark_fiona7
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0.0.
|
4
|
+
version: 1.1.0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomasz Przedmojski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -234,6 +234,7 @@ files:
|
|
234
234
|
- lib/fiona7/scrivito_patches/link_parser.rb
|
235
235
|
- lib/fiona7/scrivito_patches/log_subscriber.rb
|
236
236
|
- lib/fiona7/scrivito_patches/migrator.rb
|
237
|
+
- lib/fiona7/scrivito_patches/model_library.rb
|
237
238
|
- lib/fiona7/scrivito_patches/obj_params_parser.rb
|
238
239
|
- lib/fiona7/scrivito_patches/page_config.rb
|
239
240
|
- lib/fiona7/scrivito_patches/preset_routes.rb
|