recaptcha 5.1.0 → 5.2.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.
- checksums.yaml +4 -4
- data/lib/recaptcha.rb +2 -1
- data/lib/recaptcha/helpers.rb +2 -3
- data/lib/recaptcha/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: 1308b1cf9b9c14d9df6c9fe04eebfd241406e7afa31fbd522df8296ac7b0392a
         | 
| 4 | 
            +
              data.tar.gz: 9771326e251bbf449107fe8a3a3a9b52c8b0a3b2e99858c3867d9867b690408a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 5eaae94b79027b794a1baaa5e0c46bf976356fa90e3008d7452fc5b109b08ba79a4f48aaf2c6f24bbfd039f1ee5949d45db7c9b7a8ba98fe10776d241bc894d2
         | 
| 7 | 
            +
              data.tar.gz: a18343d8c7a9162c2963992af87471d5bdcebf3123a95bba777d4223a8cfb9af776c0fb2dca7c89b2d9e1214aa0a72ad707f9fe1c8e5a23c91c80a787232b942
         | 
    
        data/lib/recaptcha.rb
    CHANGED
    
    | @@ -99,7 +99,8 @@ module Recaptcha | |
| 99 99 | 
             
                end
         | 
| 100 100 | 
             
              end
         | 
| 101 101 |  | 
| 102 | 
            -
              def self.api_verification(verify_hash, timeout:  | 
| 102 | 
            +
              def self.api_verification(verify_hash, timeout: nil)
         | 
| 103 | 
            +
                timeout ||= DEFAULT_TIMEOUT
         | 
| 103 104 | 
             
                http = if configuration.proxy
         | 
| 104 105 | 
             
                  proxy_server = URI.parse(configuration.proxy)
         | 
| 105 106 | 
             
                  Net::HTTP::Proxy(proxy_server.host, proxy_server.port, proxy_server.user, proxy_server.password)
         | 
    
        data/lib/recaptcha/helpers.rb
    CHANGED
    
    | @@ -217,7 +217,6 @@ module Recaptcha | |
| 217 217 | 
             
                        var element = document.getElementById(id);
         | 
| 218 218 | 
             
                        element.value = token;
         | 
| 219 219 | 
             
                      }
         | 
| 220 | 
            -
                    </script>
         | 
| 221 220 | 
             
                  HTML
         | 
| 222 221 | 
             
                end
         | 
| 223 222 |  | 
| @@ -283,13 +282,13 @@ module Recaptcha | |
| 283 282 | 
             
                # Returns a camelized string that is safe for use in a JavaScript variable/function name.
         | 
| 284 283 | 
             
                # sanitize_action_for_js('my/action') => 'MyAction'
         | 
| 285 284 | 
             
                private_class_method def self.sanitize_action_for_js(action)
         | 
| 286 | 
            -
                  action.to_s.gsub(/\W/, '_'). | 
| 285 | 
            +
                  action.to_s.gsub(/\W/, '_').split(/\/|_/).map(&:capitalize).join
         | 
| 287 286 | 
             
                end
         | 
| 288 287 |  | 
| 289 288 | 
             
                # Returns a dasherized string that is safe for use as an HTML ID
         | 
| 290 289 | 
             
                # dasherize_action('my/action') => 'my-action'
         | 
| 291 290 | 
             
                private_class_method def self.dasherize_action(action)
         | 
| 292 | 
            -
                  action.to_s.gsub(/\W/, '-'). | 
| 291 | 
            +
                  action.to_s.gsub(/\W/, '-').tr('_', '-')
         | 
| 293 292 | 
             
                end
         | 
| 294 293 |  | 
| 295 294 | 
             
                private_class_method def self.hash_to_query(hash)
         | 
    
        data/lib/recaptcha/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: recaptcha
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 5.1 | 
| 4 | 
            +
              version: 5.2.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Jason L Perry
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2019- | 
| 11 | 
            +
            date: 2019-10-09 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: json
         |