eitil 1.1.35 → 1.1.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/eitil_integrate/lib/eitil_integrate/application_exporter/lookups.rb +7 -3
- data/eitil_support/lib/eitil_support/stacktrace/audit.rb +4 -1
- data/eitil_wrapper/lib/eitil_wrapper/callbacks/helper_methods.rb +2 -0
- data/eitil_wrapper/lib/eitil_wrapper/scopes/default_scopes.rb +2 -0
- data/lib/eitil/railtie.rb +47 -8
- data/lib/eitil/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: f8baf9893cc66d802a9cfa257b9f7e9d9773454837b397684e2b30c188400d2b
|
4
|
+
data.tar.gz: c0f9b000df38b13078bfdc5b348f5e6e5f4732bfabfa96c0d972bd764134e069
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3207e89a489f0f5fca78f2647ef1624b476e2b410a0c7fd5a8b67aa13f4db8bc9f7985a54622af6039bd92ba3b713195d8f218af7fe6d8a35dc48dc5844e5e88
|
7
|
+
data.tar.gz: 68368b42bd8a8cf2b9b93c19d070dbefa378d73377012959d189d57a45c03c99b85f608bbfd0dc680cee9fee8e7ed090a8b51301500b666651da8e3851fa9d4f
|
@@ -31,9 +31,13 @@ module EitilIntegrate::RubyXL
|
|
31
31
|
|
32
32
|
# returns the exporter_infos, without the datatypes – for taxonomy purpuses, the field
|
33
33
|
# names are often sufficient
|
34
|
-
def exporter_taxonomy
|
35
|
-
exporter_infos.transform_values
|
36
|
-
|
34
|
+
def exporter_taxonomy
|
35
|
+
parameter_fields = exporter_infos.transform_values { |v| v.select { |k,v| k == :required || k == :optional } }
|
36
|
+
|
37
|
+
parameter_fields.transform_values do |setting_collection|
|
38
|
+
setting_collection.transform_values do |setting|
|
39
|
+
setting.map { |key| key.is_a?(Hash) ? key.keys : key }.flatten
|
40
|
+
end
|
37
41
|
end
|
38
42
|
end
|
39
43
|
|
@@ -10,7 +10,10 @@ module EitilSupport::Stack::Audit
|
|
10
10
|
# .report_app_calls filters the stack on calls whose path include "/app/", since
|
11
11
|
# audits otherwise tend to grow very big, which might endanger the database.
|
12
12
|
stacktrace = EitilSupport::Stack.new.report_app_calls
|
13
|
-
|
13
|
+
|
14
|
+
# Safe operator in order to avoid raising a NoMetodError when the record
|
15
|
+
# has no audits yet.
|
16
|
+
self.audits.last&.update(stacktrace: stacktrace)
|
14
17
|
end
|
15
18
|
|
16
19
|
end
|
data/lib/eitil/railtie.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
|
2
|
+
|
3
|
+
|
2
4
|
# Constants
|
3
5
|
|
4
6
|
module Eitil
|
@@ -9,8 +11,53 @@ module Eitil
|
|
9
11
|
|
10
12
|
end
|
11
13
|
|
14
|
+
|
15
|
+
|
12
16
|
# Configuration
|
13
17
|
|
18
|
+
module Eitil
|
19
|
+
class Railtie < ::Rails::Railtie
|
20
|
+
|
21
|
+
# The following configuration has its own special place in the boot sequence:
|
22
|
+
# on the one hand, it should run before the initialization of Eitil (gem), but
|
23
|
+
# read config assigned by the main app – which is only loaded AFTER all gems have
|
24
|
+
# been initialized.
|
25
|
+
|
26
|
+
# Therefore, we only require the specified file from the main app, after defining
|
27
|
+
# the possible configurations for the Eitil railtie. This way we escape the boot
|
28
|
+
# sequence's dedault order.
|
29
|
+
|
30
|
+
config.before_initialize do |eitil|
|
31
|
+
|
32
|
+
Eitil.mattr_accessor :controller_ivars,
|
33
|
+
:skip_default_scopes_for_models,
|
34
|
+
:skip_callback_helper_methods_for_models
|
35
|
+
|
36
|
+
Eitil.controller_ivars ||= []
|
37
|
+
Eitil.skip_default_scopes_for_models ||= []
|
38
|
+
Eitil.skip_callback_helper_methods_for_models ||= []
|
39
|
+
|
40
|
+
def Eitil.set_config(&block)
|
41
|
+
yield Eitil
|
42
|
+
end
|
43
|
+
|
44
|
+
config_path = Rails.root + 'config/initializers/eitil.rb'
|
45
|
+
|
46
|
+
if File.exists? config_path
|
47
|
+
puts "Loading Eitil config from #{config_path}..."
|
48
|
+
load config_path
|
49
|
+
else
|
50
|
+
puts "Eitil config not found at #{config_path}, resorting to defaults..."
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
# Loading
|
60
|
+
|
14
61
|
module Eitil
|
15
62
|
|
16
63
|
class Railtie < ::Rails::Railtie
|
@@ -27,12 +74,4 @@ module Eitil
|
|
27
74
|
|
28
75
|
end
|
29
76
|
|
30
|
-
mattr_accessor :controller_ivars
|
31
|
-
|
32
|
-
self.controller_ivars ||= []
|
33
|
-
|
34
|
-
def self.set_config(&block)
|
35
|
-
yield self
|
36
|
-
end
|
37
|
-
|
38
77
|
end
|
data/lib/eitil/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eitil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.39
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jurriaan Schrofer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|