zuora_connect 2.0.5y → 2.0.5zj
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 +4 -4
- data/app/helpers/zuora_connect/application_helper.rb +10 -0
- data/app/models/zuora_connect/app_instance_base.rb +66 -56
- data/app/models/zuora_connect/telegraf.rb +2 -2
- data/app/views/zuora_connect/static/error_unhandled.erb +7 -1
- data/config/initializers/patches.rb +9 -0
- data/lib/middleware/json_parse_errors.rb +22 -0
- data/lib/middleware/request_id_middleware.rb +1 -1
- data/lib/zuora_connect.rb +12 -17
- data/lib/zuora_connect/controllers/helpers.rb +41 -25
- data/lib/zuora_connect/engine.rb +2 -1
- data/lib/zuora_connect/railtie.rb +3 -1
- data/lib/zuora_connect/version.rb +1 -1
- metadata +36 -49
- data/lib/zuora_connect/views/helpers.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f10b5356c58827088e546bfdfc7af921c9201dc2336eaaea93888c2fae6c4dfc
|
4
|
+
data.tar.gz: 95421312ce2d6db05906b94c0b9ff17086aa77096eebe85306bdbe90cbd410a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa67f91a130f7313c8bafb4ec2823dd1262cc87aa7b7c8540e55acb3ada8d0295f8e4915af87e95e119ec79184f62952d128c441648e8deff5e223629223865a
|
7
|
+
data.tar.gz: 5b0758681cebaded75aa9060b55a5470468e28d1e1e98956e533bab7c6db67ba96313e8195ff478720b4917bbaa987795b03df52fea9f80f781d4e919f22aa47
|
@@ -1,5 +1,15 @@
|
|
1
1
|
module ZuoraConnect
|
2
2
|
module ApplicationHelper
|
3
|
+
def is_app_admin?
|
4
|
+
return @appinstance.blank? ? false : session["#{@appinstance.id}::admin"]
|
5
|
+
end
|
3
6
|
|
7
|
+
def zuora_user
|
8
|
+
return @zuora_user
|
9
|
+
end
|
10
|
+
|
11
|
+
def connect_meta_tags
|
12
|
+
"<meta name=\"z-hallway-prefix\" content=\"#{ Thread.current[:isHallway] }\">".html_safe
|
13
|
+
end
|
4
14
|
end
|
5
15
|
end
|
@@ -89,7 +89,11 @@ module ZuoraConnect
|
|
89
89
|
Thread.current[:appinstance] = self
|
90
90
|
end
|
91
91
|
|
92
|
-
def
|
92
|
+
def default_ougai_items
|
93
|
+
return {app_instance_id: self.id}
|
94
|
+
end
|
95
|
+
|
96
|
+
def new_session(session: self.data_lookup, username: self.access_token, password: self.refresh_token, holding_pattern: false, **args)
|
93
97
|
self.api_version = "v2"
|
94
98
|
self.username = username
|
95
99
|
self.password = password
|
@@ -123,26 +127,26 @@ module ZuoraConnect
|
|
123
127
|
|
124
128
|
if session.empty?
|
125
129
|
self.new_session_message = "REFRESHING - Session Empty"
|
126
|
-
ZuoraConnect.logger.
|
130
|
+
ZuoraConnect.logger.debug(self.new_session_message, self.default_ougai_items)
|
127
131
|
raise ZuoraConnect::Exceptions::HoldingPattern if holding_pattern && !self.mark_for_refresh
|
128
132
|
self.refresh(session: session)
|
129
133
|
|
130
134
|
elsif (self.id != session["appInstance"].to_i)
|
131
135
|
self.new_session_message = "REFRESHING - AppInstance ID(#{self.id}) does not match session id(#{session["appInstance"].to_i})"
|
132
|
-
ZuoraConnect.logger.
|
136
|
+
ZuoraConnect.logger.debug(self.new_session_message, self.default_ougai_items)
|
133
137
|
raise ZuoraConnect::Exceptions::HoldingPattern if holding_pattern && !self.mark_for_refresh
|
134
138
|
self.refresh(session: session)
|
135
139
|
|
136
140
|
elsif session["#{self.id}::task_data"].blank?
|
137
141
|
self.new_session_message = "REFRESHING - Task Data Blank"
|
138
|
-
ZuoraConnect.logger.
|
142
|
+
ZuoraConnect.logger.debug(self.new_session_message, self.default_ougai_items)
|
139
143
|
raise ZuoraConnect::Exceptions::HoldingPattern if holding_pattern && !self.mark_for_refresh
|
140
144
|
self.refresh(session: session)
|
141
145
|
|
142
146
|
elsif session["#{self.id}::last_refresh"].blank?
|
143
147
|
self.new_session_message = "REFRESHING - No Time on Cookie"
|
144
148
|
recoverable_session = true
|
145
|
-
ZuoraConnect.logger.
|
149
|
+
ZuoraConnect.logger.debug(self.new_session_message, self.default_ougai_items)
|
146
150
|
raise ZuoraConnect::Exceptions::HoldingPattern if holding_pattern && !self.mark_for_refresh
|
147
151
|
self.refresh(session: session)
|
148
152
|
|
@@ -150,7 +154,7 @@ module ZuoraConnect
|
|
150
154
|
elsif (session["#{self.id}::last_refresh"].to_i < INSTANCE_REFRESH_WINDOW.ago.to_i) && self.mark_for_refresh
|
151
155
|
self.new_session_message = "REFRESHING - Session Old by #{time_expire.abs} second"
|
152
156
|
recoverable_session = true
|
153
|
-
ZuoraConnect.logger.
|
157
|
+
ZuoraConnect.logger.debug(self.new_session_message, self.default_ougai_items)
|
154
158
|
self.refresh(session: session)
|
155
159
|
|
156
160
|
else
|
@@ -159,14 +163,14 @@ module ZuoraConnect
|
|
159
163
|
else
|
160
164
|
self.new_session_message = "REBUILDING - Expires in #{time_expire} seconds"
|
161
165
|
end
|
162
|
-
ZuoraConnect.logger.
|
166
|
+
ZuoraConnect.logger.debug(self.new_session_message, self.default_ougai_items)
|
163
167
|
self.build_task(task_data: session["#{self.id}::task_data"], session: session)
|
164
168
|
end
|
165
169
|
end
|
166
170
|
return self
|
167
171
|
rescue ZuoraConnect::Exceptions::HoldingPattern => ex
|
168
172
|
while self.marked_for_refresh?
|
169
|
-
ZuoraConnect.logger.info("Holding - Expires in #{self.reset_mark_expires_at}. '#{self.new_session_message}'")
|
173
|
+
ZuoraConnect.logger.info("Holding - Expires in #{self.reset_mark_expires_at}. '#{self.new_session_message}'", self.default_ougai_items)
|
170
174
|
sleep(HOLDING_PATTERN_SLEEP)
|
171
175
|
end
|
172
176
|
self.reload_attributes([:refresh_token, :oauth_expires_at, :access_token])
|
@@ -174,10 +178,11 @@ module ZuoraConnect
|
|
174
178
|
retry
|
175
179
|
rescue => ex
|
176
180
|
if recoverable_session
|
177
|
-
ZuoraConnect.logger.warn("REBUILDING - Using backup expired cache")
|
181
|
+
ZuoraConnect.logger.warn("REBUILDING - Using backup expired cache", ex, self.default_ougai_items)
|
178
182
|
self.build_task(task_data: session["#{self.id}::task_data"], session: session)
|
179
183
|
return self
|
180
184
|
else
|
185
|
+
ZuoraConnect.logger.error("Failed new session", ex, self.default_ougai_items)
|
181
186
|
raise
|
182
187
|
end
|
183
188
|
ensure
|
@@ -187,21 +192,26 @@ module ZuoraConnect
|
|
187
192
|
ZuoraConnect.logger.error(ex) if !IGNORED_LOCALS.include?(ex.locale.to_s.downcase)
|
188
193
|
end
|
189
194
|
Time.zone = self.timezone
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
ElasticAPM
|
194
|
-
|
195
|
+
if self.task_data.present?
|
196
|
+
tenants = self.task_data.fetch('tenant_ids', [])
|
197
|
+
organizations = self.task_data.fetch('organizations', [])
|
198
|
+
if defined?(ElasticAPM) && ElasticAPM.running?
|
199
|
+
ElasticAPM.set_tag(:tenant_id, tenants.first)
|
200
|
+
ElasticAPM.set_tag(:organization, organizations.first)
|
201
|
+
end
|
202
|
+
self.logitem(item: {tenant_ids: tenants, organization: organizations})
|
203
|
+
|
204
|
+
params = {
|
205
|
+
:name => self.task_data.dig('name'),
|
206
|
+
:zuora_entity_ids => (self.task_data.dig(LOGIN_TENANT_DESTINATION,'entities') || []).map{|e| e['id']},
|
207
|
+
:zuora_tenant_ids => tenants.map(&:to_s),
|
208
|
+
}
|
209
|
+
zuora_domain = self.send(LOGIN_TENANT_DESTINATION).client.rest_domain
|
210
|
+
ZuoraConnect::RequestIdMiddleware.zuora_rest_domain = zuora_domain
|
211
|
+
params.merge!({:zuora_domain => zuora_domain }) if self.methods.include?(LOGIN_TENANT_DESTINATION.to_sym)
|
212
|
+
params = params.reject{|k,v| !self.attributes.keys.member?(k.to_s) || self[k] == v}
|
213
|
+
self.update_columns(params) if params.present?
|
195
214
|
end
|
196
|
-
self.logitem(item: {tenant_ids: tenants, organization: organizations})
|
197
|
-
params = {
|
198
|
-
:name => self.task_data.dig('name'),
|
199
|
-
:zuora_entity_ids => (self.task_data.dig(LOGIN_TENANT_DESTINATION,'entities') || []).map{|e| e['id']},
|
200
|
-
:zuora_tenant_ids => self.task_data.fetch('tenant_ids', []).map(&:to_s),
|
201
|
-
}
|
202
|
-
params.merge!({:zuora_domain => self.send(LOGIN_TENANT_DESTINATION).client.rest_domain })
|
203
|
-
params = params.reject{|k,v| !self.attributes.keys.member?(k.to_s) || self[k] == v}
|
204
|
-
self.update_columns(params) if params.present?
|
205
215
|
end
|
206
216
|
|
207
217
|
def refresh(session: {}, session_fallback: false)
|
@@ -212,41 +222,41 @@ module ZuoraConnect
|
|
212
222
|
response = HTTParty.get(ZuoraConnect.configuration.url + "/api/#{self.api_version}/tools/tasks/#{self.id}.json",:body => {:access_token => self.access_token})
|
213
223
|
response_time = Time.now - start
|
214
224
|
|
215
|
-
ZuoraConnect.logger.debug("
|
225
|
+
ZuoraConnect.logger.debug("REFRESH TASK - Connect Task Info Request Time #{response_time.round(2).to_s}", self.default_ougai_items)
|
216
226
|
if response.code == 200
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
227
|
+
begin
|
228
|
+
parsed_json = JSON.parse(response.body)
|
229
|
+
rescue JSON::ParserError => ex
|
230
|
+
raise ZuoraConnect::Exceptions::ConnectCommunicationError.new("JSON parse error", response.body, response.code)
|
231
|
+
end
|
232
|
+
self.build_task(task_data: parsed_json, session: session)
|
221
233
|
else
|
222
234
|
raise ZuoraConnect::Exceptions::ConnectCommunicationError.new("Error Communicating with Connect", response.body, response.code)
|
223
235
|
end
|
224
236
|
else
|
225
237
|
self.build_task(task_data: self.zuora_logins, session: session)
|
226
|
-
self.last_refresh = Time.now.to_i
|
227
|
-
self.cache_app_instance
|
228
|
-
self.reset_mark_for_refresh
|
229
238
|
end
|
230
|
-
|
239
|
+
self.last_refresh = Time.now.to_i
|
240
|
+
self.cache_app_instance
|
241
|
+
self.reset_mark_for_refresh
|
242
|
+
rescue *(ZuoraAPI::Login::CONNECTION_EXCEPTIONS + ZuoraAPI::Login::CONNECTION_READ_EXCEPTIONS) => ex
|
231
243
|
if (refresh_count += 1) < 3
|
232
244
|
sleep(30)
|
233
|
-
ZuoraConnect.logger.
|
245
|
+
ZuoraConnect.logger.debug("REFRESH TASK - Connection Failure Retrying(#{refresh_count})", ex, self.default_ougai_items)
|
234
246
|
retry
|
235
247
|
else
|
236
|
-
ZuoraConnect.logger.fatal("
|
248
|
+
ZuoraConnect.logger.fatal("REFRESH TASK - Connection Failed", ex, self.default_ougai_items)
|
237
249
|
raise
|
238
250
|
end
|
239
251
|
rescue ZuoraConnect::Exceptions::ConnectCommunicationError => ex
|
240
252
|
if (refresh_count += 1) < 3
|
253
|
+
ZuoraConnect.logger.debug("REFRESH TASK - Communication Failure Retrying(#{refresh_count})", ex, self.default_ougai_items)
|
241
254
|
if ex.code == 401
|
242
|
-
ZuoraConnect.logger.info("[#{self.id}] REFRESH TASK - Failed #{ex.code} - Retrying(#{refresh_count})")
|
243
255
|
self.refresh_oauth
|
244
|
-
else
|
245
|
-
ZuoraConnect.logger.warn("[#{self.id}] REFRESH TASK - Failed #{ex.code} - Retrying(#{refresh_count})")
|
246
256
|
end
|
247
257
|
retry
|
248
258
|
else
|
249
|
-
ZuoraConnect.logger.fatal("
|
259
|
+
ZuoraConnect.logger.fatal("REFRESH TASK - Communication Failed #{ex.code}", ex, self.default_ougai_items)
|
250
260
|
raise
|
251
261
|
end
|
252
262
|
end
|
@@ -434,7 +444,7 @@ module ZuoraConnect
|
|
434
444
|
else
|
435
445
|
raise ZuoraConnect::Exceptions::ConnectCommunicationError.new("Error Communicating with Connect", response.body, response.code)
|
436
446
|
end
|
437
|
-
rescue *(ZuoraAPI::Login::CONNECTION_EXCEPTIONS
|
447
|
+
rescue *(ZuoraAPI::Login::CONNECTION_EXCEPTIONS + ZuoraAPI::Login::CONNECTION_READ_EXCEPTIONS) => ex
|
438
448
|
if (update_login_count += 1) < 3
|
439
449
|
retry
|
440
450
|
else
|
@@ -462,7 +472,7 @@ module ZuoraConnect
|
|
462
472
|
else
|
463
473
|
raise ZuoraConnect::Exceptions::ConnectCommunicationError.new("Error Communicating with Connect", response.body, response.code)
|
464
474
|
end
|
465
|
-
rescue *(ZuoraAPI::Login::CONNECTION_EXCEPTIONS
|
475
|
+
rescue *(ZuoraAPI::Login::CONNECTION_EXCEPTIONS + ZuoraAPI::Login::CONNECTION_READ_EXCEPTIONS) => ex
|
466
476
|
if (update_task_count += 1) < 3
|
467
477
|
retry
|
468
478
|
else
|
@@ -484,7 +494,7 @@ module ZuoraConnect
|
|
484
494
|
def check_oauth_state(method)
|
485
495
|
#Refresh token if already expired
|
486
496
|
if self.oauth_expired?
|
487
|
-
ZuoraConnect.logger.debug("
|
497
|
+
ZuoraConnect.logger.debug("Before '#{method}' method, Oauth expired", self.default_ougai_items)
|
488
498
|
self.refresh_oauth
|
489
499
|
end
|
490
500
|
end
|
@@ -503,7 +513,7 @@ module ZuoraConnect
|
|
503
513
|
}
|
504
514
|
response = HTTParty.post("#{ZuoraConnect.configuration.url}/oauth/token",:body => params)
|
505
515
|
response_time = Time.now - start
|
506
|
-
ZuoraConnect.logger.debug("
|
516
|
+
ZuoraConnect.logger.debug("REFRESH OAUTH - In #{response_time.round(2).to_s}", self.default_ougai_items)
|
507
517
|
|
508
518
|
if response.code == 200
|
509
519
|
response_body = JSON.parse(response.body)
|
@@ -513,14 +523,15 @@ module ZuoraConnect
|
|
513
523
|
self.oauth_expires_at = Time.at(response_body["created_at"].to_i) + response_body["expires_in"].seconds
|
514
524
|
self.save(:validate => false)
|
515
525
|
else
|
516
|
-
raise ZuoraConnect::Exceptions::ConnectCommunicationError.new("Error Refreshing Access Token
|
526
|
+
raise ZuoraConnect::Exceptions::ConnectCommunicationError.new("Error Refreshing Access Token", response.body, response.code)
|
517
527
|
end
|
518
|
-
rescue *(ZuoraAPI::Login::CONNECTION_EXCEPTIONS
|
528
|
+
rescue *(ZuoraAPI::Login::CONNECTION_EXCEPTIONS + ZuoraAPI::Login::CONNECTION_READ_EXCEPTIONS) => ex
|
519
529
|
if (refresh_oauth_count += 1) < 3
|
520
|
-
|
530
|
+
sleep(5)
|
531
|
+
ZuoraConnect.logger.debug("REFRESH OAUTH - Connection Failure Retrying(#{refresh_oauth_count})", ex, self.default_ougai_items)
|
521
532
|
retry
|
522
533
|
else
|
523
|
-
ZuoraConnect.logger.fatal("
|
534
|
+
ZuoraConnect.logger.fatal("REFRESH OAUTH - Connection Failed", ex, self.default_ougai_items)
|
524
535
|
raise
|
525
536
|
end
|
526
537
|
rescue ZuoraConnect::Exceptions::ConnectCommunicationError => ex
|
@@ -531,10 +542,10 @@ module ZuoraConnect
|
|
531
542
|
return if !self.oauth_expired?
|
532
543
|
|
533
544
|
if (refresh_oauth_count += 1) < 3
|
534
|
-
ZuoraConnect.logger.
|
545
|
+
ZuoraConnect.logger.debug("REFRESH OAUTH - Communication Failure Retrying(#{refresh_oauth_count})", ex, self.default_ougai_items)
|
535
546
|
retry
|
536
547
|
else
|
537
|
-
ZuoraConnect.logger.fatal("
|
548
|
+
ZuoraConnect.logger.fatal("REFRESH OAUTH - Communication Failed #{ex.code}", ex, self.default_ougai_items)
|
538
549
|
raise
|
539
550
|
end
|
540
551
|
end
|
@@ -576,7 +587,7 @@ module ZuoraConnect
|
|
576
587
|
begin
|
577
588
|
redis_get_command ||= 0
|
578
589
|
cached_instance = Redis.current.get("AppInstance:#{self.id}")
|
579
|
-
rescue *(ZuoraAPI::Login::CONNECTION_EXCEPTIONS
|
590
|
+
rescue *(ZuoraAPI::Login::CONNECTION_EXCEPTIONS + ZuoraAPI::Login::CONNECTION_READ_EXCEPTIONS) => ex
|
580
591
|
if (redis_get_command += 1) < 3
|
581
592
|
retry
|
582
593
|
else
|
@@ -584,10 +595,10 @@ module ZuoraConnect
|
|
584
595
|
end
|
585
596
|
end
|
586
597
|
if cached_instance.blank?
|
587
|
-
ZuoraConnect.logger.debug("
|
598
|
+
ZuoraConnect.logger.debug("Cached AppInstance Missing", self.default_ougai_items)
|
588
599
|
return session
|
589
600
|
else
|
590
|
-
ZuoraConnect.logger.debug("
|
601
|
+
ZuoraConnect.logger.debug("Cached AppInstance Found", self.default_ougai_items)
|
591
602
|
return decrypt_data(data: cached_instance, rescue_return: session).merge(session)
|
592
603
|
end
|
593
604
|
else
|
@@ -599,7 +610,7 @@ module ZuoraConnect
|
|
599
610
|
if defined?(Redis.current)
|
600
611
|
#Task data must be present and the last refresh cannot be old. We dont want to overwite new cache data with old
|
601
612
|
if self.task_data.present? && (self.last_refresh.to_i > INSTANCE_REFRESH_WINDOW.ago.to_i)
|
602
|
-
ZuoraConnect.logger.debug("
|
613
|
+
ZuoraConnect.logger.debug("Caching AppInstance", self.default_ougai_items)
|
603
614
|
Redis.current.setex("AppInstance:#{self.id}", INSTANCE_REDIS_CACHE_PERIOD.to_i, self.encrypt_data(data: self.save_data))
|
604
615
|
end
|
605
616
|
end
|
@@ -660,9 +671,10 @@ module ZuoraConnect
|
|
660
671
|
begin
|
661
672
|
return JSON.parse(encryptor.decrypt_and_verify(CGI::unescape(data)))
|
662
673
|
rescue ActiveSupport::MessageVerifier::InvalidSignature => ex
|
663
|
-
ZuoraConnect.logger.
|
674
|
+
ZuoraConnect.logger.error("Error Decrypting", ex, self.default_ougai_items) if log_fatal
|
664
675
|
return rescue_return
|
665
676
|
rescue JSON::ParserError => ex
|
677
|
+
ZuoraConnect.logger.error("JSON Parse Error", ex, self.default_ougai_items) if log_fatal
|
666
678
|
return encryptor.decrypt_and_verify(CGI::unescape(data))
|
667
679
|
end
|
668
680
|
end
|
@@ -1029,9 +1041,7 @@ module ZuoraConnect
|
|
1029
1041
|
|
1030
1042
|
def method_missing(method_sym, *arguments, &block)
|
1031
1043
|
if method_sym.to_s.include?("login")
|
1032
|
-
ZuoraConnect.logger.fatal("Method Missing #{method_sym}")
|
1033
|
-
ZuoraConnect.logger.fatal("Instance Data: #{self.task_data}")
|
1034
|
-
ZuoraConnect.logger.fatal("Instance Logins: #{self.logins}")
|
1044
|
+
ZuoraConnect.logger.fatal("Method Missing #{method_sym}. Instance Data: #{self.task_data} Instance Logins: #{self.logins}", self.default_ougai_items)
|
1035
1045
|
end
|
1036
1046
|
super
|
1037
1047
|
end
|
@@ -19,7 +19,7 @@ module ZuoraConnect
|
|
19
19
|
end
|
20
20
|
rescue => ex
|
21
21
|
self.host = nil
|
22
|
-
ZuoraConnect.logger.warn(self.format_metric_log('Telegraf', "Failed to connect: #{ex.class}"))
|
22
|
+
ZuoraConnect.logger.warn(self.format_metric_log('Telegraf', "Failed to connect: #{ex.class}")) if Rails.env.to_s != 'production'
|
23
23
|
end
|
24
24
|
|
25
25
|
def write(direction: 'Unknown', tags: {}, values: {})
|
@@ -56,7 +56,7 @@ module ZuoraConnect
|
|
56
56
|
self.host.write InfluxDB::PointValue.new({series: series, tags: tags, values: values}).dump
|
57
57
|
rescue => ex
|
58
58
|
self.connect
|
59
|
-
ZuoraConnect.logger.warn(self.format_metric_log('Telegraf',"Failed to write udp: #{ex.class}"))
|
59
|
+
ZuoraConnect.logger.warn(self.format_metric_log('Telegraf',"Failed to write udp: #{ex.class}")) if Rails.env.to_s != 'production'
|
60
60
|
end
|
61
61
|
|
62
62
|
def format_metric_log(message, dump = nil)
|
@@ -59,8 +59,14 @@
|
|
59
59
|
<div class="dialog" style='max-width: 74em;'>
|
60
60
|
<div><h1><%= exception.class %> - '<%= exception.message %>'</h1></div>
|
61
61
|
<p style='text-align: left;'>
|
62
|
+
<% last_line = false %>
|
62
63
|
<% exception.backtrace.each do |line| %>
|
63
|
-
|
64
|
+
<% ending = last_line && !line.include?(Rails.root.to_s) ? false : true %>
|
65
|
+
<% break if !ending%>
|
66
|
+
<% if ending %>
|
67
|
+
<%= line %><br>
|
68
|
+
<% end %>
|
69
|
+
<% last_line = line.include?(Rails.root.to_s) %>
|
64
70
|
<% end %>
|
65
71
|
</p>
|
66
72
|
</div>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
#Used to ensure encode of UploadedFile for lograge does not dump entire file.
|
2
|
+
class ActionDispatch::Http::UploadedFile
|
3
|
+
def as_json(options = nil)
|
4
|
+
%w(headers).inject({}) do |hash, attr|
|
5
|
+
hash[attr] = send(attr).force_encoding('utf-8')
|
6
|
+
hash
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module ZuoraConnect
|
2
|
+
class JsonParseErrors
|
3
|
+
def initialize(app)
|
4
|
+
@app = app
|
5
|
+
end
|
6
|
+
|
7
|
+
def call(env)
|
8
|
+
begin
|
9
|
+
@app.call(env)
|
10
|
+
rescue ActionDispatch::ParamsParser::ParseError => error
|
11
|
+
if env['HTTP_ACCEPT'] =~ /application\/json/ || env['CONTENT_TYPE'] =~ /application\/json/
|
12
|
+
return [
|
13
|
+
400, { "Content-Type" => "application/json" },
|
14
|
+
[{"success": false, "reasons": [{"code": 50000090, "message": "Malformed json was submitted." }]}.to_json ]
|
15
|
+
]
|
16
|
+
else
|
17
|
+
raise error
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/zuora_connect.rb
CHANGED
@@ -2,7 +2,6 @@ require 'zuora_connect/configuration'
|
|
2
2
|
require "zuora_connect/engine"
|
3
3
|
require 'zuora_connect/exceptions'
|
4
4
|
require 'zuora_connect/controllers/helpers'
|
5
|
-
require 'zuora_connect/views/helpers'
|
6
5
|
require 'zuora_connect/railtie'
|
7
6
|
require 'resque/additions'
|
8
7
|
require 'resque/dynamic_queues'
|
@@ -25,7 +24,7 @@ module ZuoraConnect
|
|
25
24
|
else
|
26
25
|
@logger ||= custom_logger(name: "Connect", level: Rails.logger.level)
|
27
26
|
end
|
28
|
-
end
|
27
|
+
end
|
29
28
|
|
30
29
|
def custom_logger(name: "", level: Rails.logger.present? ? Rails.logger.level : MonoLogger::INFO, type: :ougai)
|
31
30
|
#puts name + ' - ' + {Logger::WARN => 'Logger::WARN', Logger::ERROR => 'Logger::ERROR', Logger::DEBUG => 'Logger::DEBUG', Logger::INFO => 'Logger::INFO' }[level] + ' - '
|
@@ -33,7 +32,7 @@ module ZuoraConnect
|
|
33
32
|
require 'ougai'
|
34
33
|
require "ougai/formatters/customizable"
|
35
34
|
#logger = Ougai::Logger.new(MonoLogger.new(STDOUT))
|
36
|
-
logger = Ougai::Logger.new(STDOUT)
|
35
|
+
logger = Ougai::Logger.new(STDOUT)
|
37
36
|
logger.level = level
|
38
37
|
if ZuoraConnect.configuration.json_logging
|
39
38
|
logger.formatter = Ougai::Formatters::ConnectFormatter.new(name)
|
@@ -41,8 +40,8 @@ module ZuoraConnect
|
|
41
40
|
data[:trace_id] = ZuoraConnect::RequestIdMiddleware.request_id if ZuoraConnect::RequestIdMiddleware.request_id.present?
|
42
41
|
data[:zuora_trace_id] = ZuoraConnect::RequestIdMiddleware.zuora_request_id if ZuoraConnect::RequestIdMiddleware.zuora_request_id.present?
|
43
42
|
#data[:traces] = {amazon_id: data[:trace_id], zuora_id: data[:zuora_trace_id]}
|
44
|
-
if !['ElasticAPM', 'ResqueScheduler', 'ResquePool', 'Resque', 'Makara'].include?(name)
|
45
|
-
if Thread.current[:appinstance].present?
|
43
|
+
if !['ElasticAPM', 'ResqueScheduler', 'ResquePool', 'Resque', 'Makara'].include?(name)
|
44
|
+
if Thread.current[:appinstance].present? && Thread.current[:appinstance].id.present?
|
46
45
|
data[:app_instance_id] = Thread.current[:appinstance].id
|
47
46
|
logitems = Thread.current[:appinstance].logitems
|
48
47
|
if logitems.present? && logitems.class == Hash
|
@@ -86,8 +85,8 @@ module ZuoraConnect
|
|
86
85
|
pid: Process.pid,
|
87
86
|
message: name == "ActionMailer" ? msg.strip : msg
|
88
87
|
}
|
89
|
-
if !['ElasticAPM', 'ResqueScheduler', 'ResquePool','Resque', 'Makara'].include?(name)
|
90
|
-
if Thread.current[:appinstance].present?
|
88
|
+
if !['ElasticAPM', 'ResqueScheduler', 'ResquePool','Resque', 'Makara'].include?(name)
|
89
|
+
if Thread.current[:appinstance].present? && Thread.current[:appinstance].id.present?
|
91
90
|
store[:app_instance_id] = Thread.current[:appinstance].id
|
92
91
|
logitems = Thread.current[:appinstance].logitems
|
93
92
|
if logitems.present? && logitems.class == Hash
|
@@ -103,17 +102,13 @@ module ZuoraConnect
|
|
103
102
|
end
|
104
103
|
end
|
105
104
|
return logger
|
106
|
-
end
|
105
|
+
end
|
107
106
|
end
|
108
107
|
|
109
108
|
module Controllers
|
110
109
|
autoload :Helpers, 'zuora_connect/controllers/helpers'
|
111
110
|
end
|
112
111
|
|
113
|
-
module Views
|
114
|
-
ActionView::Base.send(:include, Helpers)
|
115
|
-
end
|
116
|
-
|
117
112
|
def self.configuration
|
118
113
|
@configuration ||= Configuration.new
|
119
114
|
end
|
@@ -151,23 +146,23 @@ module ZuoraConnect
|
|
151
146
|
}
|
152
147
|
when 'test'
|
153
148
|
defaults = {
|
154
|
-
active: false,
|
149
|
+
active: false,
|
155
150
|
disable_send: true
|
156
151
|
}
|
157
152
|
end
|
158
153
|
|
159
154
|
defaults.merge!({
|
160
155
|
disable_start_message: true,
|
161
|
-
pool_size: 1,
|
162
|
-
transaction_max_spans: 500,
|
163
|
-
ignore_url_patterns: ['^\/admin\/resque.*', '^\/admin\/redis.*', '^\/admin\/peek.*', '^\/peek.*'],
|
156
|
+
pool_size: 1,
|
157
|
+
transaction_max_spans: 500,
|
158
|
+
ignore_url_patterns: ['^\/admin\/resque.*', '^\/admin\/redis.*', '^\/admin\/peek.*', '^\/peek.*'],
|
164
159
|
verify_server_cert: false,
|
165
160
|
log_level: Logger::INFO,
|
166
161
|
service_name: ENV['DEIS_APP'].present? ? ENV['DEIS_APP'] : Rails.application.class.parent_name,
|
167
162
|
logger: ZuoraConnect.custom_logger(name: "ElasticAPM", level: MonoLogger::WARN)
|
168
163
|
})
|
169
164
|
defaults.merge!({disable_send: true}) if defined?(Rails::Console)
|
170
|
-
|
165
|
+
|
171
166
|
return defaults
|
172
167
|
end
|
173
168
|
end
|
@@ -88,35 +88,46 @@ module ZuoraConnect
|
|
88
88
|
zuora_entity_id = request.headers['ZuoraCurrentEntity'] || cookies['ZuoraCurrentEntity']
|
89
89
|
|
90
90
|
if zuora_entity_id.present?
|
91
|
+
zuora_tenant_id = cookies['Zuora-Tenant-Id']
|
92
|
+
zuora_user_id = cookies['Zuora-User-Id']
|
91
93
|
zuora_host = request.headers["HTTP_X_FORWARDED_HOST"] || "apisandbox.zuora.com"
|
92
94
|
|
95
|
+
zuora_details = {'host' => zuora_host, 'user_id' => zuora_user_id, 'tenant_id' => zuora_tenant_id, 'entity_id' => zuora_entity_id}
|
96
|
+
|
97
|
+
#Do we need to refresh session identity
|
98
|
+
if request.headers["Zuora-Auth-Token"].present?
|
99
|
+
zuora_client = ZuoraAPI::Oauth.new(url: "https://#{zuora_host}", bearer_token: request.headers["Zuora-Auth-Token"], oauth_session_expires_at: Time.now + 5.minutes )
|
100
|
+
elsif cookies['ZSession'].present?
|
101
|
+
zuora_client = ZuoraAPI::Basic.new(url: "https://#{zuora_host}", session: cookies['ZSession'])
|
102
|
+
else
|
103
|
+
render "zuora_connect/static/error_handled", :locals => {
|
104
|
+
:title => "Missing Authorization Token",
|
105
|
+
:message => "Zuora 'Zuora-Auth-Token' header and 'ZSession' cookie not present."
|
106
|
+
}, :layout => false
|
107
|
+
return
|
108
|
+
end
|
109
|
+
|
93
110
|
begin
|
94
|
-
|
95
|
-
if request.headers["Zuora-Auth-Token"].present?
|
96
|
-
zuora_client = ZuoraAPI::Oauth.new(url: "https://#{zuora_host}", bearer_token: request.headers["Zuora-Auth-Token"], oauth_session_expires_at: Time.now + 5.minutes )
|
97
|
-
elsif cookies['ZSession'].present?
|
98
|
-
zuora_client = ZuoraAPI::Basic.new(url: "https://#{zuora_host}", session: cookies['ZSession'])
|
99
|
-
else
|
100
|
-
render "zuora_connect/static/error_handled", :locals => {
|
101
|
-
:title => "Missing Authorization Token",
|
102
|
-
:message => "Zuora 'Zuora-Auth-Token' header and 'ZSession' cookie not present."
|
103
|
-
}
|
104
|
-
return
|
105
|
-
end
|
106
|
-
zuora_instance_id = params[:sidebar_launch].to_bool ? nil : (params[:app_instance_id] || session["appInstance"])
|
111
|
+
zuora_instance_id = params[:sidebar_launch].to_s.to_bool ? nil : (params[:app_instance_id] || session["appInstance"])
|
107
112
|
|
108
113
|
#Identity blank or current entity different
|
109
|
-
|
114
|
+
different_zsession = session["ZSession"] != cookies['ZSession']
|
115
|
+
missmatched_entity = session["ZuoraCurrentEntity"] != zuora_entity_id
|
116
|
+
missing_identity = session["ZuoraCurrentIdentity"].blank?
|
117
|
+
|
118
|
+
if (missing_identity || missmatched_entity || different_zsession)
|
119
|
+
zuora_details.merge!({'identity' => {'different_zsession' => different_zsession, 'missing_identity' => missing_identity, 'missmatched_entity' => missmatched_entity}})
|
110
120
|
identity, response = zuora_client.rest_call(url: zuora_client.rest_endpoint("identity"))
|
111
121
|
session["ZuoraCurrentIdentity"] = identity
|
112
122
|
session["ZuoraCurrentEntity"] = identity['entityId']
|
113
123
|
session["ZSession"] = cookies['ZSession']
|
114
124
|
zuora_instance_id = nil
|
125
|
+
zuora_details["identity"]["entityId"] = identity['entityId']
|
115
126
|
|
116
127
|
client_describe, response = zuora_client.rest_call(url: zuora_client.rest_endpoint("genesis/user/info").gsub('v1/', ''), session_type: zuora_client.class == ZuoraAPI::Oauth ? :bearer : :basic, headers: zuora_client.class == ZuoraAPI::Oauth ? {} : {'Authorization' => "ZSession-a3N2w #{zuora_client.get_session(prefix: false, auth_type: :basic)}"})
|
117
128
|
session["ZuoraCurrentUserInfo"] = client_describe
|
118
129
|
|
119
|
-
raise ZuoraConnect::Exceptions::Error.new("Header entity id
|
130
|
+
raise ZuoraConnect::Exceptions::Error.new("Header entity id does not match identity call entity id.") if zuora_entity_id != identity['entityId']
|
120
131
|
end
|
121
132
|
|
122
133
|
#Find matching app instances.
|
@@ -165,7 +176,7 @@ module ZuoraConnect
|
|
165
176
|
#We have multiple, user must pick
|
166
177
|
elsif appinstances.size > 1
|
167
178
|
ZuoraConnect.logger.debug("User must select instance. #{@names}")
|
168
|
-
render "zuora_connect/static/launch", :locals => {:names => appinstances.to_h}
|
179
|
+
render "zuora_connect/static/launch", :locals => {:names => appinstances.to_h}, :layout => false
|
169
180
|
return
|
170
181
|
|
171
182
|
#We have no deployed instance for this tenant
|
@@ -177,7 +188,7 @@ module ZuoraConnect
|
|
177
188
|
render "zuora_connect/static/error_handled", :locals => {
|
178
189
|
:title => "Application can only complete its initial setup via platform administrator",
|
179
190
|
:message => "Please contact admin of tenant and have them click on link again to launch application."
|
180
|
-
}
|
191
|
+
}, :layout => false
|
181
192
|
return
|
182
193
|
end
|
183
194
|
Apartment::Tenant.switch!("public")
|
@@ -211,7 +222,7 @@ module ZuoraConnect
|
|
211
222
|
client_describe = session["ZuoraCurrentUserInfo"]
|
212
223
|
end
|
213
224
|
|
214
|
-
available_entities = client_describe["accessibleEntities"].select {|entity| entity['id'] ==
|
225
|
+
available_entities = client_describe["accessibleEntities"].select {|entity| entity['id'] == zuora_entity_id}
|
215
226
|
task_data = {
|
216
227
|
"id": next_id,
|
217
228
|
"name": client_describe["tenantName"],
|
@@ -227,7 +238,7 @@ module ZuoraConnect
|
|
227
238
|
"authentication_type": "OAUTH",
|
228
239
|
"entities": available_entities.map {|e| e.merge({'displayName' => client_describe["tenantName"]})}
|
229
240
|
},
|
230
|
-
"tenant_ids": available_entities.map{|e| e['entityId']
|
241
|
+
"tenant_ids": available_entities.map{|e| e['entityId']}.uniq,
|
231
242
|
}
|
232
243
|
mapped_values = {:id => next_id, :api_token => rand(36**64).to_s(36), :token => rand(36**64).to_s(36), :zuora_logins => task_data, :oauth_expires_at => Time.now + 1000.years, :zuora_domain => zuora_client.rest_domain, :zuora_entity_ids => [zuora_entity_id]}
|
233
244
|
@appinstance = ZuoraConnect::AppInstance.new(mapped_values)
|
@@ -244,7 +255,7 @@ module ZuoraConnect
|
|
244
255
|
render "zuora_connect/static/error_handled", :locals => {
|
245
256
|
:title => "Application could not create unique tokens.",
|
246
257
|
:message => "Please contact support or retry launching application."
|
247
|
-
}
|
258
|
+
}, :layout => false
|
248
259
|
return
|
249
260
|
end
|
250
261
|
end
|
@@ -261,12 +272,17 @@ module ZuoraConnect
|
|
261
272
|
end
|
262
273
|
|
263
274
|
rescue ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError => ex
|
275
|
+
output_xml, input_xml = zuora_client.soap_call(errors: [], z_session: false) do |xml|
|
276
|
+
xml['api'].getUserInfo
|
277
|
+
end
|
278
|
+
final_error = output_xml.xpath('//fns:FaultCode', 'fns' =>'http://fault.api.zuora.com/').text
|
264
279
|
session.clear
|
280
|
+
ZuoraConnect.logger.warn(ex, zuora: zuora_details.merge({:error => final_error}))
|
265
281
|
redirect_to "https://#{zuora_host}/apps/newlogin.do?retURL=#{request.fullpath}"
|
266
282
|
return
|
267
283
|
rescue => ex
|
268
|
-
ZuoraConnect.logger.error(ex)
|
269
|
-
render "zuora_connect/static/error_unhandled", :locals => {:exception => ex}
|
284
|
+
ZuoraConnect.logger.error(ex, zuora: zuora_details)
|
285
|
+
render "zuora_connect/static/error_unhandled", :locals => {:exception => ex}, :layout => false
|
270
286
|
return
|
271
287
|
end
|
272
288
|
elsif request["data"] && /^([A-Za-z0-9+\/\-\_]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{2}==)$/.match(request["data"].to_s)
|
@@ -278,7 +294,7 @@ module ZuoraConnect
|
|
278
294
|
render "zuora_connect/static/error_handled", :locals => {
|
279
295
|
:title => "Application state could not be verified",
|
280
296
|
:message => "Please relaunch application."
|
281
|
-
}
|
297
|
+
}, :layout => false
|
282
298
|
return
|
283
299
|
end
|
284
300
|
end
|
@@ -290,7 +306,7 @@ module ZuoraConnect
|
|
290
306
|
render "zuora_connect/static/error_handled", :locals => {
|
291
307
|
:title => "Application state could not be found.",
|
292
308
|
:message => "Please relaunch application."
|
293
|
-
}
|
309
|
+
}, :layout => false
|
294
310
|
return
|
295
311
|
end
|
296
312
|
#Call .data_lookup with the current session to retrieve session. In some cases session may be stored/cache in redis
|
@@ -384,7 +400,7 @@ module ZuoraConnect
|
|
384
400
|
if @appinstance.access_token_changed? && @appinstance.refresh_token_changed?
|
385
401
|
@appinstance.save(:validate => false)
|
386
402
|
else
|
387
|
-
raise ZuoraConnect::Exceptions::AccessDenied.new("Authorization
|
403
|
+
raise ZuoraConnect::Exceptions::AccessDenied.new("Authorization mismatch. Possible tampering")
|
388
404
|
end
|
389
405
|
end
|
390
406
|
end
|
data/lib/zuora_connect/engine.rb
CHANGED
@@ -12,7 +12,7 @@ module ZuoraConnect
|
|
12
12
|
Rails.application.routes.prepend do
|
13
13
|
mount ZuoraConnect::Engine, at: "/connect"
|
14
14
|
match '/api/connect/health', via: :all, to: 'zuora_connect/static#health'
|
15
|
-
match '/api/connect/internal/data', via: :all, to: 'zuora_connect/static#metrics'
|
15
|
+
match '/api/connect/internal/data', via: :all, to: 'zuora_connect/static#metrics'
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
@@ -27,6 +27,7 @@ module ZuoraConnect
|
|
27
27
|
initializer "connect.helpers" do
|
28
28
|
ActiveSupport.on_load(:action_controller) do
|
29
29
|
include ZuoraConnect::Controllers::Helpers
|
30
|
+
helper ZuoraConnect::ApplicationHelper
|
30
31
|
end
|
31
32
|
end
|
32
33
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'middleware/metrics_middleware'
|
2
2
|
require 'middleware/request_id_middleware'
|
3
|
+
require 'middleware/json_parse_errors'
|
3
4
|
|
4
5
|
module ZuoraConnect
|
5
6
|
class Railtie < Rails::Railtie
|
@@ -25,6 +26,7 @@ module ZuoraConnect
|
|
25
26
|
initializer "zuora_connect.configure_rails_initialization" do |app|
|
26
27
|
app.middleware.insert_after Rack::Sendfile, ZuoraConnect::MetricsMiddleware
|
27
28
|
app.middleware.insert_after ActionDispatch::RequestId, ZuoraConnect::RequestIdMiddleware
|
29
|
+
app.config.middleware.use ZuoraConnect::JsonParseErrors
|
28
30
|
end
|
29
31
|
|
30
32
|
# hook to process_action
|
@@ -52,7 +54,7 @@ module ZuoraConnect
|
|
52
54
|
exceptions = %w(controller action format id)
|
53
55
|
items = {
|
54
56
|
#time: event.time.strftime('%FT%T.%6N'),
|
55
|
-
params: event.payload[:params].except
|
57
|
+
params: event.payload[:params].as_json(except: exceptions).to_json.to_s
|
56
58
|
}
|
57
59
|
items.merge!({exception_object: event.payload[:exception_object]}) if event.payload[:exception_object].present?
|
58
60
|
items.merge!({exception: event.payload[:exception]}) if event.payload[:exception].present?
|
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.
|
4
|
+
version: 2.0.5zj
|
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-
|
11
|
+
date: 2019-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apartment
|
@@ -58,20 +58,20 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.7.00
|
62
62
|
- - "~>"
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 1.
|
64
|
+
version: 1.7.00
|
65
65
|
type: :runtime
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - ">="
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version: 1.
|
71
|
+
version: 1.7.00
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 1.
|
74
|
+
version: 1.7.00
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: httparty
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,20 +92,6 @@ dependencies:
|
|
92
92
|
- - "~>"
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: 0.16.4
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: bundler
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
requirements:
|
99
|
-
- - "~>"
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '1.12'
|
102
|
-
type: :runtime
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
requirements:
|
106
|
-
- - "~>"
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: '1.12'
|
109
95
|
- !ruby/object:Gem::Dependency
|
110
96
|
name: lograge
|
111
97
|
requirement: !ruby/object:Gem::Requirement
|
@@ -328,6 +314,7 @@ files:
|
|
328
314
|
- config/initializers/apartment.rb
|
329
315
|
- config/initializers/aws.rb
|
330
316
|
- config/initializers/object_method_hooks.rb
|
317
|
+
- config/initializers/patches.rb
|
331
318
|
- config/initializers/postgresql_adapter.rb
|
332
319
|
- config/initializers/prometheus.rb
|
333
320
|
- config/initializers/redis.rb
|
@@ -351,6 +338,7 @@ files:
|
|
351
338
|
- lib/logging/connect_formatter.rb
|
352
339
|
- lib/metrics/influx/point_value.rb
|
353
340
|
- lib/metrics/net.rb
|
341
|
+
- lib/middleware/json_parse_errors.rb
|
354
342
|
- lib/middleware/metrics_middleware.rb
|
355
343
|
- lib/middleware/request_id_middleware.rb
|
356
344
|
- lib/resque/additions.rb
|
@@ -366,7 +354,6 @@ files:
|
|
366
354
|
- lib/zuora_connect/exceptions.rb
|
367
355
|
- lib/zuora_connect/railtie.rb
|
368
356
|
- lib/zuora_connect/version.rb
|
369
|
-
- lib/zuora_connect/views/helpers.rb
|
370
357
|
- test/controllers/zuora_connect/api/v1/app_instance_controller_test.rb
|
371
358
|
- test/dummy/README.rdoc
|
372
359
|
- test/dummy/Rakefile
|
@@ -431,44 +418,44 @@ signing_key:
|
|
431
418
|
specification_version: 4
|
432
419
|
summary: Summary of Connect.
|
433
420
|
test_files:
|
434
|
-
- test/lib/generators/zuora_connect/datatable_generator_test.rb
|
435
421
|
- test/integration/navigation_test.rb
|
436
|
-
- test/test_helper.rb
|
437
|
-
- test/models/zuora_connect/app_instance_test.rb
|
438
|
-
- test/fixtures/zuora_connect/app_instances.yml
|
439
422
|
- test/controllers/zuora_connect/api/v1/app_instance_controller_test.rb
|
440
|
-
- test/
|
441
|
-
- test/dummy/
|
442
|
-
- test/dummy/
|
423
|
+
- test/fixtures/zuora_connect/app_instances.yml
|
424
|
+
- test/dummy/app/controllers/application_controller.rb
|
425
|
+
- test/dummy/app/views/layouts/application.html.erb
|
443
426
|
- test/dummy/app/assets/stylesheets/application.css
|
444
427
|
- test/dummy/app/assets/javascripts/application.js
|
445
|
-
- test/dummy/app/controllers/application_controller.rb
|
446
428
|
- test/dummy/app/helpers/application_helper.rb
|
447
|
-
- test/dummy/
|
448
|
-
- test/dummy/
|
429
|
+
- test/dummy/bin/setup
|
430
|
+
- test/dummy/bin/bundle
|
431
|
+
- test/dummy/bin/rake
|
432
|
+
- test/dummy/bin/rails
|
433
|
+
- test/dummy/config/routes.rb
|
434
|
+
- test/dummy/config/environment.rb
|
435
|
+
- test/dummy/config/application.rb
|
436
|
+
- test/dummy/config/boot.rb
|
437
|
+
- test/dummy/config/database.yml
|
449
438
|
- test/dummy/config/environments/production.rb
|
450
439
|
- test/dummy/config/environments/development.rb
|
451
|
-
- test/dummy/config/
|
452
|
-
- test/dummy/config/
|
453
|
-
- test/dummy/config/
|
454
|
-
- test/dummy/config/initializers/
|
455
|
-
- test/dummy/config/initializers/mime_types.rb
|
440
|
+
- test/dummy/config/environments/test.rb
|
441
|
+
- test/dummy/config/secrets.yml
|
442
|
+
- test/dummy/config/locales/en.yml
|
443
|
+
- test/dummy/config/initializers/inflections.rb
|
456
444
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
445
|
+
- test/dummy/config/initializers/mime_types.rb
|
457
446
|
- test/dummy/config/initializers/filter_parameter_logging.rb
|
447
|
+
- test/dummy/config/initializers/assets.rb
|
448
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
458
449
|
- test/dummy/config/initializers/session_store.rb
|
459
450
|
- test/dummy/config/initializers/wrap_parameters.rb
|
460
|
-
- test/dummy/config/initializers/inflections.rb
|
461
|
-
- test/dummy/config/locales/en.yml
|
462
|
-
- test/dummy/config/environment.rb
|
463
|
-
- test/dummy/config/application.rb
|
464
|
-
- test/dummy/config/boot.rb
|
465
|
-
- test/dummy/config/secrets.yml
|
466
|
-
- test/dummy/bin/setup
|
467
|
-
- test/dummy/bin/rails
|
468
|
-
- test/dummy/bin/bundle
|
469
|
-
- test/dummy/bin/rake
|
470
|
-
- test/dummy/config.ru
|
471
|
-
- test/dummy/public/422.html
|
472
|
-
- test/dummy/public/500.html
|
473
451
|
- test/dummy/public/favicon.ico
|
452
|
+
- test/dummy/public/500.html
|
474
453
|
- test/dummy/public/404.html
|
454
|
+
- test/dummy/public/422.html
|
455
|
+
- test/dummy/Rakefile
|
456
|
+
- test/dummy/README.rdoc
|
457
|
+
- test/dummy/config.ru
|
458
|
+
- test/lib/generators/zuora_connect/datatable_generator_test.rb
|
459
|
+
- test/test_helper.rb
|
460
|
+
- test/zuora_connect_test.rb
|
461
|
+
- test/models/zuora_connect/app_instance_test.rb
|