zuora_connect 1.5.08 → 1.5.09

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: b8c4421617019a58af4d056b751a94a3eb5314dc
4
- data.tar.gz: 1452a2e43b7983f12fd2d7d3c668682586133a41
3
+ metadata.gz: dab9e81e61b63c3687c7a6dd85cd8da6974541e0
4
+ data.tar.gz: 27b01f8f1b1ba989cb9bf8aa874e7a9b979a3b8b
5
5
  SHA512:
6
- metadata.gz: 0e58fb1b1c736d561c6b323dc93c78dd3fe567aea984686b796e8336a67386b994d3263656fca8be64f50af3e1d30409cefcf2c3bbb790aab98bfdf2a6dd44af
7
- data.tar.gz: 5efb084ff28c4ec8f57f03b42371e1c6d0de8003da0323673ecd534a76d4370eb994ff03c042cdb774e271ae6f1d2cb1aec25afbccaf1c56bdb352b5f3b334f6
6
+ metadata.gz: 0f57bcb58793c060a1e19448df5bd092ad1a8a97414928507d3a27f193f0ab2dc46f79393947960e9c7b2f3d643e6ca969f1c7eafbed13dc4ba7300db519bc69
7
+ data.tar.gz: b6a60d886e6db9687f88ba5145990d66b3152046e0d5558b8fc7566b00ac3cbe896e2f9162db8199ebd6d168bfad91b9bd28ab4c1d99ada0224cf1f5480af69e
@@ -12,7 +12,7 @@ module ZuoraConnect
12
12
  self.attr_builder("timezone", ZuoraConnect.configuration.default_time_zone)
13
13
  self.attr_builder("locale", ZuoraConnect.configuration.default_locale)
14
14
  PaperTrail.whodunnit = "Backend" if defined?(PaperTrail)
15
- Apartment::Tenant.switch!(self.id)
15
+ Apartment::Tenant.switch!(self.id) if self.persisted?
16
16
  if(ActiveRecord::Migrator.needs_migration?)
17
17
  Apartment::Migrator.migrate(self.id)
18
18
  end
@@ -87,9 +87,9 @@ module ZuoraConnect
87
87
  @appinstance = ZuoraConnect::AppInstance.where(:id => values["appInstance"].to_i).first
88
88
  if @appinstance.blank?
89
89
  Apartment::Tenant.switch!("public")
90
+ Apartment::Tenant.create(values["appInstance"].to_s)
90
91
  @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"])
91
92
  @appinstance.save(:validate => false)
92
- Apartment::Tenant.create(values["appInstance"].to_s)
93
93
  end
94
94
  Rails.logger.debug("[#{@appinstance.id}] App Params: #{values.inspect}}") if Rails.env != "production"
95
95
  @appinstance.access_token = values["access_token"] if !values["access_token"].blank? && @appinstance.access_token != values["access_token"]
@@ -1,4 +1,4 @@
1
1
  module ZuoraConnect
2
- VERSION = "1.5.08"
2
+ VERSION = "1.5.09"
3
3
  end
4
4
 
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.5.08
4
+ version: 1.5.09
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-21 00:00:00.000000000 Z
11
+ date: 2018-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apartment