zuora_connect 2.0.22 → 2.0.23
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: 26827913e7bac0f80cbd685cd734d68a135b774e7db4a2f7feb5584a319f5f43
|
4
|
+
data.tar.gz: cc9031915d27d5429ff4108237ee01d76d1d8f6b4b831dfe21d3bdeabaf9d3fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c30531aa3bde05acf61c252fb98395d47cbabb93182a4fd54c611fd3ee3affbe90da2089d63875b4c67605f30f9f88b5bee1ccd23f89c84b6a0feabb1e01cb5d
|
7
|
+
data.tar.gz: 49f27a50fc5e76f9c365030ef3513c3b71602e8032048dbfb8de533f8a78125133cb47f68e6cb8045297544ae32d0874d09229da4e5438ada87b320098ec245f
|
@@ -56,15 +56,15 @@ module ZuoraConnect
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
def prune_data
|
59
|
+
def prune_data
|
60
60
|
if defined?(Redis.current)
|
61
|
-
Redis.current.zadd("AppInstance:Deleted", Time.now.to_i, id)
|
62
|
-
Redis.current.del("AppInstance:#{id}")
|
63
|
-
Redis.current.zrem("APILimits", id)
|
64
|
-
Redis.current.zrem("InstanceRefreshing", id)
|
61
|
+
Redis.current.zadd("AppInstance:Deleted", Time.now.to_i, self.id)
|
62
|
+
Redis.current.del("AppInstance:#{self.id}")
|
63
|
+
Redis.current.zrem("APILimits", self.id)
|
64
|
+
Redis.current.zrem("InstanceRefreshing", self.id)
|
65
65
|
end
|
66
66
|
if defined?(Resque.redis)
|
67
|
-
Resque.redis.zrem("PauseQueue", id)
|
67
|
+
Resque.redis.zrem("PauseQueue", self.id)
|
68
68
|
end
|
69
69
|
return true
|
70
70
|
end
|
@@ -467,7 +467,7 @@ module ZuoraConnect
|
|
467
467
|
end
|
468
468
|
return parsed_json
|
469
469
|
elsif response.code == 400
|
470
|
-
raise ZuoraConnect::Exceptions::APIError.new(message: parsed_json['errors'].join(' '), response: response
|
470
|
+
raise ZuoraConnect::Exceptions::APIError.new(message: parsed_json['errors'].join(' '), response: response)
|
471
471
|
else
|
472
472
|
raise ZuoraConnect::Exceptions::ConnectCommunicationError.new("Error Communicating with Connect", response.body, response.code)
|
473
473
|
end
|
@@ -495,7 +495,7 @@ module ZuoraConnect
|
|
495
495
|
if response.code == 200
|
496
496
|
return parsed_json
|
497
497
|
elsif response.code == 400
|
498
|
-
raise ZuoraConnect::Exceptions::APIError.new(message: parsed_json['errors'].join(' '), response: response
|
498
|
+
raise ZuoraConnect::Exceptions::APIError.new(message: parsed_json['errors'].join(' '), response: response)
|
499
499
|
else
|
500
500
|
raise ZuoraConnect::Exceptions::ConnectCommunicationError.new("Error Communicating with Connect", response.body, response.code)
|
501
501
|
end
|
@@ -151,8 +151,11 @@ module ZuoraConnect
|
|
151
151
|
urls = navbar['menus'].map {|x| x['url']}
|
152
152
|
app_env = ENV["DEIS_APP"] || "xyz123"
|
153
153
|
url = urls.compact.select {|url| File.basename(url).start_with?(app_env + '?')}.first
|
154
|
-
|
155
|
-
|
154
|
+
begin
|
155
|
+
task_ids = JSON.parse(Base64.urlsafe_decode64(CGI.parse(URI.parse(url).query)["app_instance_ids"][0]))
|
156
|
+
rescue URI::InvalidURIError => ex
|
157
|
+
raise ZuoraConnect::Exceptions::APIError.new(message: "Failure in parsing the navbar urls.", response: response)
|
158
|
+
end
|
156
159
|
appinstances = ZuoraConnect::AppInstance.where(:id => task_ids).pluck(:id, :name)
|
157
160
|
else
|
158
161
|
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)
|
@@ -305,7 +308,10 @@ module ZuoraConnect
|
|
305
308
|
redirect_to "https://#{zuora_host}/apps/newlogin.do?retURL=#{request.fullpath}"
|
306
309
|
return
|
307
310
|
rescue => ex
|
308
|
-
|
311
|
+
if defined?(ex.response) && ex.response.present? && defined?(ex.response.body)
|
312
|
+
zuora_details.merge!({:error => ex.response.body})
|
313
|
+
end
|
314
|
+
ZuoraConnect.logger.error("UI Authorization Error", ex, zuora: zuora_details)
|
309
315
|
render "zuora_connect/static/error_unhandled", :locals => {:exception => ex}, :layout => false
|
310
316
|
return
|
311
317
|
end
|
@@ -39,8 +39,8 @@ module ZuoraConnect
|
|
39
39
|
attr_reader :code, :response
|
40
40
|
attr_writer :default_message
|
41
41
|
|
42
|
-
def initialize(message: nil,response: nil
|
43
|
-
@code = code
|
42
|
+
def initialize(message: nil, response: nil)
|
43
|
+
@code = response.class.to_s == "HTTParty::Response" ? response.code : nil
|
44
44
|
@message = message
|
45
45
|
@response = response
|
46
46
|
@default_message = "Connect update error."
|
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.23
|
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-01-
|
11
|
+
date: 2020-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apartment
|