zuora_connect 2.0.57k → 2.0.57p

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: 1e465e3eb7a8baeebe136ee95418b56acd7e4fe2952c82469f3a457f528fadb1
4
- data.tar.gz: 7cc23037896d083ea8ea23a1d1e7fb81a04d21e19731171879f2db750cb1f399
3
+ metadata.gz: 52deb8dab9ab286cbebb70f76bf2a7baa6a0531c9a4dc30a0ff595ed5fe473bc
4
+ data.tar.gz: 50193876865b0b41c7ac42799ecfed555c5f9b246cdd0274c3fbf35ba521cd47
5
5
  SHA512:
6
- metadata.gz: df9a0b5b8c2448fcdda8d13c67b0998c17f46ce84452494b3d1db543a04a517d9515b2c65c3d057344ed1c118544b53d472de1504f2f4d2f60e0114cdbfb8912
7
- data.tar.gz: 0573374e27adb8d81fbd2786c707b784b93eac71f1a70668316ca83e5af14831dc76dc213ac8372bf4fecd57d9667ba5c8a38c30c81a1850f2c1729fc5e5474b
6
+ metadata.gz: a502ab3c95acc1b05cebb4611374b8e2a5ed60859fbe5c3a8185ff1b9c802685722b97850a60243a77564faf55e20e19735dc8b42f82cc5b6c1d30e8162d2e34
7
+ data.tar.gz: 85c040a0bc92c2670917b89898cdfb3c29a45c3ad8be529c24a6e0dea0488f2f7b891a15ef22536a76268d3b01f97fafe247b0eefbe8bf2a1f1df745d1307a69
@@ -15,8 +15,11 @@ if (isHallway()) {
15
15
  }
16
16
 
17
17
  function isHallway() {
18
- var regex = new RegExp("^/services/");
19
- return window.location.pathname.match(regex);
18
+ var regex = new RegExp("(?<=\\/)services\\/.*");
19
+ if (regex.test(window.location.pathname)) {
20
+ return window.location.pathname.match(regex)[0]
21
+ }
22
+ return null;
20
23
  }
21
24
 
22
25
  function deleteAllCookies() {
@@ -210,7 +210,7 @@ module ZuoraConnect
210
210
  return self
211
211
  rescue ZuoraConnect::Exceptions::HoldingPattern => ex
212
212
  while self.marked_for_refresh?
213
- ZuoraConnect.logger.info("Holding - Expires in #{self.reset_mark_expires_at}. '#{self.new_session_message}'")
213
+ ZuoraConnect.logger.info("Holding - Expires in #{self.reset_mark_expires_at}. '#{self.new_session_message}'", self.default_ougai_items)
214
214
  sleep(HOLDING_PATTERN_SLEEP)
215
215
  end
216
216
  self.reload_attributes([:refresh_token, :oauth_expires_at, :access_token])
@@ -219,7 +219,7 @@ module ZuoraConnect
219
219
  rescue ZuoraConnect::Exceptions::MissMatch => ex
220
220
  self.delete_app_instance
221
221
  session = {}
222
- ZuoraConnect.logger.error(ex, app_instance_id_new: self.task_data['id'])
222
+ ZuoraConnect.logger.error(ex, app_instance_id_new: self.task_data['id'], self.default_ougai_items)
223
223
  retry
224
224
  rescue ZuoraConnect::Exceptions::InvalidCredentialSet => ex
225
225
  raise
@@ -229,7 +229,7 @@ module ZuoraConnect
229
229
  self.build_task(task_data: session["#{self.id}::task_data"], session: session)
230
230
  return self
231
231
  else
232
- ZuoraConnect.logger.error("Failed new session", ex)
232
+ ZuoraConnect.logger.error("Failed new session", ex, self.default_ougai_items)
233
233
  raise
234
234
  end
235
235
  ensure
@@ -1121,6 +1121,15 @@ module ZuoraConnect
1121
1121
  # Data from each schema will be loaded into table(aggregate_name) into the public schema
1122
1122
  def self.refresh_aggregate_table(aggregate_name: 'all_tasks_processing', table_name: 'tasks', where_clause: "where status in ('Processing', 'Queued')", index_table: true, ignore_indexes: [])
1123
1123
  self.update_functions
1124
+
1125
+ sql_result = ActiveRecord::Base.connection.execute <<-eos
1126
+ SELECT pid, relname, mode
1127
+ FROM pg_locks l
1128
+ JOIN pg_class t ON l.relation = t.oid AND t.relkind = 'r'
1129
+ WHERE t.relname = '#{aggregate_name}' AND l.mode ='AccessExclusiveLock';
1130
+ eos
1131
+ raise ZuoraConnect::Exceptions::Error.new("An existing lock detected while dropping table '#{aggregate_name}'") if sql_result.count > 0
1132
+
1124
1133
  if index_table
1125
1134
  ActiveRecord::Base.connection.execute('SELECT "shared_extensions".refresh_aggregate_table(\'%s\', \'%s\', %s, \'Index\', \'{%s}\');' % [aggregate_name, table_name, ActiveRecord::Base.connection.quote(where_clause), ignore_indexes.map { |index| "\"#{index}\"" }.join(',')])
1126
1135
  else
@@ -316,17 +316,21 @@ module ZuoraConnect
316
316
  }, :layout => false
317
317
  return
318
318
  end
319
- ZuoraConnect::Exceptions::APIError.new(message: "#{app_env} navbar url was blank", response: response)
319
+ raise ZuoraConnect::Exceptions::APIError.new(message: "#{app_env} navbar url was blank", response: response)
320
320
  else
321
- begin
322
- task_ids = JSON.parse(Base64.urlsafe_decode64(CGI.parse(URI.parse(url).query)["app_instance_ids"][0]))
323
- rescue => ex
324
- raise ZuoraConnect::Exceptions::APIError.new(message: "Failure in parsing the navbar urls.", response: response)
321
+ query_params = CGI.parse(URI.parse(url).query)
322
+ app_instance_ids = query_params["app_instance_ids"][0]
323
+ if app_instance_ids.present?
324
+ begin
325
+ task_ids = JSON.parse(Base64.urlsafe_decode64(app_instance_ids))
326
+
327
+ appinstances = ZuoraConnect::AppInstance.where(:id => task_ids).pluck(:id, :name)
328
+ rescue => ex
329
+ raise ZuoraConnect::Exceptions::APIError.new(message: "Failure in parsing the navbar urls.", response: response)
330
+ end
325
331
  end
326
332
  end
327
- appinstances = ZuoraConnect::AppInstance.where(:id => task_ids).pluck(:id, :name)
328
- else
329
- appinstances = ZuoraConnect::AppInstance.where("zuora_entity_ids ?& array[:entities] = true AND zuora_domain = :host", entities: [zuora_entity_id], host: zuora_client.rest_domain).pluck(:id, :name)
333
+ appinstances ||= ZuoraConnect::AppInstance.where("zuora_entity_ids ?& array[:entities] = true AND zuora_domain = :host", entities: [zuora_entity_id], host: zuora_client.rest_domain).pluck(:id, :name)
330
334
  end
331
335
  end
332
336
 
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "2.0.57k"
2
+ VERSION = "2.0.57p"
3
3
  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.57k
4
+ version: 2.0.57p
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-04 00:00:00.000000000 Z
11
+ date: 2020-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apartment