zuora_connect 1.4.11 → 1.4.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zuora_connect/railtie.rb +22 -22
- data/lib/zuora_connect/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afa9d6d8acdbfe3fbce8f4cf574b861f437ea1a4
|
4
|
+
data.tar.gz: 97e6045b5054c57b3ee0f02f51aa5bc2edcc3396
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6531f6efbeb115b537a9063b8b1b6828a257b866c1ed6c3fe56f083d9d86f753a1a0d2d71dae0206b0bce72c882549db0624e0ef0a29af892da03824079f50a8
|
7
|
+
data.tar.gz: 69834f0b12503a01dadb1f080d211257a5f1ee80e42b486bdaa539bd445a9a5235d4a468eae95cdeeadb910fb21bacd7c9e403375907e505c8189ed3bca5ddd1
|
@@ -2,32 +2,32 @@ module ZuoraConnect
|
|
2
2
|
class Railtie < Rails::Railtie
|
3
3
|
config.before_initialize do
|
4
4
|
version = Rails.version
|
5
|
-
if
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
::Rails.configuration.serve_static_assets = true
|
12
|
-
end
|
13
|
-
::Rails.configuration.action_dispatch.x_sendfile_header = nil
|
5
|
+
if version >= "5.0.0"
|
6
|
+
::Rails.configuration.public_file_server.enabled = true
|
7
|
+
elsif version >= "4.2.0"
|
8
|
+
::Rails.configuration.serve_static_files = true
|
9
|
+
else
|
10
|
+
::Rails.configuration.serve_static_assets = true
|
14
11
|
end
|
12
|
+
::Rails.configuration.action_dispatch.x_sendfile_header = nil
|
15
13
|
end
|
16
14
|
|
17
15
|
initializer(:rails_stdout_logging, before: :initialize_logger) do
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
16
|
+
if Rails.env != 'development'
|
17
|
+
require 'lograge'
|
18
|
+
logger = ActiveSupport::Logger.new(STDOUT)
|
19
|
+
logger.formatter = ::Logger::Formatter.new
|
20
|
+
Rails.configuration.logger = ActiveSupport::TaggedLogging.new(logger)
|
21
|
+
Rails.configuration.lograge.enabled = true
|
22
|
+
Rails.configuration.lograge.formatter = Lograge::Formatters::Graylog2.new
|
23
|
+
Rails.configuration.lograge.custom_options = lambda do |event|
|
24
|
+
exceptions = %w(controller action format id)
|
25
|
+
{
|
26
|
+
params: event.payload[:params].except(*exceptions),
|
27
|
+
exception: event.payload[:exception],
|
28
|
+
exception_object: event.payload[:exception_object]
|
29
|
+
}
|
30
|
+
end
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|