hmtime 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26115554c68d76501a954c09f822ad0d2e06909e157c49eba2a2ab50fa8612cc
4
- data.tar.gz: 42f74999f738324ff5d34fd9410b2177673abcbc37b6dd9ad84ea9b9bcdf738d
3
+ metadata.gz: 331e14c0af60ef2a2618c16a13399f74e9ec975f168f4acca1acc43393aa64c8
4
+ data.tar.gz: 4f89bf0fdd527ca08799a7c1e87c2ec1e59e8201d217e530353a3706097e2b6c
5
5
  SHA512:
6
- metadata.gz: '059ea557563ed3db743a51d81b22128b789e5474083b9155b05562c75fd8fcd4b06afd68d5f0fc3f98dedd122590e7df5df39a811addfa88721e6219fc6a1dbc'
7
- data.tar.gz: 8eb2e324b51e6342799c9f94c15790e1b875926f1439cdcf79f4c00b6c77d8873b023168078c743f0f2ee675452d96d54120c8efb481e44b009f42380a22455b
6
+ metadata.gz: bc55d9771061d1a9f59090c4baf65c7a792e48fd710b57b4c45c33811cf1957fbac77b75596328feea6b43ba30ad9c85bb31debb70fb46268267413d0c9f044f
7
+ data.tar.gz: f7bb00ccd8174765d68eed8de58a2caecc19747db38dd3aabeb6fc569ec1b03c29272b3e5ad7563549e65bf1cd0f88bab75fc4ee1c7e00455380d3b071a2dc52
data/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.1] -2024-03-14
9
+
10
+ ### Fixed
11
+
12
+ - Added parenthesis to clarify '-' operator due to ambiguous first argument warning
13
+ - ">59" error that should've been assed on minutes, but was instead assessed on hours
14
+
8
15
  ## [0.1.2] - 2024-03-14
9
16
 
10
17
  ### Added
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class HMTime
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
data/lib/hmtime.rb CHANGED
@@ -110,13 +110,14 @@ class HMTime
110
110
  arguments = ['',0,0]
111
111
  end
112
112
 
113
+ is_negative = arguments[0] == '-'
114
+ hours, minutes = arguments[1,2].collect{|arg| arg.to_i}
115
+
113
116
  ### How to do a warning?? Is this correct?
114
- if arguments[1].to_i > 59
117
+ if minutes.to_i > 59
115
118
  warn "Warning: The mm (minutes) field of `hhh:mm` should be no greater than 59."
116
119
  end
117
120
 
118
- is_negative = arguments[0] == '-'
119
- hours, minutes = arguments[1,2].collect{|arg| arg.to_i}
120
121
 
121
122
  return (is_negative ? -1 : 1) * ((hours * 60) + minutes)
122
123
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hmtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Dvorak
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-14 00:00:00.000000000 Z
11
+ date: 2024-03-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: