ip 0.0.1 → 0.0.2
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.
- data/lib/ip.rb +3 -2
 - metadata +2 -2
 
    
        data/lib/ip.rb
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            #
         
     | 
| 
       2 
2 
     | 
    
         
             
            # IP - Collection of Tools to work with IP addresses
         
     | 
| 
       3 
3 
     | 
    
         
             
            #
         
     | 
| 
       4 
     | 
    
         
            -
            # Version:: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
            # Version:: 0.0.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            # Author:: Erik Hollensbe
         
     | 
| 
       6 
6 
     | 
    
         
             
            # License:: BSD
         
     | 
| 
       7 
7 
     | 
    
         
             
            # Contact:: erik@hollensbe.org
         
     | 
| 
         @@ -155,7 +155,8 @@ class IP 
     | 
|
| 
       155 
155 
     | 
    
         
             
                  rawip = IP::Address.pack(@ip)
         
     | 
| 
       156 
156 
     | 
    
         
             
                  rawnm = 0xFFFFFFFF << (32 - @mask)
         
     | 
| 
       157 
157 
     | 
    
         
             
                  upper = rawip | ~rawnm
         
     | 
| 
       158 
     | 
    
         
            -
                   
     | 
| 
      
 158 
     | 
    
         
            +
                  lower = rawip & rawnm
         
     | 
| 
      
 159 
     | 
    
         
            +
                  return IP::Range[IP::Address.unpack(lower), IP::Address.unpack(upper)]
         
     | 
| 
       159 
160 
     | 
    
         
             
                end
         
     | 
| 
       160 
161 
     | 
    
         | 
| 
       161 
162 
     | 
    
         
             
              end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -3,8 +3,8 @@ rubygems_version: 0.8.11 
     | 
|
| 
       3 
3 
     | 
    
         
             
            specification_version: 1
         
     | 
| 
       4 
4 
     | 
    
         
             
            name: ip
         
     | 
| 
       5 
5 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       6 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
       7 
     | 
    
         
            -
            date: 2005- 
     | 
| 
      
 6 
     | 
    
         
            +
              version: 0.0.2
         
     | 
| 
      
 7 
     | 
    
         
            +
            date: 2005-11-13 00:00:00 -08:00
         
     | 
| 
       8 
8 
     | 
    
         
             
            summary: "Ruby classes to work with IP address, ranges, and netmasks"
         
     | 
| 
       9 
9 
     | 
    
         
             
            require_paths: 
         
     | 
| 
       10 
10 
     | 
    
         
             
              - lib
         
     |