zuora_connect 3.0.0.pre.t → 3.0.0.pre.y
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/initializers/postgresql_adapter.rb +1 -1
- data/config/initializers/zuora_observability.rb +13 -10
- data/lib/zuora_connect.rb +9 -1
- data/lib/zuora_connect/configuration.rb +1 -1
- data/lib/zuora_connect/controllers/helpers.rb +3 -3
- data/lib/zuora_connect/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84a8e3703c93dd6101a516df7b21df42ccc2e3ffcd9e3452c9554eb797a80dfa
|
4
|
+
data.tar.gz: b63dcc260cac82901a95cb53d5146fa1e89609a7ecb0277bb72af590d67a4ee8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53c256ae2635f5a0f502351978c2dd70d2781fbc3daa0b09f0c0d45820d45f3f47eafbde3c6ab9be0bb3841e27a3d4d8c3f27dfb9f901f602db10beefff1d01c
|
7
|
+
data.tar.gz: db3bbb11f4ad1cdc5f5a9dbbd3ddf3a8ea16266f97ab386e8295af3374a95d805aaa594bdb1364c8963d9d681e52edc26fcfe16e784cc91fe027e4967a58191b
|
@@ -10,7 +10,7 @@ module ActiveRecord
|
|
10
10
|
|
11
11
|
return if loaded_from_cache?(initializer)
|
12
12
|
|
13
|
-
if supports_ranges?
|
13
|
+
if Rails::VERSION::MAJOR >= 6 || supports_ranges?
|
14
14
|
query = <<-SQL
|
15
15
|
SELECT DISTINCT on (t.typname) t.oid, t.typname, t.typelem, t.typdelim, t.typinput, r.rngsubtype, t.typtype, t.typbasetype
|
16
16
|
FROM pg_type as t
|
@@ -1,21 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
ZuoraObservability.configure do |config|
|
2
4
|
config.zecs_service_hook = lambda do |controller|
|
3
5
|
custom_payload = {}
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
end
|
6
|
+
appinstance = controller.instance_variable_get(:@appinstance)
|
7
|
+
|
8
|
+
if appinstance&.logitems.present? && appinstance.logitems.class == Hash
|
9
|
+
ActiveSupport::Deprecation.warn("logitems is deprecated, please use zecs_service_hook. See 'https://gitlab.zeta.tools/extension-products/incubating-projects/zuora_observability/-/blob/master/doc/logging.md' for more details.")
|
10
|
+
custom_payload.merge!(appinstance.logitems)
|
10
11
|
end
|
12
|
+
|
11
13
|
custom_payload
|
12
14
|
end
|
15
|
+
|
13
16
|
config.add_custom_payload_hook do |controller|
|
14
17
|
custom_payload = {}
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
18
|
+
appinstance = controller.instance_variable_get(:@appinstance)
|
19
|
+
|
20
|
+
custom_payload.merge!({ email: appinstance.connect_user }) if appinstance
|
21
|
+
|
19
22
|
custom_payload
|
20
23
|
end
|
21
24
|
end
|
data/lib/zuora_connect.rb
CHANGED
@@ -31,6 +31,14 @@ module ZuoraConnect
|
|
31
31
|
@logger ||= ZuoraObservability::Logger.custom_logger(name: "Connect", level: Rails.logger.level)
|
32
32
|
end
|
33
33
|
end
|
34
|
+
|
35
|
+
def app_name
|
36
|
+
if Rails::VERSION::MAJOR >= 6
|
37
|
+
Rails.application.class.module_parent_name
|
38
|
+
else
|
39
|
+
Rails.application.class.parent_name
|
40
|
+
end
|
41
|
+
end
|
34
42
|
end
|
35
43
|
|
36
44
|
module Controllers
|
@@ -86,7 +94,7 @@ module ZuoraConnect
|
|
86
94
|
ignore_url_patterns: ['^\/admin\/resque.*', '^\/admin\/redis.*', '^\/admin\/peek.*', '^\/peek.*'],
|
87
95
|
verify_server_cert: false,
|
88
96
|
log_level: Logger::INFO,
|
89
|
-
service_name: ENV['DEIS_APP'].present? ? ENV['DEIS_APP'] :
|
97
|
+
service_name: ENV['DEIS_APP'].present? ? ENV['DEIS_APP'] : ZuoraConnect.app_name,
|
90
98
|
logger: ZuoraObservability::Logger.custom_logger(name: "ElasticAPM", level: Logger::WARN)
|
91
99
|
})
|
92
100
|
defaults.merge!({disable_send: true}) if defined?(Rails::Console)
|
@@ -550,11 +550,11 @@ module ZuoraConnect
|
|
550
550
|
final_error = output_xml.xpath('//fns:FaultCode', 'fns' =>'http://fault.api.zuora.com/').text
|
551
551
|
session.clear
|
552
552
|
if final_error.blank?
|
553
|
-
ZuoraConnect.logger.warn("UI Authorization Error", ex,
|
553
|
+
ZuoraConnect.logger.warn("UI Authorization Error", ex, response: { params: response.body })
|
554
554
|
elsif final_error != "INVALID_SESSION"
|
555
|
-
ZuoraConnect.logger.warn("UI Authorization Error", ex,
|
555
|
+
ZuoraConnect.logger.warn("UI Authorization Error", ex, response: { params: final_error })
|
556
556
|
else
|
557
|
-
ZuoraConnect.logger.info("UI Authorization Error", ex,
|
557
|
+
ZuoraConnect.logger.info("UI Authorization Error", ex, response: { params: final_error })
|
558
558
|
end
|
559
559
|
redirect_to "https://#{zuora_host}/apps/newlogin.do?retURL=#{request.fullpath}"
|
560
560
|
return
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zuora_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.pre.
|
4
|
+
version: 3.0.0.pre.y
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connect Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apartment
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
version: 4.1.0
|
110
110
|
- - "<"
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: '
|
112
|
+
version: '6.1'
|
113
113
|
type: :runtime
|
114
114
|
prerelease: false
|
115
115
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -119,7 +119,7 @@ dependencies:
|
|
119
119
|
version: 4.1.0
|
120
120
|
- - "<"
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version: '
|
122
|
+
version: '6.1'
|
123
123
|
- !ruby/object:Gem::Dependency
|
124
124
|
name: raindrops
|
125
125
|
requirement: !ruby/object:Gem::Requirement
|