phony 2.19.2 → 2.19.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/phony/country.rb +4 -0
 - data/lib/phony/national_splitters/none.rb +1 -3
 - 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: 54c6578da7427af232e98c6a999e1f53a3bf0098da9a3902d191db28c4d534d7
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 9dac986205602a15d9ccd6ba189dd7fe233664cbbfdc5b7f2cc6c6465648af5b
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 0d2f07e5acbe13ad9b8f5c1a034e9c18e73e0915415617a143afc9555b14071084a323016d4866064862cc78fda2b8cb914b5a80762543b15dfaa986e1cbdc23
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: bc1397a96d18962582bc2a67628d622503cd972712cd27623ed5b93ec1f4157d7fbf8539dadd6bdeb92dd9d423f5c7a709dca051b4e8e49458f14e418ac452c8
         
     | 
    
        data/lib/phony/country.rb
    CHANGED
    
    | 
         @@ -97,6 +97,9 @@ module Phony 
     | 
|
| 
       97 
97 
     | 
    
         
             
                  end
         
     | 
| 
       98 
98 
     | 
    
         
             
                end
         
     | 
| 
       99 
99 
     | 
    
         
             
                def format_cc_ndc trunk, ndc, local, type, space, parentheses, use_trunk
         
     | 
| 
      
 100 
     | 
    
         
            +
                  # Note: We mark NDCs that are of type "none" with false (nil trips plausible?). This would result in false being printed.
         
     | 
| 
      
 101 
     | 
    
         
            +
                  #       Therefore we set NDC to nil when formatting.
         
     | 
| 
      
 102 
     | 
    
         
            +
                  ndc = nil if ndc == false
         
     | 
| 
       100 
103 
     | 
    
         
             
                  case type
         
     | 
| 
       101 
104 
     | 
    
         
             
                  when String
         
     | 
| 
       102 
105 
     | 
    
         
             
                    trunk &&= trunk.format(space, use_trunk)
         
     | 
| 
         @@ -125,6 +128,7 @@ module Phony 
     | 
|
| 
       125 
128 
     | 
    
         
             
                  end
         
     | 
| 
       126 
129 
     | 
    
         
             
                end
         
     | 
| 
       127 
130 
     | 
    
         
             
                def format_ndc ndc, parentheses
         
     | 
| 
      
 131 
     | 
    
         
            +
                  ndc = nil if ndc == false # TODO
         
     | 
| 
       128 
132 
     | 
    
         
             
                  parentheses ? "(#{ndc})" : ndc
         
     | 
| 
       129 
133 
     | 
    
         
             
                end
         
     | 
| 
       130 
134 
     | 
    
         
             
                def format_with_ndc format, cc, ndc, local, space
         
     | 
| 
         @@ -31,9 +31,7 @@ module Phony 
     | 
|
| 
       31 
31 
     | 
    
         
             
                  # since using nil is dangerous and breaks
         
     | 
| 
       32 
32 
     | 
    
         
             
                  # abstraction)
         
     | 
| 
       33 
33 
     | 
    
         
             
                  #
         
     | 
| 
       34 
     | 
    
         
            -
                  # Note:  
     | 
| 
       35 
     | 
    
         
            -
                  #
         
     | 
| 
       36 
     | 
    
         
            -
                  # TODO Flip nil/false?
         
     | 
| 
      
 34 
     | 
    
         
            +
                  # Note: Decided it stays in. When formatting, it's turned into nil.
         
     | 
| 
       37 
35 
     | 
    
         
             
                  #
         
     | 
| 
       38 
36 
     | 
    
         
             
                  def split national_number
         
     | 
| 
       39 
37 
     | 
    
         
             
                    [nil, false, national_number]
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: phony
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2.19. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.19.3
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Florian Hanke
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2021-07- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2021-07-08 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       13 
13 
     | 
    
         
             
            description: 'Fast international phone number (E164 standard) normalizing, splitting
         
     | 
| 
       14 
14 
     | 
    
         
             
              and formatting. Lots of formatting options: International (+.., 00..), national
         
     |