zuora_connect 2.0.23 → 2.0.24
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 +4 -4
- data/app/models/zuora_connect/app_instance_base.rb +16 -6
- data/app/views/zuora_connect/static/error_handled.js.erb +1 -0
- data/app/views/zuora_connect/static/error_unhandled.js.erb +1 -0
- data/lib/zuora_connect/controllers/helpers.rb +1 -0
- data/lib/zuora_connect/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c7cc57c4693daf6ecf48b5453dc251a35b88f2332678b0bfd81bef41c1a82a5
|
4
|
+
data.tar.gz: cb8f3b2f46ec90ecb549d066d4d0495a920805ce6aef6e823fd8c4b2ea120c82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42a71c84a1bd3405a05c6bce8eeac0a4b15447286d714dec543a104f1e32e24caacde2f6dd199f717bd2c9ceb8e53fed80ceeae29f3255f61a56a84b519b46c8
|
7
|
+
data.tar.gz: c5564ce1bf21a8ca495fa2819131d1f22f89a80632d20629e3978c17be2b71a56588db6b51b3165bf271c7925cb4a22049c382a42131c717846c866aa5a33dd7
|
@@ -3,7 +3,7 @@ module ZuoraConnect
|
|
3
3
|
class AppInstanceBase < ActiveRecord::Base
|
4
4
|
default_scope {select(ZuoraConnect::AppInstance.column_names.delete_if {|x| ["catalog_mapping", "catalog"].include?(x) }) }
|
5
5
|
after_initialize :init
|
6
|
-
after_create :
|
6
|
+
after_create :initialize_redis_placeholders
|
7
7
|
before_destroy :prune_data
|
8
8
|
|
9
9
|
self.table_name = "zuora_connect_app_instances"
|
@@ -45,15 +45,25 @@ module ZuoraConnect
|
|
45
45
|
self.apartment_switch(nil, false)
|
46
46
|
end
|
47
47
|
|
48
|
-
def
|
48
|
+
def initialize_redis_placeholders
|
49
49
|
if defined?(Redis.current)
|
50
|
-
Redis.current.
|
51
|
-
|
52
|
-
|
50
|
+
unless Redis.current.zscore("AppInstance:Deleted", "placeholder").present? # O(1)
|
51
|
+
Redis.current.zadd("AppInstance:Deleted", 9_999_999_999, "placeholder") # O(log(N))
|
52
|
+
end
|
53
|
+
Redis.current.zrem("AppInstance:Deleted", self.id) if self.id.present? # O(log(N))
|
54
|
+
unless Redis.current.zscore("APILimits", "placeholder").present? # O(1)
|
55
|
+
Redis.current.zadd("APILimits", 9_999_999_999, "placeholder") # O(log(N))
|
56
|
+
end
|
57
|
+
unless Redis.current.zscore("InstanceRefreshing", "placeholder").present? # O(1)
|
58
|
+
Redis.current.zadd("InstanceRefreshing", 9_999_999_999, "placeholder") # O(log(N))
|
59
|
+
end
|
53
60
|
end
|
54
61
|
if defined?(Resque.redis)
|
55
|
-
Resque.redis.
|
62
|
+
unless Resque.redis.zscore("PauseQueue", "placeholder").present? # O(1)
|
63
|
+
Resque.redis.zadd("PauseQueue", 9_999_999_999, "placeholder") # O(log(N))
|
64
|
+
end
|
56
65
|
end
|
66
|
+
true
|
57
67
|
end
|
58
68
|
|
59
69
|
def prune_data
|
@@ -0,0 +1 @@
|
|
1
|
+
$('body').html('<%= escape_javascript render(:file=> "zuora_connect/static/error_handled", :formats => [:html], :locals => local_assigns, :layout => false) %>');
|
@@ -0,0 +1 @@
|
|
1
|
+
$('body').html('<%= escape_javascript render(:file=> "zuora_connect/static/error_unhandled", :formats => [:html], :locals => local_assigns, :layout => false) %>');
|
@@ -191,6 +191,7 @@ module ZuoraConnect
|
|
191
191
|
@zuora_user = ZuoraConnect::ZuoraUser.create!(:zuora_user_id => zuora_user_id, :zuora_identity_response => {zuora_entity_id => session["ZuoraCurrentIdentity"]})
|
192
192
|
end
|
193
193
|
@zuora_user.session = session
|
194
|
+
session["#{@appinstance.id}::user::localUserId"] = @zuora_user.id
|
194
195
|
session["#{@appinstance.id}::user::email"] = session['ZuoraCurrentIdentity']["username"]
|
195
196
|
session["#{@appinstance.id}::user::timezone"] = session['ZuoraCurrentIdentity']["timeZone"]
|
196
197
|
session["#{@appinstance.id}::user::locale"] = session['ZuoraCurrentIdentity']["language"]
|
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.24
|
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-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apartment
|
@@ -309,7 +309,9 @@ files:
|
|
309
309
|
- app/views/layouts/zuora_connect/application.html.erb
|
310
310
|
- app/views/sql/refresh_aggregate_table.txt
|
311
311
|
- app/views/zuora_connect/static/error_handled.html.erb
|
312
|
+
- app/views/zuora_connect/static/error_handled.js.erb
|
312
313
|
- app/views/zuora_connect/static/error_unhandled.erb
|
314
|
+
- app/views/zuora_connect/static/error_unhandled.js.erb
|
313
315
|
- app/views/zuora_connect/static/launch.html.erb
|
314
316
|
- config/initializers/apartment.rb
|
315
317
|
- config/initializers/aws.rb
|