zuora_connect 2.0.57r → 2.0.57w
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2caec5e77f73729b027d91180190ec5fde18ab6258870aac6ce1ab308da086f
|
4
|
+
data.tar.gz: ec7825ad450ecc9dab4a6830cf878ebe2638dfa2686501db5eab16621d99d3e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c89bd41a4619b94e106dfb1935e092537548c6a09b20446686866ee470f9aba1ca5d9bf1bd4845d86ccb04693cd49039504394d9278ea84b6ac8ab5a57a2925f
|
7
|
+
data.tar.gz: acd7a106898ce3325893caeb1680907dd58b249ab184cbb150f292b3456ac1936adfbf1309cbe78b5224c83b15973b5107590eb2d25f7d047cc2e99453b00a5a
|
@@ -98,7 +98,9 @@ module ZuoraConnect
|
|
98
98
|
Redis.current.zrem("InstanceRefreshing", self.id)
|
99
99
|
end
|
100
100
|
if defined?(Resque.redis)
|
101
|
-
Resque.redis.
|
101
|
+
Resque.redis.zrange("PauseQueue", 0, -1).each do |key|
|
102
|
+
Resque.redis.zrem("PauseQueue", key) if key.split("__").first.to_i == self.id
|
103
|
+
end
|
102
104
|
end
|
103
105
|
return true
|
104
106
|
end
|
@@ -203,7 +205,7 @@ module ZuoraConnect
|
|
203
205
|
else
|
204
206
|
self.new_session_message = "REBUILDING - Expires in #{time_expire} seconds"
|
205
207
|
end
|
206
|
-
ZuoraConnect.logger.debug(self.new_session_message)
|
208
|
+
ZuoraConnect.logger.debug(self.new_session_message, self.default_ougai_items)
|
207
209
|
self.build_task(task_data: session["#{self.id}::task_data"], session: session)
|
208
210
|
end
|
209
211
|
end
|
@@ -1217,6 +1219,16 @@ module ZuoraConnect
|
|
1217
1219
|
end
|
1218
1220
|
end
|
1219
1221
|
|
1222
|
+
def self.without_sticking
|
1223
|
+
if self.connection.respond_to?(:without_sticking)
|
1224
|
+
self.connection.without_sticking do
|
1225
|
+
yield
|
1226
|
+
end
|
1227
|
+
else
|
1228
|
+
yield
|
1229
|
+
end
|
1230
|
+
end
|
1231
|
+
|
1220
1232
|
method_hook :updateOption, :update_logins, :before => :check_oauth_state
|
1221
1233
|
method_hook :new_session, :refresh, :build_task, :after => :apartment_switch
|
1222
1234
|
end
|
@@ -19,7 +19,6 @@ module ZuoraConnect
|
|
19
19
|
ElasticAPM.set_label(:trace_id, request.uuid) if defined?(ElasticAPM) && ElasticAPM.running?
|
20
20
|
end
|
21
21
|
end
|
22
|
-
start_time = Time.now
|
23
22
|
if request.headers["API-Token"].present?
|
24
23
|
@appinstance = ZuoraConnect::AppInstance.find_by(:api_token => request.headers["API-Token"])
|
25
24
|
ZuoraConnect.logger.debug("API REQUEST - API token") if @appinstance.present?
|
@@ -48,7 +47,7 @@ module ZuoraConnect
|
|
48
47
|
render json: {"status": 401, "message": "Missing mapping or no deployment for '#{zuora_host}-#{zuora_entity_id}' ."}, status: :unauthorized
|
49
48
|
return
|
50
49
|
elsif appinstances.size > 1
|
51
|
-
render json: {"status": 401, "message": "More than one app instance binded to host and entity ids. Please indicate correct instance via 'zuora-instance-id' header", "instances": appinstances.map {|instance| instance.id } }, status: :unauthorized
|
50
|
+
render json: {"status": 401, "message": "More than one app instance binded to host and entity ids. Please indicate correct instance via 'zuora-instance-id' header", "instances": appinstances.map {|instance| instance.id }.sort }, status: :unauthorized
|
52
51
|
return
|
53
52
|
else
|
54
53
|
@appinstance = appinstances.first
|
@@ -65,10 +64,6 @@ module ZuoraConnect
|
|
65
64
|
else
|
66
65
|
check_instance
|
67
66
|
end
|
68
|
-
|
69
|
-
if @appinstance.present?
|
70
|
-
ZuoraConnect.logger.debug("Authenticate App API Request Completed In - #{(Time.now - start_time).round(2)}s")
|
71
|
-
end
|
72
67
|
end
|
73
68
|
end
|
74
69
|
|
@@ -101,7 +96,6 @@ module ZuoraConnect
|
|
101
96
|
ElasticAPM.set_label(:trace_id, request.uuid)
|
102
97
|
end
|
103
98
|
end
|
104
|
-
start_time = Time.now
|
105
99
|
|
106
100
|
if ZuoraConnect.configuration.mode == "Production"
|
107
101
|
setup_instance_via_prod_mode
|
@@ -141,8 +135,6 @@ module ZuoraConnect
|
|
141
135
|
rescue
|
142
136
|
ZuoraConnect.logger.error(ex)
|
143
137
|
end
|
144
|
-
|
145
|
-
ZuoraConnect.logger.debug("Authenticate App Request Completed In - #{(Time.now - start_time).round(2)}s")
|
146
138
|
end
|
147
139
|
rescue ZuoraConnect::Exceptions::InvalidCredentialSet => ex
|
148
140
|
id = @appinstance.id
|
@@ -503,7 +495,7 @@ module ZuoraConnect
|
|
503
495
|
end
|
504
496
|
return
|
505
497
|
end
|
506
|
-
elsif request["data"] && /^([A-Za-z0-9+\/\-\_]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9
|
498
|
+
elsif request["data"].present? && (request["connectInstanceId"].present? || /^([A-Za-z0-9+\/\-\_]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9+-_\/]{3}=|[A-Za-z0-9+\/]{2}==)$/.match(request["data"].to_s))
|
507
499
|
session.clear
|
508
500
|
values = JSON.parse(ZuoraConnect::AppInstance.decrypt_response(Base64.urlsafe_decode64(request["data"])))
|
509
501
|
values.fetch("param_data", {}).each do |k ,v|
|
@@ -518,8 +510,6 @@ module ZuoraConnect
|
|
518
510
|
session["#{values["appInstance"]}::user::email"] = values["current_user"]["email"]
|
519
511
|
end
|
520
512
|
|
521
|
-
ZuoraConnect.logger.debug({msg: 'Setup values', connect: values}) if Rails.env != "production"
|
522
|
-
|
523
513
|
@appinstance = ZuoraConnect::AppInstance.find_by(:id => values["appInstance"].to_i)
|
524
514
|
|
525
515
|
if @appinstance.blank?
|
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: 2.0.
|
4
|
+
version: 2.0.57w
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connect Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apartment
|