xml_mapper 0.5.2 → 0.5.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.
- data/VERSION +1 -1
- data/lib/xml_mapper.rb +3 -3
- data/xml_mapper.gemspec +1 -1
- metadata +3 -3
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.5. | 
| 1 | 
            +
            0.5.3
         | 
    
        data/lib/xml_mapper.rb
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            require "nokogiri"
         | 
| 2 2 | 
             
            require "xml_mapper_hash"
         | 
| 3 | 
            -
            require "parsedate"
         | 
| 4 3 | 
             
            require "date"
         | 
| 4 | 
            +
            require "time"
         | 
| 5 5 |  | 
| 6 6 | 
             
            class XmlMapper
         | 
| 7 7 | 
             
              attr_accessor :mappings, :after_map_block, :within_xpath
         | 
| @@ -213,8 +213,8 @@ class XmlMapper | |
| 213 213 | 
             
                return string.to_i if string.match(/^\d+$/)
         | 
| 214 214 | 
             
                string = "00:#{string}" if string.match(/^(\d+):(\d+)$/)
         | 
| 215 215 | 
             
                string = string.to_s.gsub(/PT(\d+M.*)/,"PT0H\\1") # insert 0H into PT3M12S, for example: PT0H3M12S
         | 
| 216 | 
            -
                 | 
| 217 | 
            -
                return (hour.to_i * 1 * 3600 +  | 
| 216 | 
            +
                time = Time.parse(string)
         | 
| 217 | 
            +
                return (time.hour.to_i * 1 * 3600 + time.min.to_i * 1 * 60 + time.sec.to_i).to_i
         | 
| 218 218 | 
             
              end
         | 
| 219 219 |  | 
| 220 220 | 
             
              def parse_date(text)
         | 
    
        data/xml_mapper.gemspec
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: xml_mapper
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 4 | 
            +
              hash: 13
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 8 | 
             
              - 5
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0.5. | 
| 9 | 
            +
              - 3
         | 
| 10 | 
            +
              version: 0.5.3
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Tobias Schwab
         |