pg_rails 7.6.30 → 7.6.31
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/pg_engine/app/controllers/pg_engine/base_controller.rb +23 -0
- data/pg_rails/lib/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 0b315989e816d61e3a75b72845fc50ab94b4393b538f208c43cfcd6ff078a9bf
         | 
| 4 | 
            +
              data.tar.gz: 66b62128b94690c25f37213bc6f4b2958b2218c3d001ae2f1a664f694dfe0efc
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: b1092c6d4cceb0201e86b490124eebab80d3303da02e01c26f185ccaab629950d7f5c6ac069904079e3e243987a9e09d743a778dd207328d4a6033db71e3a95e
         | 
| 7 | 
            +
              data.tar.gz: 94f283edbc6474c4fffcec0045e66af213e3ac698e5f4ba1293a9d373892651ffaec3ba54600d0e0e5352358b704eda07452a9d9791f6119194f3158e46aa58c
         | 
| @@ -2,6 +2,7 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            module PgEngine
         | 
| 4 4 | 
             
              # rubocop:disable Rails/ApplicationController
         | 
| 5 | 
            +
              # rubocop:disable Metrics/ClassLength
         | 
| 5 6 | 
             
              class BaseController < ActionController::Base
         | 
| 6 7 | 
             
                # Importante que esta línea esté al principio
         | 
| 7 8 | 
             
                protect_from_forgery with: :exception
         | 
| @@ -118,6 +119,26 @@ module PgEngine | |
| 118 119 | 
             
                end
         | 
| 119 120 |  | 
| 120 121 | 
             
                def page_not_found
         | 
| 122 | 
            +
                  # Skip CSRF verification, given that the resource is missing
         | 
| 123 | 
            +
                  @_marked_for_same_origin_verification = false
         | 
| 124 | 
            +
             | 
| 125 | 
            +
                  # Mor about ActionController::InvalidCrossOriginRequest CORS CSRF
         | 
| 126 | 
            +
                  #
         | 
| 127 | 
            +
                  # actionpack/lib/action_controller/metal/request_forgery_protection.rb
         | 
| 128 | 
            +
                  #
         | 
| 129 | 
            +
                  # def verify_same_origin_request # :doc:
         | 
| 130 | 
            +
                  #   if marked_for_same_origin_verification? && non_xhr_javascript_response?
         | 
| 131 | 
            +
                  #     if logger && log_warning_on_csrf_failure
         | 
| 132 | 
            +
                  #       logger.warn CROSS_ORIGIN_JAVASCRIPT_WARNING
         | 
| 133 | 
            +
                  #     end
         | 
| 134 | 
            +
                  #     raise ActionController::InvalidCrossOriginRequest, CROSS_ORIGIN_JAVASCRIPT_WARNING
         | 
| 135 | 
            +
                  #   end
         | 
| 136 | 
            +
                  # end
         | 
| 137 | 
            +
                  #
         | 
| 138 | 
            +
                  # no entiendo el sentido de ese código, porque no chequea realmente el
         | 
| 139 | 
            +
                  # origin del request. simplemente tira la exception si está enviando un
         | 
| 140 | 
            +
                  # javascript que no sea XHR (XMLHTTPRequest)
         | 
| 141 | 
            +
             | 
| 121 142 | 
             
                  render_my_component(PageNotFoundComponent.new, :not_found)
         | 
| 122 143 | 
             
                end
         | 
| 123 144 |  | 
| @@ -200,6 +221,7 @@ module PgEngine | |
| 200 221 | 
             
                      render json: { html: }, status:
         | 
| 201 222 | 
             
                    end
         | 
| 202 223 |  | 
| 224 | 
            +
                    # Mainly JS
         | 
| 203 225 | 
             
                    format.any do
         | 
| 204 226 | 
             
                      head status
         | 
| 205 227 | 
             
                    end
         | 
| @@ -221,4 +243,5 @@ module PgEngine | |
| 221 243 | 
             
                  redirect_back fallback_location: root_path
         | 
| 222 244 | 
             
                end
         | 
| 223 245 | 
             
              end
         | 
| 246 | 
            +
              # rubocop:enable Metrics/ClassLength
         | 
| 224 247 | 
             
            end
         | 
    
        data/pg_rails/lib/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: pg_rails
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 7.6. | 
| 4 | 
            +
              version: 7.6.31
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Martín Rosso
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2025-02- | 
| 11 | 
            +
            date: 2025-02-27 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         |