zuora_connect 2.0.60r → 2.1.1

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.
@@ -28,6 +28,11 @@ module ZuoraConnect
28
28
  ::Rails.configuration.action_dispatch.x_sendfile_header = nil
29
29
  end
30
30
 
31
+ if defined? Prometheus
32
+ initializer "prometheus.configure_rails_initialization" do |app|
33
+ app.middleware.use Prometheus::Middleware::Exporter,(options ={:path => '/connect/internal/metrics'})
34
+ end
35
+ end
31
36
  initializer "zuora_connect.configure_rails_initialization" do |app|
32
37
  app.middleware.insert_after Rack::Sendfile, ZuoraConnect::MetricsMiddleware
33
38
  app.middleware.insert_after ActionDispatch::RequestId, ZuoraConnect::RequestIdMiddleware
@@ -35,15 +40,6 @@ module ZuoraConnect
35
40
  app.config.middleware.use ZuoraConnect::JsonParseErrors
36
41
  end
37
42
 
38
- if defined? Prometheus
39
- require 'rack'
40
- require 'prometheus/middleware/exporter'
41
- initializer "prometheus.configure_rails_initialization" do |app|
42
- app.middleware.insert_after ZuoraConnect::MetricsMiddleware, Prometheus::Middleware::Exporter, path: '/connect/internal/metrics'
43
- app.config.middleware.use Rack::Deflater, if: ->(env, *) { env['PATH_INFO'] == '/connect/internal/metrics' }
44
- end
45
- end
46
-
47
43
  # hook to process_action
48
44
  ActiveSupport::Notifications.subscribe('process_action.action_controller', ZuoraConnect::PageRequest.new)
49
45
 
@@ -81,21 +77,6 @@ module ZuoraConnect
81
77
  request_headers =
82
78
  event.payload[:headers].env.
83
79
  reject { |key| key.to_s.include?('.') || REQUEST_HEADERS_TO_IGNORE.include?(key.to_s) }
84
- begin
85
- if request_headers["HTTP_AUTHORIZATION"].present?
86
- if request_headers["HTTP_AUTHORIZATION"].include?("Basic")
87
- user_password = request_headers["HTTP_AUTHORIZATION"].split("Basic").last.strip
88
- user, password = Base64.decode64(user_password).split(":")
89
- request_headers["HTTP_AUTHORIZATION"] = "Basic #{user}:ValueFiltered"
90
- elsif
91
- request_headers["HTTP_AUTHORIZATION"] = "ValueFiltered"
92
- end
93
- end
94
- request_headers["HTTP_API_TOKEN"] = "ValueFiltered" if request_headers["HTTP_API_TOKEN"].present?
95
- rescue
96
- request_headers.delete("HTTP_API_TOKEN")
97
- request_headers.delete("HTTP_AUTHORIZATION")
98
- end
99
80
  items.merge!({ headers: request_headers.to_s })
100
81
  end
101
82
 
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "2.0.60r"
2
+ VERSION = "2.1.1"
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.60r
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-13 00:00:00.000000000 Z
11
+ date: 2020-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apartment
@@ -374,7 +374,6 @@ files:
374
374
  - lib/zuora_connect/exceptions.rb
375
375
  - lib/zuora_connect/railtie.rb
376
376
  - lib/zuora_connect/version.rb
377
- - lib/zuora_connect/zuora_audit.rb
378
377
  - test/controllers/zuora_connect/api/v1/app_instance_controller_test.rb
379
378
  - test/dummy/README.rdoc
380
379
  - test/dummy/Rakefile
@@ -430,9 +429,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
430
429
  version: '0'
431
430
  required_rubygems_version: !ruby/object:Gem::Requirement
432
431
  requirements:
433
- - - ">"
432
+ - - ">="
434
433
  - !ruby/object:Gem::Version
435
- version: 1.3.1
434
+ version: '0'
436
435
  requirements: []
437
436
  rubygems_version: 3.0.3
438
437
  signing_key:
@@ -1,31 +0,0 @@
1
- # Added by @Vina
2
- # Description: This automatically stamp user created/updated the record for DataQuery Audit
3
- # Usage: add 'zuora_audit' to your model.rb that you would like to track
4
-
5
- module ZuoraConnect
6
- module ZuoraAudit
7
- extend ActiveSupport::Concern
8
-
9
- module ClassMethods
10
- def zuora_audit
11
- include ZuoraConnect::ZuoraAudit::ZuoraAuditInstanceMethods
12
- before_create :set_created_by_id
13
- before_update :set_updated_by_id
14
- end
15
- end
16
-
17
- module ZuoraAuditInstanceMethods
18
- def set_created_by_id
19
- self.created_by_id = current_user_id if defined?(self.created_by_id)
20
- end
21
-
22
- def set_updated_by_id
23
- self.updated_by_id = current_user_id if defined?(self.updated_by_id)
24
- end
25
-
26
- def current_user_id
27
- return ZuoraConnect::ZuoraUser.current_user_id
28
- end
29
- end
30
- end
31
- end