zuora_connect 2.0.60i → 2.0.60j
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: 27a3847105e8376738ca1183becbbbaae8f6f1b8d5a6fad0dca2207bc8526da2
|
|
4
|
+
data.tar.gz: 99d274d4cd3e5ab15f148fbda907aa51555c52f01c7acd3b88610b6d829d5351
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15e5d1d61dbf20dc6f51419482da3f5804a70e04b40febbee74588b8f7036ca2530aec84fdc58cbaa90add318f48d6c5318188b195e3f98d1fb181092104a732
|
|
7
|
+
data.tar.gz: 1863947d49d8d854456466e17dc35183ba0bc36af30fa272027932bfdf8b0bc09bb98be525fc344ee9649670e1bae0285756838c80cc7d55e524d6dc81e22418
|
|
@@ -11,7 +11,7 @@ module ZuoraConnect
|
|
|
11
11
|
before_destroy :prune_data
|
|
12
12
|
|
|
13
13
|
self.table_name = "zuora_connect_app_instances"
|
|
14
|
-
attr_accessor :options, :mode, :logins, :task_data, :last_refresh, :username, :password, :s3_client, :api_version, :drop_message, :new_session_message, :connect_user, :logitems
|
|
14
|
+
attr_accessor :options, :mode, :logins, :task_data, :last_refresh, :username, :password, :s3_client, :api_version, :drop_message, :new_session_message, :connect_user, :logitems, :user_timezone
|
|
15
15
|
@@telegraf_host = nil
|
|
16
16
|
REFRESH_TIMEOUT = 2.minute #Used to determine how long to wait on current refresh call before executing another
|
|
17
17
|
INSTANCE_REFRESH_WINDOW = 1.hours #Used to set how how long till app starts attempting to refresh cached task connect data
|
|
@@ -240,7 +240,29 @@ module ZuoraConnect
|
|
|
240
240
|
rescue I18n::InvalidLocale => ex
|
|
241
241
|
ZuoraConnect.logger.error(ex) if !IGNORED_LOCALS.include?(ex.locale.to_s.downcase)
|
|
242
242
|
end
|
|
243
|
-
|
|
243
|
+
|
|
244
|
+
user = ZuoraConnect::ZuoraUser.order(updated_at: :desc).first
|
|
245
|
+
self.user_timezone = user ? user.zuora_identity_response.values.first&.dig('timeZone') : nil
|
|
246
|
+
|
|
247
|
+
if self.user_timezone.present?
|
|
248
|
+
# connect instance which has a custom timezone
|
|
249
|
+
if !self.auto_deployed? && self.task_data.dig('user_settings', 'timezone') != self.user_timezone
|
|
250
|
+
if self.environment == 'Production'
|
|
251
|
+
ZuoraConnect.logger.error('Instance and user timezones are different', app_instance_id: self.id)
|
|
252
|
+
end
|
|
253
|
+
self.user_timezone = nil
|
|
254
|
+
Time.zone = self.timezone
|
|
255
|
+
else
|
|
256
|
+
begin
|
|
257
|
+
Time.zone = self.user_timezone
|
|
258
|
+
rescue ArgumentError
|
|
259
|
+
Time.zone = self.timezone
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
else
|
|
263
|
+
Time.zone = self.timezone
|
|
264
|
+
end
|
|
265
|
+
|
|
244
266
|
if self.task_data.present?
|
|
245
267
|
tenants = self.task_data.fetch('tenant_ids', [])
|
|
246
268
|
organizations = self.task_data.fetch('organizations', [])
|
|
@@ -272,6 +294,10 @@ module ZuoraConnect
|
|
|
272
294
|
end
|
|
273
295
|
end
|
|
274
296
|
|
|
297
|
+
def auto_deployed?
|
|
298
|
+
self.id >= 25000000
|
|
299
|
+
end
|
|
300
|
+
|
|
275
301
|
def refresh(session: {})
|
|
276
302
|
refresh_count ||= 0
|
|
277
303
|
skip_connect ||= false
|
|
@@ -136,7 +136,9 @@ module ZuoraConnect
|
|
|
136
136
|
ZuoraConnect.logger.error(ex) if !ZuoraConnect::AppInstance::IGNORED_LOCALS.include?(ex.locale.to_s.downcase)
|
|
137
137
|
end
|
|
138
138
|
begin
|
|
139
|
-
|
|
139
|
+
if @appinstance.user_timezone.blank?
|
|
140
|
+
Time.zone = session["#{@appinstance.id}::user::timezone"] ? session["#{@appinstance.id}::user::timezone"] : @appinstance.timezone
|
|
141
|
+
end
|
|
140
142
|
rescue
|
|
141
143
|
ZuoraConnect.logger.error(ex)
|
|
142
144
|
end
|
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.60j
|
|
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-10-
|
|
11
|
+
date: 2020-10-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: apartment
|