infopark_fiona7 0.71.1.12 → 1.1.0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/fiona7_ui.js +67 -0
- data/app/assets/stylesheets/fiona7_ui.css.scss +29 -0
- data/app/controllers/fiona7/release_controller.rb +37 -75
- data/app/controllers/scrivito/cms_dispatch_controller.rb +2 -12
- data/app/controllers/scrivito/objs_controller.rb +41 -13
- data/app/controllers/scrivito/webservice_controller.rb +4 -3
- data/app/views/fiona7/release/preview.html.erb +73 -0
- data/config/routes.rb +3 -1
- data/infopark_fiona7.gemspec +1 -1
- data/lib/fiona7/assert.rb +4 -0
- data/lib/fiona7/attribute_name_mangler.rb +19 -0
- data/lib/fiona7/attribute_names_from_cms.rb +17 -0
- data/lib/fiona7/attribute_names_from_queries.rb +17 -0
- data/lib/fiona7/builder/obj_builder.rb +3 -2
- data/lib/fiona7/builder/obj_updater.rb +2 -2
- data/lib/fiona7/builder/widget_builder.rb +1 -1
- data/lib/fiona7/builder/widget_updater.rb +2 -2
- data/lib/fiona7/complex_object.rb +24 -0
- data/lib/fiona7/controllers/rest_api/obj_controller.rb +96 -24
- data/lib/fiona7/controllers/rest_api/workspace_controller.rb +23 -2
- data/lib/fiona7/engine.rb +11 -23
- data/lib/fiona7/facet_builder.rb +136 -0
- data/lib/fiona7/json/reverse_obj_decorator.rb +2 -0
- data/lib/fiona7/mode_switch/cms_routes/scrivito_sdk.rb +68 -10
- data/lib/fiona7/mode_switch/cms_routes/scrivito_sdk_slave.rb +66 -14
- data/lib/fiona7/mode_switch/views.rb +2 -2
- data/lib/fiona7/naive_search_engine.rb +40 -5
- data/lib/fiona7/obj_class_name_demangler.rb +11 -0
- data/lib/fiona7/obj_class_name_mangler.rb +11 -0
- data/lib/fiona7/obj_classes_from_cms.rb +14 -0
- data/lib/fiona7/obj_classes_from_queries.rb +11 -0
- data/lib/fiona7/recursive_object_finder.rb +149 -0
- data/lib/fiona7/routers/rest_api.rb +14 -1
- data/lib/fiona7/routing_monkey_patch.rb +5 -2
- data/lib/fiona7/scrivito_patches/attribute_serializer.rb +1 -1
- data/lib/fiona7/scrivito_patches/basic_obj.rb +4 -9
- data/lib/fiona7/scrivito_patches/basic_widget.rb +0 -9
- data/lib/fiona7/scrivito_patches/cms_backend.rb +11 -16
- data/lib/fiona7/scrivito_patches/cms_rest_api.rb +1 -1
- data/lib/fiona7/scrivito_patches/cms_routing.rb +50 -33
- data/lib/fiona7/scrivito_patches/link_parser.rb +6 -13
- data/lib/fiona7/scrivito_patches/log_subscriber.rb +18 -0
- data/lib/fiona7/scrivito_patches/preset_routes.rb +47 -0
- data/lib/fiona7/scrivito_patches/routing_extensions.rb +48 -0
- data/lib/fiona7/search_engine.rb +4 -0
- data/lib/fiona7/type_loader.rb +5 -4
- data/lib/fiona7/type_register.rb +13 -27
- data/lib/fiona7/type_synchronizer.rb +8 -6
- data/lib/fiona7/verity_search_engine.rb +77 -30
- data/lib/fiona7/version.rb +1 -1
- metadata +18 -13
- data/app/models/rails_connector/abstract_obj.rb +0 -24
- data/lib/fiona7/controllers/content_service/obj_controller.rb +0 -121
- data/lib/fiona7/controllers/content_service/workspace_controller.rb +0 -19
- data/lib/fiona7/recursive_link_resolver.rb +0 -93
- data/lib/fiona7/routers/content_service.rb +0 -19
- data/lib/fiona7/scrivito_patches/client_config.rb +0 -0
- data/lib/fiona7/scrivito_patches/controller_actions.rb +0 -6
- data/lib/fiona7/scrivito_patches/obj_class.rb +0 -16
- data/lib/fiona7/scrivito_patches/obj_data_from_rest.rb +0 -30
data/config/routes.rb
CHANGED
@@ -7,5 +7,7 @@ Rails.application.routes.draw do
|
|
7
7
|
|
8
8
|
delete '/_f/logout', to: 'fiona7/sessions#destroy', as: :fiona7_logout
|
9
9
|
|
10
|
-
put '/__scrivito/objs
|
10
|
+
put '/__scrivito/objs/release(.:format)', to: 'fiona7/release#release', as: :fiona7_release
|
11
|
+
|
12
|
+
get '/__scrivito/objs/:id/release/preview(.:format)', to: 'fiona7/release#preview', as: :fiona7_release_preview
|
11
13
|
end
|
data/infopark_fiona7.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.files = Dir["{app,config,db,lib}/**/*", "Rakefile", "README.md", "infopark_fiona7.gemspec"]
|
18
18
|
|
19
19
|
s.add_dependency "rails", "~> 4.2.2"
|
20
|
-
s.add_dependency "scrivito", "= 0
|
20
|
+
s.add_dependency "scrivito", "= 1.1.0"
|
21
21
|
s.add_dependency "scrivito_sdk"
|
22
22
|
s.add_dependency "scrivito_editors"
|
23
23
|
s.add_dependency "infopark_fiona_connector", "= 7.0.1.beta2"
|
data/lib/fiona7/assert.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
require "fiona7/obj_class_name_mangler"
|
2
|
+
|
3
|
+
module Fiona7
|
4
|
+
class AttributeNameMangler
|
5
|
+
def initialize(attribute, obj_class)
|
6
|
+
@attribute = attribute
|
7
|
+
@obj_class = obj_class
|
8
|
+
end
|
9
|
+
|
10
|
+
def mangle
|
11
|
+
if Fiona7.mode == :standalone
|
12
|
+
mangled_obj_class = Fiona7::ObjClassNameMangler.new(@obj_class).mangle
|
13
|
+
"s_#{mangled_obj_class}__#{@attribute}"
|
14
|
+
else
|
15
|
+
@attribute
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "fiona7/type_register"
|
2
|
+
require "fiona7/obj_classes_from_cms"
|
3
|
+
require "fiona7/attribute_name_mangler"
|
4
|
+
|
5
|
+
module Fiona7
|
6
|
+
class AttributeNamesFromCms
|
7
|
+
def initialize(attribute, type_register=Fiona7::TypeRegister.instance)
|
8
|
+
@attribute = attribute
|
9
|
+
@type_register = type_register
|
10
|
+
end
|
11
|
+
|
12
|
+
def attributes
|
13
|
+
obj_classes = Fiona7::ObjClassesFromCms.new(@type_register).obj_classes
|
14
|
+
obj_classes.map {|obj_class| Fiona7::AttributeNameMangler.new(@attribute, obj_class).mangle }.uniq
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "fiona7/obj_classes_from_queries"
|
2
|
+
require "fiona7/attribute_name_mangler"
|
3
|
+
|
4
|
+
module Fiona7
|
5
|
+
class AttributeNamesFromQueries
|
6
|
+
def initialize(attribute, queries)
|
7
|
+
@attribute = attribute
|
8
|
+
@queries = queries
|
9
|
+
end
|
10
|
+
|
11
|
+
def attributes
|
12
|
+
obj_classes = Fiona7::ObjClassesFromQueries.new(@queries).obj_classes
|
13
|
+
obj_classes.map {|obj_class| AttributeNameMangler.new(@attribute, obj_class).mangle }.uniq.presence if obj_classes
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
@@ -6,7 +6,8 @@ module Fiona7
|
|
6
6
|
end
|
7
7
|
|
8
8
|
require 'fiona7/type_register'
|
9
|
-
require 'fiona7/
|
9
|
+
require 'fiona7/obj_class_name_mangler'
|
10
|
+
require 'fiona7/obj_class_name_demangler'
|
10
11
|
#require 'fiona7/write_obj'
|
11
12
|
#require 'fiona7/released_obj'
|
12
13
|
require 'fiona7/builder/batch_widget_writer'
|
@@ -53,7 +54,7 @@ module Fiona7
|
|
53
54
|
def prepare_object
|
54
55
|
@path = @values.delete(:_path) || generate_orphaned_path
|
55
56
|
@obj_class = @values.delete(:_obj_class)
|
56
|
-
@real_obj_class =
|
57
|
+
@real_obj_class = Fiona7::ObjClassNameMangler.new(@obj_class).mangle
|
57
58
|
@widget_pool = @values.delete(:_widget_pool)
|
58
59
|
@permalink = @values.delete(:_permalink)
|
59
60
|
|
@@ -26,10 +26,10 @@ module Fiona7
|
|
26
26
|
@name, parent_path = name_and_parent_path_from_path(@path) if (@path)
|
27
27
|
if obj_class = @values.delete(:_obj_class)
|
28
28
|
@obj_class = obj_class
|
29
|
-
@real_obj_class =
|
29
|
+
@real_obj_class = Fiona7::ObjClassNameMangler.new(@obj_class).mangle
|
30
30
|
else
|
31
31
|
@real_obj_class = @obj.obj_class
|
32
|
-
@obj_class =
|
32
|
+
@obj_class = Fiona7::ObjClassNameDemangler.new(@real_obj_class).demangle
|
33
33
|
end
|
34
34
|
|
35
35
|
ensure_obj_class_exists
|
@@ -17,7 +17,7 @@ module Fiona7
|
|
17
17
|
def prepare_object
|
18
18
|
@path = self.generate_widget_path
|
19
19
|
@obj_class = @values.delete(:_obj_class)
|
20
|
-
@real_obj_class =
|
20
|
+
@real_obj_class = Fiona7::ObjClassNameMangler.new(@obj_class).mangle
|
21
21
|
|
22
22
|
@path = "/#{@path}" unless @path.start_with?('/')
|
23
23
|
@name, parent_path = name_and_parent_path_from_path(@path)
|
@@ -21,10 +21,10 @@ module Fiona7
|
|
21
21
|
|
22
22
|
if obj_class = @values.delete(:_obj_class)
|
23
23
|
@obj_class = obj_class
|
24
|
-
@real_obj_class =
|
24
|
+
@real_obj_class = Fiona7::ObjClassNameMangler.new(@obj_class).mangle
|
25
25
|
else
|
26
26
|
@real_obj_class = @obj.obj_class
|
27
|
-
@obj_class =
|
27
|
+
@obj_class = Fiona7::ObjClassNameDemangler.new(@real_obj_class).demangle
|
28
28
|
end
|
29
29
|
|
30
30
|
ensure_obj_class_exists
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Fiona7
|
2
|
+
class ComplexObject
|
3
|
+
def initialize(obj)
|
4
|
+
@obj = obj
|
5
|
+
end
|
6
|
+
|
7
|
+
def widgets
|
8
|
+
# TODO: optimize this through attr_values
|
9
|
+
links = @obj[:X_widget_pool] || []
|
10
|
+
WriteObj.where(obj_id: links.map {|l| l.destination_object_id }).to_a.to_set
|
11
|
+
end
|
12
|
+
|
13
|
+
def binaries
|
14
|
+
type_definition = Fiona7::TypeRegister.instance.read_mangled(@obj.obj_class)
|
15
|
+
type_definition.attrs.each do |attribute|
|
16
|
+
if attribute.type == :binary && attribute.real_name != "blob"
|
17
|
+
(obj[attribute.real_name] || []).each do |link|
|
18
|
+
referenced << link.destination_object
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -8,6 +8,8 @@ require 'fiona7/builder/obj_updater'
|
|
8
8
|
require 'fiona7/naive_search_engine'
|
9
9
|
require 'fiona7/verity_search_engine'
|
10
10
|
|
11
|
+
require 'fiona7/facet_builder'
|
12
|
+
|
11
13
|
require 'fiona7/assert'
|
12
14
|
|
13
15
|
require 'fiona7/json/reverse_obj_decorator'
|
@@ -52,6 +54,19 @@ module Fiona7
|
|
52
54
|
return ::JSON.parse(::ActiveSupport::JSON.encode(decorated))
|
53
55
|
end
|
54
56
|
|
57
|
+
def fetch_multiple(revision_id, payload)
|
58
|
+
# TODO: use implementation from ContentService controller
|
59
|
+
# FIXME: code duplication with fetch_by_id
|
60
|
+
obj_ids = payload.with_indifferent_access[:ids]
|
61
|
+
klass = revision_id.start_with?('f') ? ReleasedObj : EditedObj
|
62
|
+
objs = klass.where(obj_id: obj_ids)
|
63
|
+
objs_arr = obj_ids.map {|obj_id| objs.find {|o| o.id == obj_id.to_i } }
|
64
|
+
|
65
|
+
decorated = objs_arr.map {|obj| obj ? Fiona7::JSON::ReverseObjDecorator.new(klass, obj) : nil }
|
66
|
+
response = ::JSON.parse(::ActiveSupport::JSON.encode({"results" => decorated}))
|
67
|
+
return response
|
68
|
+
end
|
69
|
+
|
55
70
|
def fetch_by_id(workspace_id, obj_id)
|
56
71
|
klass = matching_class(workspace_id)
|
57
72
|
obj = klass.where(obj_id: obj_id).first
|
@@ -85,35 +100,66 @@ module Fiona7
|
|
85
100
|
|
86
101
|
def search(workspace_id, params)
|
87
102
|
klass = matching_class(workspace_id)
|
103
|
+
params = params.symbolize_keys
|
104
|
+
|
105
|
+
facets = params[:facets] || []
|
106
|
+
|
107
|
+
if params[:continuation]
|
108
|
+
conti = ::JSON.parse(Base64.decode64(params[:continuation])).symbolize_keys #rescue {}
|
109
|
+
else
|
110
|
+
conti = {}
|
111
|
+
end
|
112
|
+
|
113
|
+
offset = conti[:offset] || params[:offset] || 0
|
114
|
+
# 10 is the default value in original implementation
|
115
|
+
size = conti[:size] || params[:size] || 10
|
116
|
+
order = (conti[:sort_order] || params[:sort_order] || :asc).to_sym
|
117
|
+
sort = (conti[:sort_by] || params[:sort_by] || :id).to_sym
|
118
|
+
|
119
|
+
if params[:query].present?
|
120
|
+
normalize_query_params(params[:query])
|
121
|
+
|
122
|
+
query = (params[:query] || []).dup
|
88
123
|
|
89
|
-
|
90
|
-
|
124
|
+
puts "SEARCH: #{query}"
|
125
|
+
if use_naive_search_engine?(query)
|
126
|
+
puts "NAIVE"
|
127
|
+
search = NaiveSearchEngine.new(klass, query, offset, size, sort, order)
|
128
|
+
else
|
129
|
+
puts "VERITY"
|
130
|
+
search = VeritySearchEngine.new(klass, query, offset, size, sort, order)
|
131
|
+
end
|
132
|
+
result = search.results.map {|o_id| {id: o_id} }
|
133
|
+
total = search.total
|
134
|
+
|
135
|
+
# TODO: search engine should not destroy query :/
|
136
|
+
query = (params[:query] || []).dup
|
137
|
+
|
138
|
+
response = {
|
139
|
+
total: total,
|
140
|
+
results: result
|
141
|
+
}
|
142
|
+
else
|
143
|
+
query = []
|
144
|
+
|
145
|
+
response = {
|
91
146
|
total: 0,
|
92
147
|
results: []
|
93
|
-
}
|
148
|
+
}
|
94
149
|
end
|
95
150
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
if use_naive_search_engine?(query)
|
104
|
-
#puts "NAIVE"
|
105
|
-
search = NaiveSearchEngine.new(klass, query, offset, size, sort, order)
|
106
|
-
else
|
107
|
-
#puts "VERITY"
|
108
|
-
search = VeritySearchEngine.new(klass, query, offset, size, sort, order)
|
151
|
+
if response[:total] > offset + size
|
152
|
+
response[:continuation] = Base64.encode64({
|
153
|
+
size: size,
|
154
|
+
offset: (offset+size),
|
155
|
+
sort_order: order,
|
156
|
+
sort_by: sort,
|
157
|
+
}.to_json)
|
109
158
|
end
|
110
|
-
result = search.results.map {|o| {id: o.id} }
|
111
|
-
total = search.total
|
112
159
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
}))
|
160
|
+
response[:facets] = facets.map {|facet| FacetBuilder.new(facet.symbolize_keys, query, klass).build } unless facets.empty?
|
161
|
+
|
162
|
+
return ::JSON.parse(::ActiveSupport::JSON.encode(response))
|
117
163
|
end
|
118
164
|
|
119
165
|
def update(workspace_id, values)
|
@@ -156,7 +202,7 @@ module Fiona7
|
|
156
202
|
end
|
157
203
|
end
|
158
204
|
if outside_objects.length != 0
|
159
|
-
|
205
|
+
outsize_paths = outsize_objects.map(&:path).join(" ")
|
160
206
|
Assert.input(
|
161
207
|
false,
|
162
208
|
"Cannot remove object because #{outside_paths} have links pointing to it"
|
@@ -190,10 +236,36 @@ module Fiona7
|
|
190
236
|
)
|
191
237
|
end
|
192
238
|
|
239
|
+
# This is required because the sdk is inconsistent
|
240
|
+
# in its usage of search operators
|
241
|
+
def normalize_query_params(query_params)
|
242
|
+
query_params.each do |query_param|
|
243
|
+
query_param.symbolize_keys!
|
244
|
+
query_param[:operator] = query_param[:operator].to_sym
|
245
|
+
query_param[:field] = query_param[:field].to_sym
|
246
|
+
|
247
|
+
case query_param[:operator]
|
248
|
+
when :contains
|
249
|
+
query_param[:operator] = :search
|
250
|
+
when :contains_prefix
|
251
|
+
query_param[:operator] = :prefix_search
|
252
|
+
when :equals
|
253
|
+
query_param[:operator] = :equal
|
254
|
+
when :starts_with
|
255
|
+
query_param[:operator] = :prefix
|
256
|
+
when :is_greater_than
|
257
|
+
query_param[:operator] = :greater_than
|
258
|
+
when :is_less_than
|
259
|
+
query_param[:operator] = :less_than
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
193
264
|
def use_naive_search_engine?(query)
|
194
265
|
false ||
|
195
266
|
query.empty? ||
|
196
|
-
query.any? {|q| q[:field].to_sym == :_path && (q[:operator].to_sym == :equal || query.length == 1)} ||
|
267
|
+
query.any? {|q| (q[:field].to_sym == :_path || q[:field].to_sym == :_name)&& (q[:operator].to_sym == :equal || q[:operator].to_sym == :prefix || query.length == 1)} ||
|
268
|
+
query.any? {|q| q[:field].to_sym == :_parent_path && (q[:operator].to_sym == :equal || query.length == 1)} ||
|
197
269
|
(query.length == 1 && query.first[:field].to_sym == :_modification) ||
|
198
270
|
(query.length == 1 && query.first[:field].to_sym == :_obj_class) ||
|
199
271
|
(query.length == 1 && query.first[:field].to_sym == :id) ||
|
@@ -7,15 +7,31 @@ module Fiona7
|
|
7
7
|
class WorkspaceController
|
8
8
|
def fetch(id)
|
9
9
|
id = id.to_sym
|
10
|
-
Assert.
|
10
|
+
Assert.exists(
|
11
11
|
id == :published || id == :rtc,
|
12
|
-
"Workspace
|
12
|
+
"Could not find Scrivito::Workspace with id #{id}"
|
13
13
|
)
|
14
14
|
|
15
15
|
w = Workspace.new(id)
|
16
16
|
return ::JSON.parse(::ActiveSupport::JSON.encode(w))
|
17
17
|
end
|
18
18
|
|
19
|
+
def changes(id)
|
20
|
+
id = id.to_sym
|
21
|
+
Assert.exists(
|
22
|
+
id == :published || id == :rtc,
|
23
|
+
"Could not find Scrivito::Workspace with id #{id}"
|
24
|
+
)
|
25
|
+
|
26
|
+
w = Workspace.new(id)
|
27
|
+
w_json = ::JSON.parse(::ActiveSupport::JSON.encode(w))
|
28
|
+
{
|
29
|
+
"workspace" => w_json,
|
30
|
+
"current" => w.content_state_id,
|
31
|
+
"objs" => "*"
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
19
35
|
def publish(id)
|
20
36
|
raise "Unexpected workspace_id: #{id}" unless id.to_s == "rtc"
|
21
37
|
WriteObj.where(is_edited: 1).each do |obj|
|
@@ -33,6 +49,11 @@ module Fiona7
|
|
33
49
|
Assert.contraint(false, "Workspaces cannot be deleted")
|
34
50
|
end
|
35
51
|
|
52
|
+
def update(id)
|
53
|
+
# DUMMY NO OP
|
54
|
+
{}
|
55
|
+
end
|
56
|
+
|
36
57
|
def create(values)
|
37
58
|
id = (values[:workspace][:id] || values[:workspace]["id"])
|
38
59
|
id = (id || :no_id_provided).to_sym
|
data/lib/fiona7/engine.rb
CHANGED
@@ -21,19 +21,20 @@ require "fiona7/scrivito_patches/attribute_serializer"
|
|
21
21
|
require "fiona7/scrivito_patches/basic_obj"
|
22
22
|
require "fiona7/scrivito_patches/basic_widget"
|
23
23
|
require "fiona7/scrivito_patches/binary"
|
24
|
-
require "fiona7/scrivito_patches/cms_backend"
|
25
24
|
require "fiona7/scrivito_patches/child_list_tag"
|
25
|
+
require "fiona7/scrivito_patches/cms_backend"
|
26
26
|
require "fiona7/scrivito_patches/cms_field_tag"
|
27
|
-
require "fiona7/scrivito_patches/controller_actions"
|
28
27
|
# different load order !!
|
29
28
|
#require "fiona7/scrivito_patches/cms_dispatch_controller"
|
30
29
|
require "fiona7/scrivito_patches/cms_rest_api"
|
31
30
|
require "fiona7/scrivito_patches/cms_routing"
|
32
31
|
require "fiona7/scrivito_patches/layout_tags"
|
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/obj_data_from_rest"
|
36
35
|
require "fiona7/scrivito_patches/page_config"
|
36
|
+
require "fiona7/scrivito_patches/preset_routes"
|
37
|
+
require "fiona7/scrivito_patches/routing_extensions"
|
37
38
|
require "fiona7/scrivito_patches/type_computer"
|
38
39
|
require "fiona7/scrivito_patches/workspace"
|
39
40
|
|
@@ -42,27 +43,10 @@ require "fiona7/fiona_connector_patches/cms_accessible"
|
|
42
43
|
require "fiona7/middleware/table_switching_middleware"
|
43
44
|
require "fiona7/middleware/server_detection_middleware"
|
44
45
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
self.class.runtime += event.duration
|
49
|
-
return unless logger.debug?
|
50
|
-
|
51
|
-
duration = '(%.1fms)' % [event.duration]
|
52
|
-
|
53
|
-
param = event.payload[:params]
|
54
|
-
param_text = " #{param}" if param
|
55
|
-
|
56
|
-
verb_text = event.payload[:verb].upcase
|
57
|
-
path_text = event.payload[:path]
|
58
|
-
|
59
|
-
debug " Fiona7 #{verb_text} #{path_text}#{param_text} #{duration}"
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
46
|
+
# components
|
47
|
+
require "fiona7/recursive_object_finder"
|
48
|
+
require "fiona7/complex_object"
|
63
49
|
|
64
|
-
|
65
|
-
require "fiona7/routers/content_service"
|
66
50
|
require "fiona7/routers/rest_api"
|
67
51
|
|
68
52
|
require 'fiona7/scrivito_user'
|
@@ -124,6 +108,10 @@ module Fiona7
|
|
124
108
|
|
125
109
|
class Engine < ::Rails::Engine
|
126
110
|
|
111
|
+
config.after_initialize do
|
112
|
+
puts "ENGINE AFTER INITIALIZE"
|
113
|
+
end
|
114
|
+
|
127
115
|
config.to_prepare do
|
128
116
|
# TODO: do some smart optimizations
|
129
117
|
initializer = Fiona7::Initializer.new
|