zuora_connect 2.0.57j → 2.0.57o

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: 20a3be40ccdd0ae006685145eb4d5500389fc6cf220402bfb93072cffb911a41
4
- data.tar.gz: 9821553b9795ea6ac6d73cebabb38d881c72dc6f845af86aa5e704def9e36b55
3
+ metadata.gz: 1692b9f860fffa7a5803c1b8b350ff8993776c1429f38856003e2e26616bd3f2
4
+ data.tar.gz: e27e7374bf7bb8702bd91d6a56192a52d57972b97bbfa1190215b2dc621a7d4e
5
5
  SHA512:
6
- metadata.gz: 65c1c86d4dc83c3de5c9791dd2f1b688015c300111b2521f0c3f7bc4f52b4115c3bf13c9a5ff477c90734171f204df6b24966524d78d0a11aa8a21036ecf253a
7
- data.tar.gz: a9675847a52ef1b26027a57f87a680a87755175ecf48ce929ae9cc7a4e740f7d090ff88dd07364f69e9ea8173a3cb0db58c1188b79cefbce6a41833711c9853c
6
+ metadata.gz: 163c992e5c65874e64319b125844372caef0f47f6bfa97d7b4c7f20ad1b51892caebf094e37b03c6dbececb1457891fd2a699ce3334ee09faef7fd917a5544eb
7
+ data.tar.gz: 01bb8be466e1bfe9d4ce25627ef0046fd4f6ebb1bf4136edb847ca95f8f2d34b41a9feb16cb859c9f421c589f5f6afbf79ddd2ec2654ff4147c06711af32353e
@@ -4,12 +4,31 @@ window.define = previousDefine;
4
4
  if (isHallway()) {
5
5
  $( document ).ajaxError(function( event, jqxhr, settings, thrownError ) {
6
6
  if ( jqxhr.status === 401) {
7
- window.location.href = '/apps/newlogin.do?retURL=' + window.location.pathname;
7
+ fetch("https://" + window.location.host + "/apps/v1/navigation").then(response => {
8
+ if (response.status === 401) {
9
+ deleteAllCookies();
10
+ window.location.href = '/apps/newlogin.do?retURL=' + window.location.pathname;
11
+ }
12
+ });
8
13
  }
9
14
  });
10
15
  }
11
16
 
12
17
  function isHallway() {
13
- var regex = new RegExp("^/services/");
14
- 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;
23
+ }
24
+
25
+ function deleteAllCookies() {
26
+ var cookies = document.cookie.split(";");
27
+
28
+ for (var i = 0; i < cookies.length; i++) {
29
+ var cookie = cookies[i];
30
+ var eqPos = cookie.indexOf("=");
31
+ var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
32
+ document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/";
33
+ }
15
34
  }
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "2.0.57j"
2
+ VERSION = "2.0.57o"
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.57j
4
+ version: 2.0.57o
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-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apartment