zuora_connect 1.7.71 → 1.7.72
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/controllers/zuora_connect/static_controller.rb +4 -4
- data/app/models/zuora_connect/app_instance_base.rb +16 -0
- data/lib/resque/plugins/custom_logger.rb +8 -10
- data/lib/zuora_connect/engine.rb +5 -0
- data/lib/zuora_connect/railtie.rb +1 -1
- data/lib/zuora_connect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adcddb7481d74a2062c90b8b531d4a51bad3deb5
|
4
|
+
data.tar.gz: 0940099da903472e0e0ad50169b7e8b12e52f244
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 891ff63e7f62f72b7138a6427ab7a2564e74b000ece20fdc54be61859bc69c7badfe4a24e76909c9ec0c52640cde85116dc0706851f54fd734524c3c4bf8744a
|
7
|
+
data.tar.gz: b89436c38d9717aa765f249fba4e2aa5e39ef9aab95f826023958fe16ca1420b9648128d5ddca7019c728c5a1079e314eec6f65a1a682868ddd96f4c4e1d09e5
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module ZuoraConnect
|
2
2
|
class StaticController < ApplicationController
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
before_action :authenticate_connect_app_request, :except => [:metrics, :health, :session_error, :invalid_app_instance_error, :initialize_app]
|
4
|
+
before_action :clear_connect_app_session, :only => [:metrics, :health, :session_error, :invalid_app_instance_error, :initialize_app]
|
5
|
+
after_action :persist_connect_app_session, :except => [:metrics, :health, :session_error, :invalid_app_instance_error, :initialize_app]
|
6
6
|
|
7
|
-
|
7
|
+
skip_before_action :verify_authenticity_token, :only => [:initialize_app]
|
8
8
|
|
9
9
|
def session_error
|
10
10
|
respond_to do |format|
|
@@ -4,6 +4,7 @@ module ZuoraConnect
|
|
4
4
|
default_scope {select(ZuoraConnect::AppInstance.column_names.delete_if {|x| ["catalog_mapping", "catalog"].include?(x) }) }
|
5
5
|
after_initialize :init
|
6
6
|
after_create :initialize_redis_placeholder
|
7
|
+
before_destroy :prune_data_class
|
7
8
|
|
8
9
|
self.table_name = "zuora_connect_app_instances"
|
9
10
|
attr_accessor :options, :mode, :logins, :task_data, :last_refresh, :username, :password, :s3_client, :api_version, :drop_message, :new_session_message, :connect_user, :logitems
|
@@ -47,6 +48,21 @@ module ZuoraConnect
|
|
47
48
|
end
|
48
49
|
end
|
49
50
|
|
51
|
+
def prune_data_class
|
52
|
+
self.class.prune_data(id: self.id)
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.prune_data(id: nil)
|
56
|
+
if defined?(Redis.current)
|
57
|
+
Redis.current.del("AppInstance:#{id}")
|
58
|
+
Redis.current.zrem("APILimits", id)
|
59
|
+
Redis.current.zrem("InstanceRefreshing", id)
|
60
|
+
end
|
61
|
+
if defined?(Resque.redis)
|
62
|
+
Resque.redis.zrem("PauseQueue", 9999999999, id)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
50
66
|
def apartment_switch(method = nil, migrate = false)
|
51
67
|
begin
|
52
68
|
Apartment::Tenant.switch!(self.id) if self.persisted?
|
@@ -3,17 +3,10 @@
|
|
3
3
|
#
|
4
4
|
# Monologger supports printing logs in trap block.
|
5
5
|
#
|
6
|
-
# Usage:
|
7
|
-
# require 'resque/plugins/custom_logger'
|
8
|
-
# class ExecuteWorkflowJob
|
9
|
-
# extend Resque::Plugins::CustomLogger
|
10
|
-
# ...
|
11
|
-
# end
|
12
|
-
|
13
6
|
module Resque
|
14
7
|
module Plugins
|
15
8
|
module CustomLogger
|
16
|
-
def before_perform(args
|
9
|
+
def before_perform(*args)
|
17
10
|
marker = SecureRandom.uuid
|
18
11
|
|
19
12
|
logger = MonoLogger.new(STDOUT)
|
@@ -36,8 +29,13 @@ module Resque
|
|
36
29
|
|
37
30
|
Resque.logger = logger
|
38
31
|
Rails.logger = logger
|
39
|
-
|
40
|
-
|
32
|
+
case args.class
|
33
|
+
when Array
|
34
|
+
data = {:worker_class => self.to_s, :args => args}
|
35
|
+
when Hash
|
36
|
+
data = args.merge({:worker_class => self.to_s})
|
37
|
+
end
|
38
|
+
Rails.logger.info(data.to_json) if data.present?
|
41
39
|
end
|
42
40
|
end
|
43
41
|
end
|
data/lib/zuora_connect/engine.rb
CHANGED
@@ -28,5 +28,10 @@ module ZuoraConnect
|
|
28
28
|
include ZuoraConnect::Controllers::Helpers
|
29
29
|
end
|
30
30
|
end
|
31
|
+
|
32
|
+
initializer :append_migrations do |app|
|
33
|
+
next if app.root.to_s.start_with?(root.to_s) # only run when called from other apps
|
34
|
+
app.config.paths['db/migrate'].concat(config.paths['db/migrate'].expanded)
|
35
|
+
end
|
31
36
|
end
|
32
37
|
end
|
@@ -29,7 +29,7 @@ module ZuoraConnect
|
|
29
29
|
ActiveSupport::Notifications.subscribe('process_action.action_controller', Middleware::PageRequest.new)
|
30
30
|
|
31
31
|
initializer(:rails_stdout_logging, before: :initialize_logger) do
|
32
|
-
if Rails.env != 'development' && !ENV['DEIS_APP'].blank?
|
32
|
+
if true || Rails.env != 'development' && !ENV['DEIS_APP'].blank?
|
33
33
|
require 'lograge'
|
34
34
|
logger = ActiveSupport::Logger.new(STDOUT)
|
35
35
|
logger.formatter = ::Logger::Formatter.new
|
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: 1.7.
|
4
|
+
version: 1.7.72
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connect Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apartment
|