zuora_connect 2.0.5o → 2.0.5p

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
  SHA256:
3
- metadata.gz: fc863a7790b198409e596d13c305f83756afc4b9efd22b220177f552f4017381
4
- data.tar.gz: b1cc4f5f84b5248cbfd6493d5ec4cf98053b6ff820b01bce3157bc9f203e9986
3
+ metadata.gz: 6fcd3261006fd6d36a06fe1528c53dc1eaeff482589943f82931f660a188bc59
4
+ data.tar.gz: 877292f064f221c3c779e262050d3c77fcaa64f59d944a247e13aa68ac9218ed
5
5
  SHA512:
6
- metadata.gz: 221a44341e2820a4dd16e6758090b448f5215fa2cf96d333d3e895d07c0e8fe1b357d997174afd42b3ae3966a5a54d7fe6d38660d27f94d56455784a7e7d41ca
7
- data.tar.gz: bf34d4cf4f39cae009c1701fee3bdaedb5901a521aaf924b705c152b5ff9aa84c6bee85f758c54bbc7d7839853f8acda48100bcfabb624f61507a8193d576db3
6
+ metadata.gz: acc1460b1ff720d381660f4447a6931dfeead161e2b48005732b64b2422dd226926196f72ff226aa1c2d69852f8b2a59ae4df00538b32942893497309d7186f1
7
+ data.tar.gz: 54b3ee18a7bc3f1f9f2f4fb3c27415a65b51b49c4cf908c98a2f56e85b04fdc03142f9364f8ee3030df50e474aadd8658654613e4d53c24779ab5257da391487
@@ -196,13 +196,14 @@ module ZuoraConnect
196
196
  }
197
197
  return
198
198
  end
199
-
199
+
200
200
  ActiveRecord::Base.transaction do
201
201
  ActiveRecord::Base.connection.execute('LOCK public.zuora_users IN ACCESS EXCLUSIVE MODE')
202
+ next_id = (ZuoraConnect::AppInstance.all.where(:access_token => nil).order(id: :desc).limit(1).pluck(:id).first || 24999999) + 1
202
203
 
203
204
  appinstances = ZuoraConnect::AppInstance.where("zuora_entity_ids ?& array[:entities] = true AND zuora_domain = :host", entities: [zuora_entity_id], host: zuora_client.rest_domain).pluck(:id, :name)
204
205
  if appinstances.size > 0
205
- ZuoraConnect.logger.warn("Double tenant create for '#{zuora_client.rest_domain}' - 'zuora_entity_id'")
206
+ ZuoraConnect.logger.warn("Double tenant create for '#{zuora_client.rest_domain}' - '#{zuora_entity_id}'")
206
207
  redirect_to "https://#{zuora_host}/apps/newlogin.do?retURL=#{CGI.escape(request.fullpath)}"
207
208
  return
208
209
  end
@@ -228,7 +229,6 @@ module ZuoraConnect
228
229
  end
229
230
 
230
231
  Apartment::Tenant.switch!("public")
231
- next_id = (ZuoraConnect::AppInstance.all.where(:access_token => nil).order(id: :desc).limit(1).pluck(:id).first || 24999999) + 1
232
232
  begin
233
233
  Apartment::Tenant.create(next_id.to_s)
234
234
  rescue Apartment::TenantExists => ex
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "2.0.5o"
2
+ VERSION = "2.0.5p"
3
3
  end
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: 2.0.5o
4
+ version: 2.0.5p
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team