namecheap-client 0.1.1 → 0.1.3
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/namecheap-client.rb +11 -4
- metadata +4 -4
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 82fd94811ffc532aac0b2e9fbdf08b96660993f4196486aaea959eafea04abc8
         | 
| 4 | 
            +
              data.tar.gz: f1b24f4561d2206878ddff49daf9cb76f166d32c21e058220fa391dfc9b96b4a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 5709e2b3b40e39aa7ab324246e6628e633034d6febcb76ca86913e2e598eb199dc24d82d9abbc9a2cb4f1084fa06f86f9e96be36c1da19347d6c3e31c5e9ec9f
         | 
| 7 | 
            +
              data.tar.gz: 5c2266df31eb45f91ead7cd724b84a2f73dffef4aeaaf162e3813363768151a9ab6e34b38d63257065a2739691254d0d03ac54f1c88acb9b275227a3d7612841
         | 
    
        data/lib/namecheap-client.rb
    CHANGED
    
    | @@ -134,17 +134,24 @@ class NamecheapClient | |
| 134 134 | 
             
              end  
         | 
| 135 135 |  | 
| 136 136 | 
             
              def parse_dns_records(xml_response)
         | 
| 137 | 
            +
                namespaces = { 'nc' => 'http://api.namecheap.com/xml.response' }
         | 
| 137 138 | 
             
                records = []
         | 
| 138 | 
            -
                xml_response.xpath('//DomainDNSGetHostsResult/host').each do |host_node|
         | 
| 139 | 
            +
                xml_response.xpath('//nc:DomainDNSGetHostsResult/nc:host', namespaces).each do |host_node|
         | 
| 139 140 | 
             
                  records << {
         | 
| 140 | 
            -
                    ' | 
| 141 | 
            +
                    'HostId' => host_node['HostId'],
         | 
| 141 142 | 
             
                    'Name' => host_node['Name'],
         | 
| 143 | 
            +
                    'Type' => host_node['Type'],
         | 
| 142 144 | 
             
                    'Address' => host_node['Address'],
         | 
| 143 | 
            -
                    ' | 
| 145 | 
            +
                    'MXPref' => host_node['MXPref'],
         | 
| 146 | 
            +
                    'TTL' => host_node['TTL'],
         | 
| 147 | 
            +
                    'AssociatedAppTitle' => host_node['AssociatedAppTitle'],
         | 
| 148 | 
            +
                    'FriendlyName' => host_node['FriendlyName'],
         | 
| 149 | 
            +
                    'IsActive' => host_node['IsActive'],
         | 
| 150 | 
            +
                    'IsDDNSEnabled' => host_node['IsDDNSEnabled']
         | 
| 144 151 | 
             
                  }
         | 
| 145 152 | 
             
                end
         | 
| 146 153 | 
             
                records
         | 
| 147 | 
            -
              end
         | 
| 154 | 
            +
              end  
         | 
| 148 155 |  | 
| 149 156 | 
             
              def parse_errors(xml_response)
         | 
| 150 157 | 
             
                errors = xml_response.xpath('//Errors/Error').map(&:text)
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: namecheap-client
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Leandro Daniel Sardi
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2024-09- | 
| 11 | 
            +
            date: 2024-09-24 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: net-http
         | 
| @@ -44,14 +44,14 @@ dependencies: | |
| 44 44 | 
             
                requirements:
         | 
| 45 45 | 
             
                - - "~>"
         | 
| 46 46 | 
             
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            -
                    version:  | 
| 47 | 
            +
                    version: 1.13.10
         | 
| 48 48 | 
             
              type: :runtime
         | 
| 49 49 | 
             
              prerelease: false
         | 
| 50 50 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 51 | 
             
                requirements:
         | 
| 52 52 | 
             
                - - "~>"
         | 
| 53 53 | 
             
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            -
                    version:  | 
| 54 | 
            +
                    version: 1.13.10
         | 
| 55 55 | 
             
            description: A simple Ruby client library for interacting with the [Namecheap API](https://www.namecheap.com/support/api/intro/),
         | 
| 56 56 | 
             
              allowing you to manage your domains programmatically.
         | 
| 57 57 | 
             
            email: leandro@massprospecting.com
         |