zuora_connect 1.5.23 → 1.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71f26dbc2d646d5d5fb8a059700292ecafb56dfe
4
- data.tar.gz: 1e01c18a085a10abf9469a611041cd767fa0c935
3
+ metadata.gz: 873531c1e1a0ae9a98c9f2672ac90aa0a7cd561d
4
+ data.tar.gz: 1da07b0be89e1888411ab3011c90cb94a0467487
5
5
  SHA512:
6
- metadata.gz: e86f49f9ebe78495c73dc7a5d1c7608e76ecec8b4648d5e9fb3efdd68dd874d1fa7bc987ad3c9dbb3dcc7d54149317f7af9b54125622bc6851018b158e8241fd
7
- data.tar.gz: fd0260f9e853e8c8304194308fd9d79553e81016294f7d78ce64440c6c46a84009b124877de269bc3ab469077c6d5085b887da383a6ec0dad220862fe65b50d4
6
+ metadata.gz: b10f5dbd90b63fdc703fa19e993f84f6ca2d715543cd0028851b6c4e2dfb0db9e01b43159900aec541ca7620c9954fc6097b85a7a7c4f3ea19182080027ea5e8
7
+ data.tar.gz: 207b2491c88663a3159df8bbb2c07034b95ec80fcabec90a545e11b11b390155191d5b33c46257662ccf9dda6358a16c59de3b9e5058d15e6dd326968fc5f6a6
@@ -25,6 +25,7 @@ module ZuoraConnect
25
25
 
26
26
  def authenticate_connect_app_request
27
27
  start_time = Time.now
28
+
28
29
  if ZuoraConnect.configuration.mode == "Production"
29
30
  if request["data"]
30
31
  setup_instance_via_data
@@ -36,7 +37,9 @@ module ZuoraConnect
36
37
  end
37
38
  #Call .data_lookup with the current session to retrieve session. In some cases session may be stored/cache in redis
38
39
  #so data lookup provides a model method that can be overriden per app.
39
- @appinstance.new_session(:session => @appinstance.data_lookup(:session => session))
40
+ if params[:controller] != 'zuora_connect/api/v1/app_instance' && params[:action] != 'drop'
41
+ @appinstance.new_session(:session => @appinstance.data_lookup(:session => session))
42
+ end
40
43
  PaperTrail.whodunnit = session["#{@appinstance.id}::user::email"] if defined?(PaperTrail) && session["#{@appinstance.id}::user::email"].present?
41
44
  begin
42
45
  I18n.locale = session["#{@appinstance.id}::user::locale"] ? session["#{@appinstance.id}::user::locale"] : @appinstance.locale
@@ -95,7 +98,7 @@ module ZuoraConnect
95
98
  @appinstance = ZuoraConnect::AppInstance.new(:api_token => values[:api_token],:id => values["appInstance"].to_i, :access_token => values["access_token"].blank? ? values["user"] : values["access_token"], :token => values["refresh_token"] , :refresh_token => values["refresh_token"].blank? ? values["key"] : values["refresh_token"], :oauth_expires_at => values["expires"])
96
99
  @appinstance.save(:validate => false)
97
100
  end
98
- Rails.logger.debug("[#{@appinstance.id}] App Params: #{values.inspect}}") if Rails.env != "production"
101
+ Rails.logger.debug("[#{@appinstance.id}] App Params: #{values.to_json}}") if Rails.env != "production"
99
102
  @appinstance.access_token = values["access_token"] if !values["access_token"].blank? && @appinstance.access_token != values["access_token"]
100
103
  @appinstance.refresh_token = values["refresh_token"] if !values["refresh_token"].blank? && @appinstance.refresh_token != values["refresh_token"]
101
104
  @appinstance.oauth_expires_at = values["expires"] if !values["expires"].blank?
@@ -1,4 +1,4 @@
1
1
  module ZuoraConnect
2
- VERSION = "1.5.23"
2
+ VERSION = "1.5.24"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.23
4
+ version: 1.5.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team