zuora_connect 1.7.48 → 1.7.49

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
  SHA1:
3
- metadata.gz: 8bb1f8d6499a308efa66b990015f4b10453c760e
4
- data.tar.gz: a7e9cabe2bb0b986e5104086eae63d988e000145
3
+ metadata.gz: 0e23bf43dc29f991d80c01698004e8c19147d094
4
+ data.tar.gz: 393e843cb3485d79125e9df1d58016d283268ff1
5
5
  SHA512:
6
- metadata.gz: 36e66ca58962de314cd04a3d5748201e0b2777d84532384d53e2dc81307b518484875acce06a52d600778fc344aada8f728122ba6e4af4ef6fc30f20d346ab2a
7
- data.tar.gz: 20a898ae8cc91d6ad4394487e7ce04f7e0fc3729eaa81539d2d45d4f1046ec45f4170769db57445da142fa79012b3d5b0ffdcc6e9189af5b87da6c9928b779c9
6
+ metadata.gz: a493ff49c48657366ad7100952bea90c715c380a86de982e72eb41130ef12103a5e7e0ffdea443902ddc113d98f5c02d7c66e725a2ef269dabf843746aac2673
7
+ data.tar.gz: 52b63f5504eb4f9e34fb634db4ed65d8132553eb3b010e77bc1d7d835e66ed2d669f443526064fc9dd873a394b72ddbc5f7b53e97b1cc075edb3824121325ee9
@@ -3,6 +3,8 @@ 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 :initialize_redis_placeholder
7
+
6
8
  self.table_name = "zuora_connect_app_instances"
7
9
  attr_accessor :options, :mode, :logins, :task_data, :last_refresh, :username, :password, :s3_client, :api_version, :drop_message, :new_session_message, :connect_user, :logitems
8
10
  @@telegraf_host = nil
@@ -34,6 +36,13 @@ module ZuoraConnect
34
36
  self.apartment_switch(nil, false)
35
37
  end
36
38
 
39
+ def initialize_redis_placeholder
40
+ if defined?(Redis.current)
41
+ Redis.current.zadd("APILimits", 9999999999, "placeholder")
42
+ Resque.redis.zadd("PauseQueue", 9999999999, "placeholder")
43
+ end
44
+ end
45
+
37
46
  def apartment_switch(method = nil, migrate = false)
38
47
  begin
39
48
  Apartment::Tenant.switch!(self.id) if self.persisted?
@@ -10,9 +10,9 @@ module Middleware
10
10
  return nil if ["css", "assets", "jpg", "png", "jpeg", "ico"].any? { |word| payload[:path].include?(word) }
11
11
 
12
12
  # Getting the endpoint and the content_type
13
- content_hash = {:html => "text/html", :js => "application/javascript", :json => "application/json"}
13
+ content_hash = {:html => "text/html", :js => "application/javascript", :json => "application/json", :csv => "text/csv"}
14
14
  content_type = content_hash.key?(payload[:format]) ? content_hash[payload[:format]] : payload[:format]
15
- content_type = content_type.gsub('text/javascript', 'application/javascript')
15
+ content_type = content_type.to_s.gsub('text/javascript', 'application/javascript')
16
16
 
17
17
  # payloads with 500 requests do not have status as it is not set by the controller
18
18
  # https://github.com/rails/rails/issues/33335
@@ -61,7 +61,6 @@ module Middleware
61
61
  #Remove bad headers
62
62
  @bad_headers.each { |header| env.delete(header) }
63
63
 
64
-
65
64
  #Thread.current[:appinstance] = nil
66
65
  start_time = Time.now
67
66
  @status, @headers, @response = @app.call(env)
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "1.7.48"
2
+ VERSION = "1.7.49"
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: 1.7.48
4
+ version: 1.7.49
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-01-07 00:00:00.000000000 Z
11
+ date: 2019-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apartment