zuora_connect 3.0.0 → 3.0.1.pre.a
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/models/concerns/zuora_connect/auditable.rb +25 -0
- data/lib/zuora_connect.rb +0 -2
- data/lib/zuora_connect/version.rb +2 -2
- metadata +5 -5
- data/lib/zuora_connect/zuora_audit.rb +0 -31
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 93697b2f6ee9ddb200d9aafcf700e2305740617bbc0a8b216dc32b9fd33a3f2e
         | 
| 4 | 
            +
              data.tar.gz: b88d5be07b1122372eb79b9aa74662f06ba3f522a64ba0177f62842db1fe29cc
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: c5bb290ae60c2375e0748a41dc6e8dfdc9b422f2718b24b81759f7985c947050afd0389fefa2d3950d240f1cf3c1f0432bd58aee33c1aa8deed46e46beab6107
         | 
| 7 | 
            +
              data.tar.gz: 63703e115fea73c8aa32859719020a68c8e91cee2454260923fae72ebc3bd0e76e30607a526f98238ba8a1c85a828b892d46e99dddf4adea96228d6f2fe60396
         | 
| @@ -0,0 +1,25 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module ZuoraConnect
         | 
| 4 | 
            +
              # Added by @Vina
         | 
| 5 | 
            +
              # Description: This automatically stamp user created/updated the record for DataQuery Audit
         | 
| 6 | 
            +
              # Usage: add 'include ZuoraConnect::Auditable' to your model.rb that you would like to track
         | 
| 7 | 
            +
              module Auditable
         | 
| 8 | 
            +
                extend ActiveSupport::Concern
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                included do
         | 
| 11 | 
            +
                  before_create :set_created_by_id
         | 
| 12 | 
            +
                  before_update :set_updated_by_id
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                  private
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                  def set_created_by_id
         | 
| 17 | 
            +
                    self.created_by_id = ZuoraUser.current_user_id if defined?(created_by_id)
         | 
| 18 | 
            +
                  end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
                  def set_updated_by_id
         | 
| 21 | 
            +
                    self.updated_by_id = ZuoraUser.current_user_id if defined?(updated_by_id)
         | 
| 22 | 
            +
                  end
         | 
| 23 | 
            +
                end
         | 
| 24 | 
            +
              end
         | 
| 25 | 
            +
            end
         | 
    
        data/lib/zuora_connect.rb
    CHANGED
    
    | @@ -11,10 +11,8 @@ require 'resque/plugins/custom_logger' | |
| 11 11 | 
             
            require 'resque/plugins/app_instance_job'
         | 
| 12 12 | 
             
            require 'metrics/influx/point_value'
         | 
| 13 13 | 
             
            require 'metrics/net'
         | 
| 14 | 
            -
            require 'zuora_connect/zuora_audit'
         | 
| 15 14 | 
             
            require 'active_record'
         | 
| 16 15 | 
             
            require 'zuora_observability'
         | 
| 17 | 
            -
            ::ActiveRecord::Base.send :include, ZuoraConnect::ZuoraAudit
         | 
| 18 16 |  | 
| 19 17 | 
             
            module ZuoraConnect
         | 
| 20 18 | 
             
              class << self
         | 
| @@ -1,3 +1,3 @@ | |
| 1 1 | 
             
            module ZuoraConnect
         | 
| 2 | 
            -
              VERSION = "3.0. | 
| 3 | 
            -
            end
         | 
| 2 | 
            +
              VERSION = "3.0.1-a"
         | 
| 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: 3.0. | 
| 4 | 
            +
              version: 3.0.1.pre.a
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Connect Team
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2021-04- | 
| 11 | 
            +
            date: 2021-04-21 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: apartment
         | 
| @@ -352,6 +352,7 @@ files: | |
| 352 352 | 
             
            - app/controllers/zuora_connect/static_controller.rb
         | 
| 353 353 | 
             
            - app/helpers/zuora_connect/api/v1/app_instance_helper.rb
         | 
| 354 354 | 
             
            - app/helpers/zuora_connect/application_helper.rb
         | 
| 355 | 
            +
            - app/models/concerns/zuora_connect/auditable.rb
         | 
| 355 356 | 
             
            - app/models/zuora_connect/app_instance.rb
         | 
| 356 357 | 
             
            - app/models/zuora_connect/app_instance_base.rb
         | 
| 357 358 | 
             
            - app/models/zuora_connect/login.rb
         | 
| @@ -411,7 +412,6 @@ files: | |
| 411 412 | 
             
            - lib/zuora_connect/exceptions.rb
         | 
| 412 413 | 
             
            - lib/zuora_connect/railtie.rb
         | 
| 413 414 | 
             
            - lib/zuora_connect/version.rb
         | 
| 414 | 
            -
            - lib/zuora_connect/zuora_audit.rb
         | 
| 415 415 | 
             
            homepage: 
         | 
| 416 416 | 
             
            licenses: []
         | 
| 417 417 | 
             
            metadata: {}
         | 
| @@ -426,9 +426,9 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 426 426 | 
             
                  version: '0'
         | 
| 427 427 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 428 428 | 
             
              requirements:
         | 
| 429 | 
            -
              - - " | 
| 429 | 
            +
              - - ">"
         | 
| 430 430 | 
             
                - !ruby/object:Gem::Version
         | 
| 431 | 
            -
                  version:  | 
| 431 | 
            +
                  version: 1.3.1
         | 
| 432 432 | 
             
            requirements: []
         | 
| 433 433 | 
             
            rubygems_version: 3.2.15
         | 
| 434 434 | 
             
            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
         |