forty_time 0.0.4 → 0.0.5
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/Gemfile.lock +1 -1
- data/lib/forty_time.rb +3 -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: 005fa602c9aebd4292f9f6f11c8b59886f0db7570a1ebe11bb90642999c211ba
         | 
| 4 | 
            +
              data.tar.gz: 549a50af8e1baedf11b3967d9df1b79316f105e4833b0f2ed7ed973dc2e13f1c
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: eb5534b2122a21553c39e1316adc5073d6c65ae5cd83b94f2bada84cb8dcc0d804d4fd97ba3fc8871870cb49d4edbd779d995587adf1105e51af62566eb78502
         | 
| 7 | 
            +
              data.tar.gz: d61bd7b39ffe857ccd7371490f6ae81599cd9a96e572d35718eeb27d986da2441231ac76134d5e4efb832918f1e27a2f0449e83c681a50e36405c959964b6bbe
         | 
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/lib/forty_time.rb
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            # frozen_string_literal: true
         | 
| 2 2 |  | 
| 3 3 | 
             
            class FortyTime
         | 
| 4 | 
            -
              VERSION = '0.0. | 
| 4 | 
            +
              VERSION = '0.0.5'
         | 
| 5 5 |  | 
| 6 6 | 
             
              class ParseError < StandardError; end
         | 
| 7 7 |  | 
| @@ -12,9 +12,9 @@ class FortyTime | |
| 12 12 | 
             
                raise ParseError unless can_parse_string
         | 
| 13 13 |  | 
| 14 14 | 
             
                hours, extra = input.split(':').map(&:to_i)
         | 
| 15 | 
            -
                 | 
| 15 | 
            +
                extra *= -1 if input[0] == '-'
         | 
| 16 16 |  | 
| 17 | 
            -
                minutes  | 
| 17 | 
            +
                minutes = hours * 60 + extra
         | 
| 18 18 |  | 
| 19 19 | 
             
                new(minutes)
         | 
| 20 20 | 
             
              end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: forty_time
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.5
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Jon Allured
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2020- | 
| 11 | 
            +
            date: 2020-04-11 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies: []
         | 
| 13 13 | 
             
            description: This gem helps one go between intergers and strings to represent time
         | 
| 14 14 | 
             
              amounts.
         |