forest_liana 7.2.1 → 7.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/forest_liana/actions_controller.rb +3 -0
- data/app/controllers/forest_liana/associations_controller.rb +4 -0
- data/app/controllers/forest_liana/base_controller.rb +1 -0
- data/app/controllers/forest_liana/resources_controller.rb +8 -0
- data/app/controllers/forest_liana/router.rb +1 -0
- data/app/controllers/forest_liana/scopes_controller.rb +1 -0
- data/app/controllers/forest_liana/smart_actions_controller.rb +4 -0
- data/app/controllers/forest_liana/stats_controller.rb +2 -0
- data/app/services/forest_liana/intercom_attributes_getter.rb +1 -0
- data/app/services/forest_liana/intercom_conversation_getter.rb +1 -0
- data/app/services/forest_liana/intercom_conversations_getter.rb +1 -0
- data/app/services/forest_liana/ip_whitelist.rb +1 -0
- data/app/services/forest_liana/permissions_getter.rb +1 -0
- data/app/services/forest_liana/resources_getter.rb +1 -0
- data/app/services/forest_liana/schema_adapter.rb +4 -1
- data/app/services/forest_liana/search_query_builder.rb +1 -0
- data/app/services/forest_liana/stripe_invoices_getter.rb +1 -0
- data/app/services/forest_liana/stripe_payments_getter.rb +1 -0
- data/app/services/forest_liana/stripe_sources_getter.rb +1 -0
- data/app/services/forest_liana/stripe_subscriptions_getter.rb +1 -0
- data/config/initializers/httpclient.rb +11 -0
- data/config/initializers/logger.rb +8 -1
- data/lib/forest_liana/bootstrapper.rb +9 -5
- data/lib/forest_liana/collection.rb +1 -0
- data/lib/forest_liana/engine.rb +3 -0
- data/lib/forest_liana/schema_file_updater.rb +1 -0
- data/lib/forest_liana/version.rb +1 -1
- data/lib/forest_liana.rb +2 -0
- data/spec/config/initializers/logger_spec.rb +37 -0
- metadata +137 -136
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f6d7b1f15f9049662a8a2275159a353fe9430460a6057c18af99fb3b23e9ccb
|
4
|
+
data.tar.gz: 5f10ad94306023a27b17921225f7df4f25ac5e97e37c0d4e5be0220a6f57038b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edb8fa9ca2626c71fe716c8ea79f98015c0333ee7d0b178098170673ac3535cdfbaf56b0d00fee5a8e4d168ea4d7b8f69fd06eeb8e517e096d2d25669a4982cd
|
7
|
+
data.tar.gz: 7d40c81c9cf17a84444f696cd977549629b9d5bfd0c94241e81bfb564e8b3ac9a858bd016265ceccc89d4a9bb176b364b3ee75b3bf76aa014d15f80173589a09
|
@@ -5,6 +5,7 @@ module ForestLiana
|
|
5
5
|
begin
|
6
6
|
params[:data][:attributes]
|
7
7
|
rescue => error
|
8
|
+
FOREST_REPORTER.report error
|
8
9
|
FOREST_LOGGER.error "Smart Action hook request error: #{error}"
|
9
10
|
{}
|
10
11
|
end
|
@@ -19,6 +20,7 @@ module ForestLiana
|
|
19
20
|
begin
|
20
21
|
collection.actions.find {|action| ActiveSupport::Inflector.parameterize(action.name) == params[:action_name]}
|
21
22
|
rescue => error
|
23
|
+
FOREST_REPORTER.report error
|
22
24
|
FOREST_LOGGER.error "Smart Action get action retrieval error: #{error}"
|
23
25
|
nil
|
24
26
|
end
|
@@ -57,6 +59,7 @@ module ForestLiana
|
|
57
59
|
rescue ForestLiana::Errors::SmartActionInvalidFieldError => invalid_field_error
|
58
60
|
FOREST_LOGGER.warn invalid_field_error.message
|
59
61
|
rescue ForestLiana::Errors::SmartActionInvalidFieldHookError => invalid_hook_error
|
62
|
+
FOREST_REPORTER.report invalid_hook_error
|
60
63
|
FOREST_LOGGER.error invalid_hook_error.message
|
61
64
|
return render status: 500, json: { error: invalid_hook_error.message }
|
62
65
|
end
|
@@ -18,6 +18,7 @@ module ForestLiana
|
|
18
18
|
format.csv { render_csv(getter, @association.klass) }
|
19
19
|
end
|
20
20
|
rescue => error
|
21
|
+
FOREST_REPORTER.report error
|
21
22
|
FOREST_LOGGER.error "Association Index error: #{error}\n#{format_stacktrace(error)}"
|
22
23
|
internal_server_error
|
23
24
|
end
|
@@ -30,6 +31,7 @@ module ForestLiana
|
|
30
31
|
|
31
32
|
render serializer: nil, json: { count: getter.records_count }
|
32
33
|
rescue => error
|
34
|
+
FOREST_REPORTER.report error
|
33
35
|
FOREST_LOGGER.error "Association Index Count error: #{error}\n#{format_stacktrace(error)}"
|
34
36
|
internal_server_error
|
35
37
|
end
|
@@ -47,6 +49,7 @@ module ForestLiana
|
|
47
49
|
head :no_content
|
48
50
|
end
|
49
51
|
rescue => error
|
52
|
+
FOREST_REPORTER.report error
|
50
53
|
FOREST_LOGGER.error "Association Update error: #{error}\n#{format_stacktrace(error)}"
|
51
54
|
internal_server_error
|
52
55
|
end
|
@@ -59,6 +62,7 @@ module ForestLiana
|
|
59
62
|
|
60
63
|
head :no_content
|
61
64
|
rescue => error
|
65
|
+
FOREST_REPORTER.report error
|
62
66
|
FOREST_LOGGER.error "Association Associate error: #{error}\n#{format_stacktrace(error)}"
|
63
67
|
internal_server_error
|
64
68
|
end
|
@@ -30,6 +30,7 @@ module ForestLiana
|
|
30
30
|
}])
|
31
31
|
render(serializer: nil, json: error_data, status: exception.status)
|
32
32
|
rescue => exception
|
33
|
+
FOREST_REPORTER.report exception
|
33
34
|
FOREST_LOGGER.error(exception)
|
34
35
|
FOREST_LOGGER.error(exception.backtrace.join("\n"))
|
35
36
|
render(serializer: nil, json: nil, status: :internal_server_error)
|
@@ -47,6 +47,7 @@ module ForestLiana
|
|
47
47
|
}])
|
48
48
|
render(serializer: nil, json: error_data, status: error.status)
|
49
49
|
rescue => error
|
50
|
+
FOREST_REPORTER.report error
|
50
51
|
FOREST_LOGGER.error "Records Index error: #{error}\n#{format_stacktrace(error)}"
|
51
52
|
internal_server_error
|
52
53
|
end
|
@@ -79,6 +80,7 @@ module ForestLiana
|
|
79
80
|
}])
|
80
81
|
render(serializer: nil, json: error_data, status: error.status)
|
81
82
|
rescue => error
|
83
|
+
FOREST_REPORTER.report error
|
82
84
|
FOREST_LOGGER.error "Records Index Count error: #{error}\n#{format_stacktrace(error)}"
|
83
85
|
internal_server_error
|
84
86
|
end
|
@@ -96,6 +98,7 @@ module ForestLiana
|
|
96
98
|
rescue ActiveRecord::RecordNotFound
|
97
99
|
render serializer: nil, json: { status: 404 }, status: :not_found
|
98
100
|
rescue => error
|
101
|
+
FOREST_REPORTER.report error
|
99
102
|
FOREST_LOGGER.error "Record Show error: #{error}\n#{format_stacktrace(error)}"
|
100
103
|
internal_server_error
|
101
104
|
end
|
@@ -119,6 +122,7 @@ module ForestLiana
|
|
119
122
|
creator.record.errors), status: 400
|
120
123
|
end
|
121
124
|
rescue => error
|
125
|
+
FOREST_REPORTER.report error
|
122
126
|
FOREST_LOGGER.error "Record Create error: #{error}\n#{format_stacktrace(error)}"
|
123
127
|
internal_server_error
|
124
128
|
end
|
@@ -142,6 +146,7 @@ module ForestLiana
|
|
142
146
|
updater.record.errors), status: 400
|
143
147
|
end
|
144
148
|
rescue => error
|
149
|
+
FOREST_REPORTER.report error
|
145
150
|
FOREST_LOGGER.error "Record Update error: #{error}\n#{format_stacktrace(error)}"
|
146
151
|
internal_server_error
|
147
152
|
end
|
@@ -162,6 +167,7 @@ module ForestLiana
|
|
162
167
|
|
163
168
|
head :no_content
|
164
169
|
rescue => error
|
170
|
+
FOREST_REPORTER.report error
|
165
171
|
FOREST_LOGGER.error "Record Destroy error: #{error}\n#{format_stacktrace(error)}"
|
166
172
|
internal_server_error
|
167
173
|
end
|
@@ -175,6 +181,7 @@ module ForestLiana
|
|
175
181
|
|
176
182
|
head :no_content
|
177
183
|
rescue => error
|
184
|
+
FOREST_REPORTER.report error
|
178
185
|
FOREST_LOGGER.error "Records Destroy error: #{error}\n#{format_stacktrace(error)}"
|
179
186
|
internal_server_error
|
180
187
|
end
|
@@ -190,6 +197,7 @@ module ForestLiana
|
|
190
197
|
render serializer: nil, json: { status: 404 }, status: :not_found
|
191
198
|
end
|
192
199
|
rescue => error
|
200
|
+
FOREST_REPORTER.report error
|
193
201
|
FOREST_LOGGER.error "Find Collection error: #{error}\n#{format_stacktrace(error)}"
|
194
202
|
render serializer: nil, json: { status: 404 }, status: :not_found
|
195
203
|
end
|
@@ -39,6 +39,7 @@ class ForestLiana::Router
|
|
39
39
|
|
40
40
|
controller.action(action.to_sym).call(env)
|
41
41
|
rescue NoMethodError => exception
|
42
|
+
FOREST_REPORTER.report exception
|
42
43
|
FOREST_LOGGER.error "Routing error: #{exception}\n#{exception.backtrace.join("\n\t")}"
|
43
44
|
ForestLiana::BaseController.action(:route_not_found).call(env)
|
44
45
|
end
|
@@ -12,6 +12,7 @@ module ForestLiana
|
|
12
12
|
ForestLiana::ScopeManager.invalidate_scope_cache(rendering_id)
|
13
13
|
return render serializer: nil, json: { status: 200 }, status: :ok
|
14
14
|
rescue => error
|
15
|
+
FOREST_REPORTER.report error
|
15
16
|
FOREST_LOGGER.error "Error during scope cache invalidation: #{error.message}"
|
16
17
|
render serializer: nil, json: {status: 500 }, status: :internal_server_error
|
17
18
|
end
|
@@ -12,6 +12,7 @@ module ForestLiana
|
|
12
12
|
begin
|
13
13
|
params[:data][:attributes]
|
14
14
|
rescue => error
|
15
|
+
FOREST_REPORTER.report error
|
15
16
|
FOREST_LOGGER.error "Smart Action execution error: #{error}"
|
16
17
|
{}
|
17
18
|
end
|
@@ -47,6 +48,7 @@ module ForestLiana
|
|
47
48
|
# target records are out of scope
|
48
49
|
render serializer: nil, json: { error: 'Smart Action: target record not found' }, status: :bad_request
|
49
50
|
rescue => error
|
51
|
+
FOREST_REPORTER.report error
|
50
52
|
FOREST_LOGGER.error "Smart Action: #{error}\n#{format_stacktrace(error)}"
|
51
53
|
render serializer: nil, json: { error: 'Smart Action: failed to evaluate permissions' }, status: :internal_server_error
|
52
54
|
end
|
@@ -70,6 +72,7 @@ module ForestLiana
|
|
70
72
|
render serializer: nil, json: { status: 400 }, status: :bad_request
|
71
73
|
end
|
72
74
|
rescue => error
|
75
|
+
FOREST_REPORTER.report error
|
73
76
|
FOREST_LOGGER.error "Smart Action execution error: #{error}"
|
74
77
|
render serializer: nil, json: { status: 400 }, status: :bad_request
|
75
78
|
end
|
@@ -85,6 +88,7 @@ module ForestLiana
|
|
85
88
|
end
|
86
89
|
resource
|
87
90
|
rescue => error
|
91
|
+
FOREST_REPORTER.report error
|
88
92
|
FOREST_LOGGER.error "Find Collection error: #{error}\n#{format_stacktrace(error)}"
|
89
93
|
render serializer: nil, json: { status: 404 }, status: :not_found
|
90
94
|
end
|
@@ -60,6 +60,7 @@ module ForestLiana
|
|
60
60
|
render json: { errors: [{ status: 422, detail: error.message }] },
|
61
61
|
status: :unprocessable_entity, serializer: nil
|
62
62
|
rescue => error
|
63
|
+
FOREST_REPORTER.report error
|
63
64
|
FOREST_LOGGER.error "Live Query error: #{error.message}"
|
64
65
|
render json: { errors: [{ status: 422, detail: error.message }] },
|
65
66
|
status: :unprocessable_entity, serializer: nil
|
@@ -110,6 +111,7 @@ module ForestLiana
|
|
110
111
|
|
111
112
|
return head :forbidden unless checker.is_authorized?
|
112
113
|
rescue => error
|
114
|
+
FOREST_REPORTER.report error
|
113
115
|
FOREST_LOGGER.error "Stats execution error: #{error}"
|
114
116
|
render serializer: nil, json: { status: 400 }, status: :bad_request
|
115
117
|
end
|
@@ -14,6 +14,7 @@ module ForestLiana
|
|
14
14
|
rescue Intercom::ResourceNotFound
|
15
15
|
@record = nil
|
16
16
|
rescue Intercom::UnexpectedError => exception
|
17
|
+
FOREST_REPORTER.report exception
|
17
18
|
FOREST_LOGGER.error "Cannot retrieve the Intercom conversation: #{exception.message}"
|
18
19
|
@record = nil
|
19
20
|
end
|
@@ -31,6 +31,7 @@ module ForestLiana
|
|
31
31
|
rescue Intercom::ResourceNotFound
|
32
32
|
@records = []
|
33
33
|
rescue Intercom::UnexpectedError => exception
|
34
|
+
FOREST_REPORTER.report exception
|
34
35
|
FOREST_LOGGER.error "Cannot retrieve the Intercom conversations: #{exception.message}"
|
35
36
|
@records = []
|
36
37
|
end
|
@@ -21,6 +21,7 @@ module ForestLiana
|
|
21
21
|
false
|
22
22
|
end
|
23
23
|
rescue => exception
|
24
|
+
FOREST_REPORTER.report exception
|
24
25
|
FOREST_LOGGER.error 'Cannot retrieve the IP Whitelist from the Forest server.'
|
25
26
|
FOREST_LOGGER.error 'Which was caused by:'
|
26
27
|
ForestLiana::Errors::ExceptionHelper.recursively_print(exception, margin: ' ', is_error: true)
|
@@ -47,6 +47,7 @@ module ForestLiana
|
|
47
47
|
raise "Forest API returned an #{ForestLiana::Errors::HTTPErrorHelper.format(response)}"
|
48
48
|
end
|
49
49
|
rescue => exception
|
50
|
+
FOREST_REPORTER.report exception
|
50
51
|
FOREST_LOGGER.error 'Cannot retrieve the permissions from the Forest server.'
|
51
52
|
FOREST_LOGGER.error 'Which was caused by:'
|
52
53
|
ForestLiana::Errors::ExceptionHelper.recursively_print(exception, margin: ' ', is_error: true)
|
@@ -261,6 +261,7 @@ module ForestLiana
|
|
261
261
|
FOREST_LOGGER.warn "The association \"#{association.name.to_s}\" " \
|
262
262
|
"does not seem to exist for model \"#{@model.name}\"."
|
263
263
|
rescue => exception
|
264
|
+
FOREST_REPORTER.report exception
|
264
265
|
FOREST_LOGGER.error "An error occured trying to add " \
|
265
266
|
"\"#{association.name.to_s}\" association:\n#{exception}"
|
266
267
|
end
|
@@ -350,10 +351,12 @@ module ForestLiana
|
|
350
351
|
type = 'Number'
|
351
352
|
when :json, :jsonb, :hstore
|
352
353
|
type = 'Json'
|
353
|
-
when :string, :text, :citext
|
354
|
+
when :string, :text, :citext
|
354
355
|
type = 'String'
|
355
356
|
when :time
|
356
357
|
type = 'Time'
|
358
|
+
when :uuid
|
359
|
+
type = 'Uuid'
|
357
360
|
end
|
358
361
|
|
359
362
|
is_array = (column.respond_to?(:array) && column.array == true)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'httpclient'
|
2
|
+
|
3
|
+
class HTTPClient
|
4
|
+
alias original_initialize initialize
|
5
|
+
|
6
|
+
def initialize(*args, &block)
|
7
|
+
original_initialize(*args, &block)
|
8
|
+
# NOTICE: Force use of the default system CA certs (instead of the 6 year old bundled ones).
|
9
|
+
@session_manager&.ssl_config&.set_default_paths
|
10
|
+
end
|
11
|
+
end
|
@@ -18,12 +18,19 @@ module ForestLiana
|
|
18
18
|
displayed_message = "[#{datetime.to_s(:db)}] Forest 🌳🌳🌳 " \
|
19
19
|
"#{message}\n"
|
20
20
|
"\e[#{logger_colors[severity.to_sym]}m#{displayed_message}\033[0m"
|
21
|
-
|
21
|
+
end
|
22
22
|
logger
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
27
|
+
|
28
|
+
class Reporter
|
29
|
+
def self.report (error)
|
30
|
+
ForestLiana.reporter.report error if ForestLiana.reporter
|
31
|
+
end
|
32
|
+
end
|
27
33
|
end
|
28
34
|
|
29
35
|
FOREST_LOGGER = ForestLiana::Logger.log
|
36
|
+
FOREST_REPORTER = ForestLiana::Reporter
|
@@ -57,10 +57,12 @@ module ForestLiana
|
|
57
57
|
@collections_sent.each do |collection|
|
58
58
|
collection['actions'].each do |action|
|
59
59
|
c = get_collection(collection['name'])
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
60
|
+
unless c.nil?
|
61
|
+
a = get_action(c, action['name'])
|
62
|
+
load = !a.hooks.nil? && a.hooks.key?(:load) && a.hooks[:load].is_a?(Proc)
|
63
|
+
change = !a.hooks.nil? && a.hooks.key?(:change) && a.hooks[:change].is_a?(Hash) ? a.hooks[:change].keys : []
|
64
|
+
action['hooks'] = {'load' => load, 'change' => change}
|
65
|
+
end
|
64
66
|
end
|
65
67
|
end
|
66
68
|
end
|
@@ -82,7 +84,8 @@ module ForestLiana
|
|
82
84
|
@collections_sent = content['collections']
|
83
85
|
@meta_sent = content['meta']
|
84
86
|
generate_action_hooks
|
85
|
-
rescue JSON::JSONError
|
87
|
+
rescue JSON::JSONError => error
|
88
|
+
FOREST_REPORTER.report error
|
86
89
|
FOREST_LOGGER.error "The content of .forestadmin-schema.json file is not a correct JSON."
|
87
90
|
FOREST_LOGGER.error "The schema cannot be synchronized with Forest Admin servers."
|
88
91
|
end
|
@@ -122,6 +125,7 @@ module ForestLiana
|
|
122
125
|
end
|
123
126
|
end
|
124
127
|
rescue => exception
|
128
|
+
FOREST_REPORTER.report exception
|
125
129
|
FOREST_LOGGER.error "Cannot fetch properly model #{model.name}:\n" \
|
126
130
|
"#{exception}"
|
127
131
|
end
|
@@ -91,6 +91,7 @@ module ForestLiana::Collection
|
|
91
91
|
begin
|
92
92
|
object.instance_eval(&block)
|
93
93
|
rescue => exception
|
94
|
+
FOREST_REPORTER.report exception
|
94
95
|
FOREST_LOGGER.error "Cannot retrieve the " + name.to_s + " value because of an " \
|
95
96
|
"internal error in the getter implementation: " + exception.message
|
96
97
|
nil
|
data/lib/forest_liana/engine.rb
CHANGED
@@ -37,6 +37,7 @@ module ForestLiana
|
|
37
37
|
end
|
38
38
|
nil
|
39
39
|
rescue => exception
|
40
|
+
FOREST_REPORTER.report exception
|
40
41
|
exception
|
41
42
|
end
|
42
43
|
end
|
@@ -51,6 +52,7 @@ module ForestLiana
|
|
51
52
|
ActiveRecord::Base.connection_pool.with_connection { |connection| connection.active? }
|
52
53
|
rescue => error
|
53
54
|
database_available = false
|
55
|
+
FOREST_REPORTER.report error
|
54
56
|
FOREST_LOGGER.error "No Apimap sent to Forest servers, it seems that the database is not accessible:\n#{error}"
|
55
57
|
end
|
56
58
|
database_available
|
@@ -75,6 +77,7 @@ module ForestLiana
|
|
75
77
|
|
76
78
|
config.after_initialize do |app|
|
77
79
|
if error
|
80
|
+
FOREST_REPORTER.report error
|
78
81
|
FOREST_LOGGER.error "Impossible to set the whitelisted Forest " \
|
79
82
|
"domains for CORS constraint:\n#{error}"
|
80
83
|
end
|
@@ -102,6 +102,7 @@ module ForestLiana
|
|
102
102
|
rescue ForestLiana::Errors::SmartActionInvalidFieldError => invalid_field_error
|
103
103
|
FOREST_LOGGER.warn invalid_field_error.message
|
104
104
|
rescue ForestLiana::Errors::SmartActionInvalidFieldHookError => invalid_hook_error
|
105
|
+
FOREST_REPORTER.report invalid_hook_error
|
105
106
|
FOREST_LOGGER.error invalid_hook_error.message
|
106
107
|
end
|
107
108
|
action['fields'] = action['fields'].map { |field| field.slice(*KEYS_ACTION_FIELD) }
|
data/lib/forest_liana/version.rb
CHANGED
data/lib/forest_liana.rb
CHANGED
@@ -28,6 +28,7 @@ module ForestLiana
|
|
28
28
|
mattr_accessor :names_overriden
|
29
29
|
mattr_accessor :meta
|
30
30
|
mattr_accessor :logger
|
31
|
+
mattr_accessor :reporter
|
31
32
|
# TODO: Remove once lianas prior to 2.0.0 are not supported anymore.
|
32
33
|
mattr_accessor :names_old_overriden
|
33
34
|
|
@@ -40,6 +41,7 @@ module ForestLiana
|
|
40
41
|
self.names_overriden = {}
|
41
42
|
self.meta = {}
|
42
43
|
self.logger = nil
|
44
|
+
self.reporter = nil
|
43
45
|
|
44
46
|
@config_dir = 'lib/forest_liana/**/*.rb'
|
45
47
|
|
@@ -27,4 +27,41 @@ module ForestLiana
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
30
|
+
|
31
|
+
describe Reporter do
|
32
|
+
describe 'self.reporter' do
|
33
|
+
describe 'with a reporter provided' do
|
34
|
+
it 'should report the error' do
|
35
|
+
class SampleReporter
|
36
|
+
def report(error)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
spier = spy('sampleReporter')
|
41
|
+
|
42
|
+
ForestLiana.reporter = spier
|
43
|
+
FOREST_REPORTER.report(Exception.new "sample error")
|
44
|
+
|
45
|
+
expect(spier).to have_received(:report)
|
46
|
+
ForestLiana.reporter = nil
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
describe 'without any reporter provided' do
|
51
|
+
it 'should not report the error' do
|
52
|
+
class ErrorReporter
|
53
|
+
def report(error)
|
54
|
+
expect(false).to be_truthy
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
spier = spy('errorReporter')
|
59
|
+
|
60
|
+
FOREST_REPORTER.report(Exception.new "sample error")
|
61
|
+
|
62
|
+
expect(spier).not_to have_received(:export)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
30
67
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_liana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -302,6 +302,7 @@ files:
|
|
302
302
|
- config/initializers/arel-helpers.rb
|
303
303
|
- config/initializers/error-messages.rb
|
304
304
|
- config/initializers/errors.rb
|
305
|
+
- config/initializers/httpclient.rb
|
305
306
|
- config/initializers/logger.rb
|
306
307
|
- config/initializers/time_formats.rb
|
307
308
|
- config/routes.rb
|
@@ -509,171 +510,171 @@ signing_key:
|
|
509
510
|
specification_version: 4
|
510
511
|
summary: Official Rails Liana for Forest
|
511
512
|
test_files:
|
512
|
-
- test/
|
513
|
-
- test/
|
514
|
-
- test/
|
515
|
-
- test/
|
516
|
-
- test/
|
517
|
-
- test/
|
518
|
-
- test/
|
519
|
-
- test/
|
520
|
-
- test/
|
521
|
-
- test/
|
522
|
-
- test/
|
523
|
-
- test/dummy/
|
524
|
-
- test/dummy/
|
525
|
-
- test/dummy/
|
526
|
-
- test/dummy/
|
527
|
-
- test/dummy/
|
513
|
+
- test/dummy/db/schema.rb
|
514
|
+
- test/dummy/db/migrate/20160627172951_create_tree.rb
|
515
|
+
- test/dummy/db/migrate/20150623115554_create_has_many_class_name_field.rb
|
516
|
+
- test/dummy/db/migrate/20170614141921_create_serialize_field.rb
|
517
|
+
- test/dummy/db/migrate/20150608133044_create_has_one_field.rb
|
518
|
+
- test/dummy/db/migrate/20150608130516_create_date_field.rb
|
519
|
+
- test/dummy/db/migrate/20150608131603_create_decimal_field.rb
|
520
|
+
- test/dummy/db/migrate/20160628173505_add_timestamps.rb
|
521
|
+
- test/dummy/db/migrate/20150616150629_create_polymorphic_field.rb
|
522
|
+
- test/dummy/db/migrate/20150608131430_create_integer_field.rb
|
523
|
+
- test/dummy/db/migrate/20150609114636_create_belongs_to_class_name_field.rb
|
524
|
+
- test/dummy/db/migrate/20181111162121_create_references_table.rb
|
525
|
+
- test/dummy/db/migrate/20160627172810_create_owner.rb
|
526
|
+
- test/dummy/db/migrate/20150608131610_create_float_field.rb
|
527
|
+
- test/dummy/db/migrate/20150612112520_create_has_and_belongs_to_many_field.rb
|
528
|
+
- test/dummy/db/migrate/20150608132621_create_string_field.rb
|
529
|
+
- test/dummy/db/migrate/20150608132159_create_boolean_field.rb
|
530
|
+
- test/dummy/db/migrate/20150608133038_create_belongs_to_field.rb
|
531
|
+
- test/dummy/db/migrate/20150814081918_create_has_many_through_field.rb
|
532
|
+
- test/dummy/db/migrate/20150608150016_create_has_many_field.rb
|
533
|
+
- test/dummy/config.ru
|
528
534
|
- test/dummy/Rakefile
|
529
|
-
- test/dummy/
|
530
|
-
- test/dummy/
|
531
|
-
- test/dummy/
|
532
|
-
- test/dummy/
|
533
|
-
- test/dummy/
|
534
|
-
- test/dummy/
|
535
|
-
- test/dummy/
|
536
|
-
- test/dummy/config/initializers/assets.rb
|
537
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
538
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
539
|
-
- test/dummy/config/initializers/session_store.rb
|
540
|
-
- test/dummy/config/initializers/inflections.rb
|
541
|
-
- test/dummy/config/initializers/mime_types.rb
|
542
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
543
|
-
- test/dummy/config/locales/en.yml
|
544
|
-
- test/dummy/config/environment.rb
|
545
|
-
- test/dummy/config/secrets.yml
|
546
|
-
- test/dummy/config/boot.rb
|
547
|
-
- test/dummy/app/models/has_many_through_field.rb
|
548
|
-
- test/dummy/app/models/tree.rb
|
535
|
+
- test/dummy/app/controllers/application_controller.rb
|
536
|
+
- test/dummy/app/helpers/application_helper.rb
|
537
|
+
- test/dummy/app/models/boolean_field.rb
|
538
|
+
- test/dummy/app/models/decimal_field.rb
|
539
|
+
- test/dummy/app/models/has_many_field.rb
|
540
|
+
- test/dummy/app/models/float_field.rb
|
541
|
+
- test/dummy/app/models/reference.rb
|
549
542
|
- test/dummy/app/models/belongs_to_field.rb
|
550
543
|
- test/dummy/app/models/belongs_to_class_name_field.rb
|
551
|
-
- test/dummy/app/models/polymorphic_field.rb
|
552
|
-
- test/dummy/app/models/reference.rb
|
553
|
-
- test/dummy/app/models/date_field.rb
|
554
|
-
- test/dummy/app/models/decimal_field.rb
|
555
544
|
- test/dummy/app/models/owner.rb
|
556
|
-
- test/dummy/app/models/
|
557
|
-
- test/dummy/app/models/
|
545
|
+
- test/dummy/app/models/has_many_class_name_field.rb
|
546
|
+
- test/dummy/app/models/has_many_through_field.rb
|
547
|
+
- test/dummy/app/models/integer_field.rb
|
548
|
+
- test/dummy/app/models/tree.rb
|
549
|
+
- test/dummy/app/models/date_field.rb
|
558
550
|
- test/dummy/app/models/has_and_belongs_to_many_field.rb
|
551
|
+
- test/dummy/app/models/polymorphic_field.rb
|
559
552
|
- test/dummy/app/models/serialize_field.rb
|
560
|
-
- test/dummy/app/models/integer_field.rb
|
561
|
-
- test/dummy/app/models/float_field.rb
|
562
|
-
- test/dummy/app/models/has_many_class_name_field.rb
|
563
553
|
- test/dummy/app/models/string_field.rb
|
564
554
|
- test/dummy/app/models/has_one_field.rb
|
565
555
|
- test/dummy/app/views/layouts/application.html.erb
|
566
|
-
- test/dummy/app/assets/javascripts/application.js
|
567
556
|
- test/dummy/app/assets/stylesheets/application.css
|
557
|
+
- test/dummy/app/assets/javascripts/application.js
|
568
558
|
- test/dummy/app/assets/config/manifest.js
|
569
|
-
- test/dummy/
|
570
|
-
- test/dummy/
|
571
|
-
- test/dummy/
|
572
|
-
- test/dummy/
|
573
|
-
- test/dummy/
|
574
|
-
- test/dummy/
|
575
|
-
- test/dummy/db/migrate/20181111162121_create_references_table.rb
|
576
|
-
- test/dummy/db/migrate/20150623115554_create_has_many_class_name_field.rb
|
577
|
-
- test/dummy/db/migrate/20150608131610_create_float_field.rb
|
578
|
-
- test/dummy/db/migrate/20160627172951_create_tree.rb
|
579
|
-
- test/dummy/db/migrate/20150612112520_create_has_and_belongs_to_many_field.rb
|
580
|
-
- test/dummy/db/migrate/20150608132159_create_boolean_field.rb
|
581
|
-
- test/dummy/db/migrate/20150608131430_create_integer_field.rb
|
582
|
-
- test/dummy/db/migrate/20150608133044_create_has_one_field.rb
|
583
|
-
- test/dummy/db/migrate/20150609114636_create_belongs_to_class_name_field.rb
|
584
|
-
- test/dummy/db/migrate/20150814081918_create_has_many_through_field.rb
|
585
|
-
- test/dummy/db/migrate/20150608130516_create_date_field.rb
|
586
|
-
- test/dummy/db/migrate/20170614141921_create_serialize_field.rb
|
587
|
-
- test/dummy/db/migrate/20150608133038_create_belongs_to_field.rb
|
588
|
-
- test/dummy/db/migrate/20150608150016_create_has_many_field.rb
|
589
|
-
- test/dummy/db/migrate/20160627172810_create_owner.rb
|
590
|
-
- test/dummy/db/migrate/20150608132621_create_string_field.rb
|
591
|
-
- test/dummy/db/schema.rb
|
559
|
+
- test/dummy/public/404.html
|
560
|
+
- test/dummy/public/favicon.ico
|
561
|
+
- test/dummy/public/422.html
|
562
|
+
- test/dummy/public/500.html
|
563
|
+
- test/dummy/README.rdoc
|
564
|
+
- test/dummy/bin/setup
|
592
565
|
- test/dummy/bin/rails
|
593
|
-
- test/dummy/bin/rake
|
594
566
|
- test/dummy/bin/bundle
|
595
|
-
- test/dummy/bin/
|
567
|
+
- test/dummy/bin/rake
|
568
|
+
- test/dummy/config/environments/test.rb
|
569
|
+
- test/dummy/config/environments/production.rb
|
570
|
+
- test/dummy/config/environments/development.rb
|
571
|
+
- test/dummy/config/boot.rb
|
572
|
+
- test/dummy/config/database.yml
|
573
|
+
- test/dummy/config/application.rb
|
574
|
+
- test/dummy/config/environment.rb
|
575
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
576
|
+
- test/dummy/config/initializers/session_store.rb
|
577
|
+
- test/dummy/config/initializers/assets.rb
|
578
|
+
- test/dummy/config/initializers/inflections.rb
|
579
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
580
|
+
- test/dummy/config/initializers/mime_types.rb
|
581
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
582
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
583
|
+
- test/dummy/config/routes.rb
|
584
|
+
- test/dummy/config/secrets.yml
|
585
|
+
- test/dummy/config/locales/en.yml
|
586
|
+
- test/fixtures/owner.yml
|
587
|
+
- test/fixtures/tree.yml
|
588
|
+
- test/fixtures/reference.yml
|
589
|
+
- test/fixtures/serialize_field.yml
|
590
|
+
- test/fixtures/has_many_through_field.yml
|
591
|
+
- test/fixtures/has_one_field.yml
|
592
|
+
- test/fixtures/string_field.yml
|
593
|
+
- test/fixtures/belongs_to_field.yml
|
594
|
+
- test/fixtures/has_many_field.yml
|
596
595
|
- test/services/forest_liana/operator_date_interval_parser_test.rb
|
597
596
|
- test/services/forest_liana/schema_adapter_test.rb
|
597
|
+
- test/forest_liana_test.rb
|
598
|
+
- test/routing/route_test.rb
|
598
599
|
- test/test_helper.rb
|
599
|
-
- spec/spec_helper.rb
|
600
|
-
- spec/config/initializers/logger_spec.rb
|
601
|
-
- spec/lib/forest_liana/schema_file_updater_spec.rb
|
602
|
-
- spec/lib/forest_liana/bootstrapper_spec.rb
|
603
600
|
- spec/rails_helper.rb
|
604
|
-
- spec/
|
601
|
+
- spec/spec_helper.rb
|
602
|
+
- spec/helpers/forest_liana/query_helper_spec.rb
|
603
|
+
- spec/helpers/forest_liana/schema_helper_spec.rb
|
604
|
+
- spec/requests/authentications_spec.rb
|
605
|
+
- spec/requests/resources_spec.rb
|
606
|
+
- spec/requests/actions_controller_spec.rb
|
607
|
+
- spec/requests/stats_spec.rb
|
608
|
+
- spec/dummy/db/schema.rb
|
609
|
+
- spec/dummy/db/migrate/20190716135241_add_type_to_user.rb
|
610
|
+
- spec/dummy/db/migrate/20190226174951_create_tree.rb
|
611
|
+
- spec/dummy/db/migrate/20190226173051_create_isle.rb
|
612
|
+
- spec/dummy/db/migrate/20210526084712_create_products.rb
|
613
|
+
- spec/dummy/db/migrate/20190716130830_add_age_to_tree.rb
|
614
|
+
- spec/dummy/db/migrate/20210326110524_create_references.rb
|
615
|
+
- spec/dummy/db/migrate/20190226172951_create_user.rb
|
616
|
+
- spec/dummy/db/migrate/20210511141752_create_owners.rb
|
617
|
+
- spec/dummy/db/migrate/20210326140855_create_locations.rb
|
618
|
+
- spec/dummy/config.ru
|
605
619
|
- spec/dummy/Rakefile
|
606
|
-
- spec/dummy/
|
607
|
-
- spec/dummy/
|
608
|
-
- spec/dummy/
|
609
|
-
- spec/dummy/
|
610
|
-
- spec/dummy/config/environments/development.rb
|
611
|
-
- spec/dummy/config/database.yml
|
612
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
613
|
-
- spec/dummy/config/initializers/assets.rb
|
614
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
615
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
616
|
-
- spec/dummy/config/initializers/session_store.rb
|
617
|
-
- spec/dummy/config/initializers/forest_liana.rb
|
618
|
-
- spec/dummy/config/initializers/inflections.rb
|
619
|
-
- spec/dummy/config/initializers/mime_types.rb
|
620
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
621
|
-
- spec/dummy/config/environment.rb
|
622
|
-
- spec/dummy/config/secrets.yml
|
623
|
-
- spec/dummy/config/boot.rb
|
624
|
-
- spec/dummy/lib/forest_liana/collections/island.rb
|
625
|
-
- spec/dummy/lib/forest_liana/collections/user.rb
|
626
|
-
- spec/dummy/lib/forest_liana/collections/location.rb
|
627
|
-
- spec/dummy/app/models/tree.rb
|
628
|
-
- spec/dummy/app/models/island.rb
|
620
|
+
- spec/dummy/app/controllers/forest/islands_controller.rb
|
621
|
+
- spec/dummy/app/controllers/application_controller.rb
|
622
|
+
- spec/dummy/app/helpers/application_helper.rb
|
623
|
+
- spec/dummy/app/models/product.rb
|
629
624
|
- spec/dummy/app/models/reference.rb
|
625
|
+
- spec/dummy/app/models/island.rb
|
630
626
|
- spec/dummy/app/models/owner.rb
|
631
|
-
- spec/dummy/app/models/
|
627
|
+
- spec/dummy/app/models/tree.rb
|
632
628
|
- spec/dummy/app/models/user.rb
|
633
629
|
- spec/dummy/app/models/location.rb
|
634
630
|
- spec/dummy/app/views/layouts/application.html.erb
|
635
631
|
- spec/dummy/app/config/routes.rb
|
636
|
-
- spec/dummy/app/assets/javascripts/application.js
|
637
632
|
- spec/dummy/app/assets/stylesheets/application.css
|
633
|
+
- spec/dummy/app/assets/javascripts/application.js
|
638
634
|
- spec/dummy/app/assets/config/manifest.js
|
639
|
-
- spec/dummy/
|
640
|
-
- spec/dummy/
|
641
|
-
- spec/dummy/
|
642
|
-
- spec/dummy/
|
643
|
-
- spec/dummy/
|
644
|
-
- spec/dummy/db/migrate/20190226172951_create_user.rb
|
645
|
-
- spec/dummy/db/migrate/20190716130830_add_age_to_tree.rb
|
646
|
-
- spec/dummy/db/migrate/20210326110524_create_references.rb
|
647
|
-
- spec/dummy/db/migrate/20190226174951_create_tree.rb
|
648
|
-
- spec/dummy/db/migrate/20210526084712_create_products.rb
|
649
|
-
- spec/dummy/db/migrate/20210326140855_create_locations.rb
|
650
|
-
- spec/dummy/db/migrate/20190716135241_add_type_to_user.rb
|
651
|
-
- spec/dummy/db/migrate/20210511141752_create_owners.rb
|
652
|
-
- spec/dummy/db/schema.rb
|
635
|
+
- spec/dummy/README.rdoc
|
636
|
+
- spec/dummy/lib/forest_liana/collections/island.rb
|
637
|
+
- spec/dummy/lib/forest_liana/collections/user.rb
|
638
|
+
- spec/dummy/lib/forest_liana/collections/location.rb
|
639
|
+
- spec/dummy/bin/setup
|
653
640
|
- spec/dummy/bin/rails
|
654
|
-
- spec/dummy/bin/rake
|
655
641
|
- spec/dummy/bin/bundle
|
656
|
-
- spec/dummy/bin/
|
642
|
+
- spec/dummy/bin/rake
|
643
|
+
- spec/dummy/config/environments/test.rb
|
644
|
+
- spec/dummy/config/environments/production.rb
|
645
|
+
- spec/dummy/config/environments/development.rb
|
646
|
+
- spec/dummy/config/boot.rb
|
647
|
+
- spec/dummy/config/database.yml
|
648
|
+
- spec/dummy/config/application.rb
|
649
|
+
- spec/dummy/config/environment.rb
|
650
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
651
|
+
- spec/dummy/config/initializers/session_store.rb
|
652
|
+
- spec/dummy/config/initializers/assets.rb
|
653
|
+
- spec/dummy/config/initializers/forest_liana.rb
|
654
|
+
- spec/dummy/config/initializers/inflections.rb
|
655
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
656
|
+
- spec/dummy/config/initializers/mime_types.rb
|
657
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
658
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
659
|
+
- spec/dummy/config/routes.rb
|
660
|
+
- spec/dummy/config/secrets.yml
|
661
|
+
- spec/services/forest_liana/resource_updater_spec.rb
|
662
|
+
- spec/services/forest_liana/permissions_checker_acl_enabled_spec.rb
|
657
663
|
- spec/services/forest_liana/apimap_sorter_spec.rb
|
664
|
+
- spec/services/forest_liana/resources_getter_spec.rb
|
658
665
|
- spec/services/forest_liana/smart_action_field_validator_spec.rb
|
659
|
-
- spec/services/forest_liana/
|
666
|
+
- spec/services/forest_liana/permissions_getter_spec.rb
|
667
|
+
- spec/services/forest_liana/permissions_formatter_spec.rb
|
660
668
|
- spec/services/forest_liana/has_many_getter_spec.rb
|
661
|
-
- spec/services/forest_liana/
|
662
|
-
- spec/services/forest_liana/permissions_checker_acl_disabled_spec.rb
|
669
|
+
- spec/services/forest_liana/schema_adapter_spec.rb
|
663
670
|
- spec/services/forest_liana/ip_whitelist_checker_spec.rb
|
664
|
-
- spec/services/forest_liana/
|
665
|
-
- spec/services/forest_liana/
|
666
|
-
- spec/services/forest_liana/line_stat_getter_spec.rb
|
671
|
+
- spec/services/forest_liana/scope_manager_spec.rb
|
672
|
+
- spec/services/forest_liana/pie_stat_getter_spec.rb
|
667
673
|
- spec/services/forest_liana/filters_parser_spec.rb
|
668
674
|
- spec/services/forest_liana/permissions_checker_live_queries_spec.rb
|
669
|
-
- spec/services/forest_liana/
|
670
|
-
- spec/services/forest_liana/
|
671
|
-
- spec/services/forest_liana/
|
672
|
-
- spec/
|
673
|
-
- spec/
|
674
|
-
- spec/
|
675
|
-
- spec/requests/actions_controller_spec.rb
|
676
|
-
- spec/requests/stats_spec.rb
|
677
|
-
- spec/requests/resources_spec.rb
|
678
|
-
- spec/helpers/forest_liana/query_helper_spec.rb
|
679
|
-
- spec/helpers/forest_liana/schema_helper_spec.rb
|
675
|
+
- spec/services/forest_liana/value_stat_getter_spec.rb
|
676
|
+
- spec/services/forest_liana/permissions_checker_acl_disabled_spec.rb
|
677
|
+
- spec/services/forest_liana/line_stat_getter_spec.rb
|
678
|
+
- spec/lib/forest_liana/schema_file_updater_spec.rb
|
679
|
+
- spec/lib/forest_liana/bootstrapper_spec.rb
|
680
|
+
- spec/config/initializers/logger_spec.rb
|