zuora_connect 2.0.57l → 2.0.57q

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: 97962e636b5c230c4575bce48a28de8a0c80e44794863b27e663736013f4693e
4
- data.tar.gz: 6af68f301220898a4b4c52b6cdf793ca7b956bee5c77019d53a7eb8bf79b0791
3
+ metadata.gz: c995e980fc49090f445c00d1983f0beff9659d1bad0cce9e4614d049f9ca2d54
4
+ data.tar.gz: 4a8c8d1b677c670b2d85556285483ec6e8bfaec5a2b43c8d1f2464c840ea9d57
5
5
  SHA512:
6
- metadata.gz: 59ef73c6afc140eee13418a6cf9b7a2b0343f74346e57334512af25111c0a2c4e950c0eae517b44235e7e7b440cf5feee87c9a2126e57d01c9bc114fea0491eb
7
- data.tar.gz: 7d94fabce0bd79d30598632922b4637fdf67cd88e2232d968a79b67f61fa2c977d75d95d79d1a6d0a531ee5ae721968ae54047a457806584b97b77f32277d770
6
+ metadata.gz: 29326ffff3c7c8c7407b1f8c8ac17688112c141f99faa93a58df4bf33f40ebbee48d29a00f6db702309691d77e1f31aa3662dfd5364dc857beb3ba76f2c3c911
7
+ data.tar.gz: 2740a87852d216d2e954de4573b45b098ecbcaf53fb28cf77683ed449e24e28c553e9e4aab47ee18a6fc7d62457ae8178b65371e9b052b48418b330c8dc28eaf
@@ -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, self.default_ougai_items.merge({app_instance_id_new: self.task_data['id']}))
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
@@ -1128,7 +1128,7 @@ module ZuoraConnect
1128
1128
  JOIN pg_class t ON l.relation = t.oid AND t.relkind = 'r'
1129
1129
  WHERE t.relname = '#{aggregate_name}' AND l.mode ='AccessExclusiveLock';
1130
1130
  eos
1131
- return if sql_result.count > 0
1131
+ raise ZuoraConnect::Exceptions::Error.new("An existing lock detected while dropping table '#{aggregate_name}'") if sql_result.count > 0
1132
1132
 
1133
1133
  if index_table
1134
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(',')])
@@ -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.57l"
2
+ VERSION = "2.0.57q"
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.57l
4
+ version: 2.0.57q
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