zuora_connect 2.0.3n → 2.0.4

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: 249b45dad8bcae3a41b5cfd3ccf353cb14239895bdb746f78af84b93563fc145
4
- data.tar.gz: 9254e0a3c6d6e35f6ba67ba461b9add117bde9a0006d0536d970592b83d98394
3
+ metadata.gz: 0036a863fdcab9663fe7c5e322487c2d57690afb2f9674983bf5a05034a6b0d2
4
+ data.tar.gz: dc021892bf77eb1577717801b9a4bd78b646d2d57bcf863e4737d3c046196157
5
5
  SHA512:
6
- metadata.gz: f071164961f83af7ffe372c7c7bb6828c997dfc5d9e3c236e788e78cc11a886162ce7b3d36bc0b65de2f21de86150d544278ae9a493873ba57141fe42645d787
7
- data.tar.gz: 47e362d8e5a032f370cee07065cf77d96ef33c897ccfb938f90ce37418ea5e9d4baadd090d5357cce353d8799565487f055fcaef6ebfa408a382580e06b4b6c6
6
+ metadata.gz: 04cebaa2ac44d3d125d43c1b4c3712779464432531e5f8717b71a88b43e951beb36222d2ac697473a791fac7d4538c773e5be9dccb12fd56c3ee3698a09df008
7
+ data.tar.gz: 2f258b08852d6dc9f2b144d7d3813436d820998005b07bb496d5ec53f3a613e4b2444683ae6d7d0c61dbfe59c5495fc89a3d2cc954e137084e0e0197e705580c
@@ -207,7 +207,7 @@ module ZuoraConnect
207
207
  def refresh(session: {}, session_fallback: false)
208
208
  refresh_count ||= 0
209
209
  #Check how app was deployed
210
- if self.id < 24999999
210
+ if !self.zuora_logins.present?
211
211
  start = Time.now
212
212
  response = HTTParty.get(ZuoraConnect.configuration.url + "/api/#{self.api_version}/tools/tasks/#{self.id}.json",:body => {:access_token => self.access_token})
213
213
  response_time = Time.now - start
@@ -67,9 +67,6 @@
67
67
  <div class="dialog">
68
68
  <div>
69
69
  <h1>Please select the instance you would like to launch.</h1>
70
- <input type="hidden" id="name_hash" value="<%= @names.to_s %>" />
71
- <input type="hidden" id="app_instance_list" value="<%= @app_instance_ids.to_s %>" />
72
-
73
70
  <% names.each do |id, name| %>
74
71
  <div class="launch_button" >
75
72
  <% label = name.present? ? "#{id} - #{name}" : id %>
@@ -123,21 +123,21 @@ module ZuoraConnect
123
123
  ZuoraConnect.logger.debug("Instance is #{appinstances.to_h.keys.first}")
124
124
 
125
125
  #Add user/update
126
- user = ZuoraConnect::ZuoraUser.where(:zuora_user_id => zuora_user_id).first
127
- if user.present?
126
+ @user = ZuoraConnect::ZuoraUser.where(:zuora_user_id => zuora_user_id).first
127
+ if @user.present?
128
128
  ZuoraConnect.logger.debug("Current zuora user #{zuora_user_id}")
129
- if user.updated_at < Time.now - 1.day
130
- user.zuora_identity_response[zuora_entity_id] = session["ZuoraCurrentIdentity"]
131
- user.save!
129
+ if @user.updated_at < Time.now - 1.day
130
+ @user.zuora_identity_response[zuora_entity_id] = session["ZuoraCurrentIdentity"]
131
+ @user.save!
132
132
  end
133
133
  else
134
134
  ZuoraConnect.logger.debug("New zuora user object for #{zuora_user_id}")
135
- user = ZuoraConnect::ZuoraUser.create!(:zuora_user_id => zuora_user_id, :zuora_identity_response => {zuora_entity_id => session["ZuoraCurrentIdentity"]})
135
+ @user = ZuoraConnect::ZuoraUser.create!(:zuora_user_id => zuora_user_id, :zuora_identity_response => {zuora_entity_id => session["ZuoraCurrentIdentity"]})
136
136
  end
137
137
  #Update access if admin in tenant
138
- if session["ZuoraCurrentIdentity"]['platformRole'] == 'ADMIN' && !user.app_permissions['access'].to_bool
139
- user.app_permissions['access'] = true
140
- user.save!
138
+ if session["ZuoraCurrentIdentity"]['platformRole'] == 'ADMIN' && !@user.app_permissions['access'].to_bool
139
+ @user.app_permissions['access'] = true
140
+ @user.save!
141
141
  end
142
142
 
143
143
  #If user has has access to application
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "2.0.3n"
2
+ VERSION = "2.0.4"
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: 2.0.3n
4
+ version: 2.0.4
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-05-31 00:00:00.000000000 Z
11
+ date: 2019-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apartment
@@ -409,9 +409,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
409
409
  version: '0'
410
410
  required_rubygems_version: !ruby/object:Gem::Requirement
411
411
  requirements:
412
- - - ">"
412
+ - - ">="
413
413
  - !ruby/object:Gem::Version
414
- version: 1.3.1
414
+ version: '0'
415
415
  requirements: []
416
416
  rubygems_version: 3.0.3
417
417
  signing_key: