zuora_connect 2.0.5 → 2.0.8

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.
@@ -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,19 +26,22 @@ 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
31
33
  ActiveSupport::Notifications.subscribe('process_action.action_controller', ZuoraConnect::PageRequest.new)
32
34
 
33
35
  initializer(:rails_stdout_logging, before: :initialize_logger) do
34
- if Rails.env != 'development' && !ENV['DEIS_APP'].blank?
35
- require 'lograge'
36
-
37
- Rails.configuration.logger = ZuoraConnect.custom_logger(name: "Rails")
38
-
36
+ require 'lograge'
37
+
38
+ Rails.configuration.logger = ZuoraConnect.custom_logger(name: "Rails")
39
+ if Rails.env != 'development'
39
40
  Rails.configuration.lograge.enabled = true
40
41
  Rails.configuration.colorize_logging = false
42
+ end
43
+
44
+ if Rails.configuration.lograge.enabled
41
45
  if Rails.configuration.logger.class.to_s == 'Ougai::Logger'
42
46
  Rails.configuration.lograge.formatter = Class.new do |fmt|
43
47
  def fmt.call(data)
@@ -50,7 +54,7 @@ module ZuoraConnect
50
54
  exceptions = %w(controller action format id)
51
55
  items = {
52
56
  #time: event.time.strftime('%FT%T.%6N'),
53
- params: event.payload[:params].except(*exceptions).to_json.to_s
57
+ params: event.payload[:params].as_json(except: exceptions).to_json.to_s
54
58
  }
55
59
  items.merge!({exception_object: event.payload[:exception_object]}) if event.payload[:exception_object].present?
56
60
  items.merge!({exception: event.payload[:exception]}) if event.payload[:exception].present?
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "2.0.5"
2
+ VERSION = "2.0.8"
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.5
4
+ version: 2.0.8
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-06-01 00:00:00.000000000 Z
11
+ date: 2019-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apartment
@@ -39,59 +39,59 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: zuora_api
42
+ name: ougai-formatters-customizable
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 1.6.43
48
- - - "~>"
49
- - !ruby/object:Gem::Version
50
- version: 1.6.43
47
+ version: '0'
51
48
  type: :runtime
52
49
  prerelease: false
53
50
  version_requirements: !ruby/object:Gem::Requirement
54
51
  requirements:
55
52
  - - ">="
56
53
  - !ruby/object:Gem::Version
57
- version: 1.6.43
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: 1.6.43
54
+ version: '0'
61
55
  - !ruby/object:Gem::Dependency
62
- name: httparty
56
+ name: zuora_api
63
57
  requirement: !ruby/object:Gem::Requirement
64
58
  requirements:
65
59
  - - ">="
66
60
  - !ruby/object:Gem::Version
67
- version: 0.16.4
61
+ version: 1.7.00
68
62
  - - "~>"
69
63
  - !ruby/object:Gem::Version
70
- version: 0.16.4
64
+ version: 1.7.00
71
65
  type: :runtime
72
66
  prerelease: false
73
67
  version_requirements: !ruby/object:Gem::Requirement
74
68
  requirements:
75
69
  - - ">="
76
70
  - !ruby/object:Gem::Version
77
- version: 0.16.4
71
+ version: 1.7.00
78
72
  - - "~>"
79
73
  - !ruby/object:Gem::Version
80
- version: 0.16.4
74
+ version: 1.7.00
81
75
  - !ruby/object:Gem::Dependency
82
- name: bundler
76
+ name: httparty
83
77
  requirement: !ruby/object:Gem::Requirement
84
78
  requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: 0.16.4
85
82
  - - "~>"
86
83
  - !ruby/object:Gem::Version
87
- version: '1.12'
84
+ version: 0.16.4
88
85
  type: :runtime
89
86
  prerelease: false
90
87
  version_requirements: !ruby/object:Gem::Requirement
91
88
  requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: 0.16.4
92
92
  - - "~>"
93
93
  - !ruby/object:Gem::Version
94
- version: '1.12'
94
+ version: 0.16.4
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: lograge
97
97
  requirement: !ruby/object:Gem::Requirement
@@ -308,14 +308,13 @@ files:
308
308
  - app/models/zuora_connect/zuora_user.rb
309
309
  - app/views/layouts/zuora_connect/application.html.erb
310
310
  - app/views/sql/refresh_aggregate_table.txt
311
- - app/views/zuora_connect/static/invalid_app_instance_error.html.erb
312
- - app/views/zuora_connect/static/invalid_launch_request.html.erb
311
+ - app/views/zuora_connect/static/error_handled.html.erb
312
+ - app/views/zuora_connect/static/error_unhandled.erb
313
313
  - app/views/zuora_connect/static/launch.html.erb
314
- - app/views/zuora_connect/static/permission_error.html.erb
315
- - app/views/zuora_connect/static/session_error.html.erb
316
314
  - config/initializers/apartment.rb
317
315
  - config/initializers/aws.rb
318
316
  - config/initializers/object_method_hooks.rb
317
+ - config/initializers/patches.rb
319
318
  - config/initializers/postgresql_adapter.rb
320
319
  - config/initializers/prometheus.rb
321
320
  - config/initializers/redis.rb
@@ -335,9 +334,11 @@ files:
335
334
  - db/migrate/20180301052853_add_catalog_attempted_at.rb
336
335
  - db/migrate/20181206162339_add_fields_to_instance.rb
337
336
  - db/migrate/20190520232221_add_zuora_user_table_and_alter_app_instance_id_table.rb
337
+ - db/migrate/20190520232222_add_unique_index.rb
338
338
  - lib/logging/connect_formatter.rb
339
339
  - lib/metrics/influx/point_value.rb
340
340
  - lib/metrics/net.rb
341
+ - lib/middleware/json_parse_errors.rb
341
342
  - lib/middleware/metrics_middleware.rb
342
343
  - lib/middleware/request_id_middleware.rb
343
344
  - lib/resque/additions.rb
@@ -353,7 +354,6 @@ files:
353
354
  - lib/zuora_connect/exceptions.rb
354
355
  - lib/zuora_connect/railtie.rb
355
356
  - lib/zuora_connect/version.rb
356
- - lib/zuora_connect/views/helpers.rb
357
357
  - test/controllers/zuora_connect/api/v1/app_instance_controller_test.rb
358
358
  - test/dummy/README.rdoc
359
359
  - test/dummy/Rakefile
@@ -418,44 +418,44 @@ signing_key:
418
418
  specification_version: 4
419
419
  summary: Summary of Connect.
420
420
  test_files:
421
- - test/lib/generators/zuora_connect/datatable_generator_test.rb
422
421
  - test/integration/navigation_test.rb
423
- - test/test_helper.rb
424
- - test/models/zuora_connect/app_instance_test.rb
425
- - test/fixtures/zuora_connect/app_instances.yml
426
422
  - test/controllers/zuora_connect/api/v1/app_instance_controller_test.rb
427
- - test/zuora_connect_test.rb
428
- - test/dummy/README.rdoc
429
- - test/dummy/Rakefile
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
430
426
  - test/dummy/app/assets/stylesheets/application.css
431
427
  - test/dummy/app/assets/javascripts/application.js
432
- - test/dummy/app/controllers/application_controller.rb
433
428
  - test/dummy/app/helpers/application_helper.rb
434
- - test/dummy/app/views/layouts/application.html.erb
435
- - test/dummy/config/environments/test.rb
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
436
438
  - test/dummy/config/environments/production.rb
437
439
  - test/dummy/config/environments/development.rb
438
- - test/dummy/config/database.yml
439
- - test/dummy/config/routes.rb
440
- - test/dummy/config/initializers/assets.rb
441
- - test/dummy/config/initializers/cookies_serializer.rb
442
- - 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
443
444
  - test/dummy/config/initializers/backtrace_silencers.rb
445
+ - test/dummy/config/initializers/mime_types.rb
444
446
  - test/dummy/config/initializers/filter_parameter_logging.rb
447
+ - test/dummy/config/initializers/assets.rb
448
+ - test/dummy/config/initializers/cookies_serializer.rb
445
449
  - test/dummy/config/initializers/session_store.rb
446
450
  - test/dummy/config/initializers/wrap_parameters.rb
447
- - test/dummy/config/initializers/inflections.rb
448
- - test/dummy/config/locales/en.yml
449
- - test/dummy/config/environment.rb
450
- - test/dummy/config/application.rb
451
- - test/dummy/config/boot.rb
452
- - test/dummy/config/secrets.yml
453
- - test/dummy/bin/setup
454
- - test/dummy/bin/rails
455
- - test/dummy/bin/bundle
456
- - test/dummy/bin/rake
457
- - test/dummy/config.ru
458
- - test/dummy/public/422.html
459
- - test/dummy/public/500.html
460
451
  - test/dummy/public/favicon.ico
452
+ - test/dummy/public/500.html
461
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
@@ -1,65 +0,0 @@
1
- <html><head>
2
- <title>We're sorry, but something went wrong</title>
3
- <meta name="viewport" content="width=device-width,initial-scale=1">
4
- <style>
5
- body {
6
- background-color: #EFEFEF;
7
- color: #2E2F30;
8
- text-align: center;
9
- font-family: arial, sans-serif;
10
- margin: 0;
11
- }
12
-
13
- div.dialog {
14
- width: 95%;
15
- max-width: 33em;
16
- margin: 4em auto 0;
17
- }
18
-
19
- div.dialog > div {
20
- border: 1px solid #CCC;
21
- border-right-color: #999;
22
- border-left-color: #999;
23
- border-bottom-color: #BBB;
24
- border-top: #B00100 solid 4px;
25
- border-top-left-radius: 9px;
26
- border-top-right-radius: 9px;
27
- background-color: white;
28
- padding: 7px 12% 0;
29
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
30
- }
31
-
32
- h1 {
33
- font-size: 100%;
34
- color: #730E15;
35
- line-height: 1.5em;
36
- }
37
-
38
- div.dialog > p {
39
- margin: 0 0 1em;
40
- padding: 1em;
41
- background-color: #F7F7F7;
42
- border: 1px solid #CCC;
43
- border-right-color: #999;
44
- border-left-color: #999;
45
- border-bottom-color: #999;
46
- border-bottom-left-radius: 4px;
47
- border-bottom-right-radius: 4px;
48
- border-top-color: #DADADA;
49
- color: #666;
50
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
51
- }
52
- </style>
53
- </head>
54
-
55
- <body>
56
- <!-- This file lives in public/500.html -->
57
- <div class="dialog">
58
- <div>
59
- <h1>We're sorry, but this request could not be verified.</h1>
60
- </div>
61
- <p>Please try relaunching this application at connect.zuora.com</p>
62
- </div>
63
-
64
-
65
- </body></html>
@@ -1,81 +0,0 @@
1
- <html><head>
2
- <title>We're sorry, but something went wrong</title>
3
- <meta name="viewport" content="width=device-width,initial-scale=1">
4
- <style>
5
- body {
6
- background-color: #EFEFEF;
7
- color: #2E2F30;
8
- text-align: center;
9
- font-family: arial, sans-serif;
10
- margin: 0;
11
- }
12
-
13
- div.dialog {
14
- width: 95%;
15
- max-width: 33em;
16
- margin: 4em auto 0;
17
- }
18
-
19
- div.dialog > div {
20
- border: 1px solid #CCC;
21
- border-right-color: #999;
22
- border-left-color: #999;
23
- border-bottom-color: #BBB;
24
- border-top: #B00100 solid 4px;
25
- border-top-left-radius: 9px;
26
- border-top-right-radius: 9px;
27
- background-color: white;
28
- padding: 7px 12% 0;
29
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
30
- }
31
-
32
- h1 {
33
- font-size: 100%;
34
- color: #730E15;
35
- line-height: 1.5em;
36
- }
37
-
38
- div.dialog > p {
39
- margin: 0 0 1em;
40
- padding: 1em;
41
- background-color: #F7F7F7;
42
- border: 1px solid #CCC;
43
- border-right-color: #999;
44
- border-left-color: #999;
45
- border-bottom-color: #999;
46
- border-bottom-left-radius: 4px;
47
- border-bottom-right-radius: 4px;
48
- border-top-color: #DADADA;
49
- color: #666;
50
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
51
- }
52
- div#main{
53
- background: white;
54
- }
55
- </style>
56
- </head>
57
-
58
- <body >
59
- <div style='background: white;'>
60
- <!-- This file lives in public/500.html -->
61
- <% if defined?(exception) %>
62
- <div class="dialog" style='max-width: 74em;'>
63
- <div>
64
- <h1><%= exception.class %> - '<%= exception.message %>'</h1>
65
- </div>
66
- <p style='text-align: left;'>
67
- <% exception.backtrace.each do |line| %>
68
- <%= line %><br>
69
- <% end %>
70
- </p>
71
- </div>
72
- <% else %>
73
- <div class="dialog">
74
- <div>
75
- <h1>The launch url was invalid.</h1>
76
- </div>
77
- <p>Please try relaunching this application</p>
78
- </div>
79
- <% end %>
80
- </div>
81
- </body></html>
@@ -1,80 +0,0 @@
1
- <html><head>
2
- <title>Select Task ID</title>
3
- <meta name="viewport" content="width=device-width,initial-scale=1">
4
- <style>
5
- body {
6
- background-color: #EFEFEF;
7
- color: #2E2F30;
8
- text-align: center;
9
- font-family: arial, sans-serif;
10
- margin: 0;
11
- }
12
-
13
- div.dialog {
14
- width: 95%;
15
- max-width: 33em;
16
- margin: 4em auto 0;
17
- }
18
-
19
- div.dialog > div {
20
- margin: 0 0 1em;
21
- border: 1px solid #CCC;
22
- border-right-color: #999;
23
- border-left-color: #999;
24
- border-bottom-color: #BBB;
25
- border-top: #3D4B5A solid 4px;
26
- border-top-left-radius: 9px;
27
- border-top-right-radius: 9px;
28
- border-bottom-left-radius: 9px;
29
- border-bottom-right-radius: 9px;
30
- background-color: white;
31
- padding: 7px 12% 0;
32
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
33
- }
34
-
35
- h1 {
36
- font-size: 100%;
37
- color: #3D4B5A;
38
- line-height: 1.5em;
39
- }
40
-
41
-
42
- div.launch_button {
43
- margin: 1em 0 1em;
44
- margin-right: auto;
45
- margin-left: auto;
46
- padding: 1em;
47
- width: 300px;
48
- font-size: 12pt;
49
- font-weight: bold;
50
- background-color: #F7F7F7;
51
- border: 1px solid #CCC;
52
- border-right-color: #999;
53
- border-left-color: #999;
54
- border-bottom-color: #999;
55
- border-top-left-radius: 4px;
56
- border-top-right-radius: 4px;
57
- border-bottom-left-radius: 4px;
58
- border-bottom-right-radius: 4px;
59
- border-top-color: #999;
60
- color: #666;
61
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
62
- }
63
- </style>
64
- </head>
65
-
66
- <body style='background: white;'>
67
- <div class="dialog">
68
- <div>
69
- <h1>You currently don't have access to the deployed workflow instance.</h1>
70
- <p style='text-align:left'>Please contact one of the below system administrators and have them give you access.</p>
71
- <ul style='text-align:left'>
72
- <% admins.each do |admin| %>
73
- <li><%= admin.username %></li>
74
- <% end %>
75
- </ul>
76
- </div>
77
- </div>
78
-
79
-
80
- </body></html>