forty_time 0.0.7 → 0.0.8
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/.rspec +1 -2
- data/.rubocop.yml +8 -0
- data/Gemfile.lock +31 -28
- data/forty_time.gemspec +3 -2
- data/lib/forty_time.rb +3 -3
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5eebf2c2163cdc4686dda95809e101dbe09c3f62f788f1900b4caf113cdc54f1
|
4
|
+
data.tar.gz: 3d15e412a3a64bde7ea1e459f202367dbebe7a60c5fcb6f039483e0bb9a867c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41c4cfc5ebd6a1f80bdfbba808ff588cb7bbe8f6cd602b5c8d27280565e8af70fd20a908db196e7428707f7bd0021c518642d532c0795bd187030f483252bbcf
|
7
|
+
data.tar.gz: 5f781c8e7b4489a6122438dad52e9655019e7c41df1ef379cb717a9c9cb964c61e5d2326eb5455bd9205c60ead2b0a0e5d24f1765175b5dd4409cf9ac599441c
|
data/.rspec
CHANGED
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,43 +1,46 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
forty_time (0.0.
|
4
|
+
forty_time (0.0.8)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
ast (2.4.
|
10
|
-
diff-lcs (1.
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
rexml (3.2.
|
18
|
-
rspec (3.
|
19
|
-
rspec-core (~> 3.
|
20
|
-
rspec-expectations (~> 3.
|
21
|
-
rspec-mocks (~> 3.
|
22
|
-
rspec-core (3.
|
23
|
-
rspec-support (~> 3.
|
24
|
-
rspec-expectations (3.
|
9
|
+
ast (2.4.2)
|
10
|
+
diff-lcs (1.5.0)
|
11
|
+
parallel (1.21.0)
|
12
|
+
parser (3.1.0.0)
|
13
|
+
ast (~> 2.4.1)
|
14
|
+
rainbow (3.1.1)
|
15
|
+
rake (13.0.6)
|
16
|
+
regexp_parser (2.2.0)
|
17
|
+
rexml (3.2.5)
|
18
|
+
rspec (3.10.0)
|
19
|
+
rspec-core (~> 3.10.0)
|
20
|
+
rspec-expectations (~> 3.10.0)
|
21
|
+
rspec-mocks (~> 3.10.0)
|
22
|
+
rspec-core (3.10.1)
|
23
|
+
rspec-support (~> 3.10.0)
|
24
|
+
rspec-expectations (3.10.2)
|
25
25
|
diff-lcs (>= 1.2.0, < 2.0)
|
26
|
-
rspec-support (~> 3.
|
27
|
-
rspec-mocks (3.
|
26
|
+
rspec-support (~> 3.10.0)
|
27
|
+
rspec-mocks (3.10.2)
|
28
28
|
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
-
rspec-support (~> 3.
|
30
|
-
rspec-support (3.
|
31
|
-
rubocop (
|
32
|
-
jaro_winkler (~> 1.5.1)
|
29
|
+
rspec-support (~> 3.10.0)
|
30
|
+
rspec-support (3.10.3)
|
31
|
+
rubocop (1.24.1)
|
33
32
|
parallel (~> 1.10)
|
34
|
-
parser (>=
|
33
|
+
parser (>= 3.0.0.0)
|
35
34
|
rainbow (>= 2.2.2, < 4.0)
|
35
|
+
regexp_parser (>= 1.8, < 3.0)
|
36
36
|
rexml
|
37
|
+
rubocop-ast (>= 1.15.1, < 2.0)
|
37
38
|
ruby-progressbar (~> 1.7)
|
38
|
-
unicode-display_width (>= 1.4.0, <
|
39
|
-
|
40
|
-
|
39
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
40
|
+
rubocop-ast (1.15.1)
|
41
|
+
parser (>= 3.0.1.1)
|
42
|
+
ruby-progressbar (1.11.0)
|
43
|
+
unicode-display_width (2.1.0)
|
41
44
|
|
42
45
|
PLATFORMS
|
43
46
|
ruby
|
@@ -49,4 +52,4 @@ DEPENDENCIES
|
|
49
52
|
rubocop
|
50
53
|
|
51
54
|
BUNDLED WITH
|
52
|
-
2.
|
55
|
+
2.3.4
|
data/forty_time.gemspec
CHANGED
@@ -12,11 +12,12 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = 'This gem helps one go between intergers and strings to represent time amounts.'
|
13
13
|
spec.homepage = 'https://www.fortyeven.com/'
|
14
14
|
spec.license = 'MIT'
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.6.5')
|
16
16
|
|
17
|
+
spec.metadata['changelog_uri'] = 'https://github.com/verynicecode/forty-time-management/blob/master/ruby/CHANGELOG.md'
|
17
18
|
spec.metadata['homepage_uri'] = spec.homepage
|
19
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
18
20
|
spec.metadata['source_code_uri'] = 'https://github.com/verynicecode/forty-time-management'
|
19
|
-
spec.metadata['changelog_uri'] = 'https://github.com/verynicecode/forty-time-management/blob/master/ruby/CHANGELOG.md'
|
20
21
|
|
21
22
|
# Specify which files should be added to the gem when it is released.
|
22
23
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
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.8'
|
5
5
|
|
6
6
|
class ParseError < StandardError; end
|
7
7
|
|
@@ -20,7 +20,7 @@ class FortyTime
|
|
20
20
|
hours, extra = string.split(':').map(&:to_i)
|
21
21
|
extra *= -1 if string[0] == '-'
|
22
22
|
|
23
|
-
hours * 60 + extra
|
23
|
+
(hours * 60) + extra
|
24
24
|
end
|
25
25
|
|
26
26
|
attr_accessor :minutes
|
@@ -43,7 +43,7 @@ class FortyTime
|
|
43
43
|
|
44
44
|
def to_s
|
45
45
|
hours = (@minutes / 60.0).to_i
|
46
|
-
extra = (@minutes - hours * 60.0).to_i
|
46
|
+
extra = (@minutes - (hours * 60.0)).to_i
|
47
47
|
|
48
48
|
if @minutes.negative?
|
49
49
|
hours *= -1
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Allured
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-17 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.
|
@@ -35,9 +35,10 @@ homepage: https://www.fortyeven.com/
|
|
35
35
|
licenses:
|
36
36
|
- MIT
|
37
37
|
metadata:
|
38
|
+
changelog_uri: https://github.com/verynicecode/forty-time-management/blob/master/ruby/CHANGELOG.md
|
38
39
|
homepage_uri: https://www.fortyeven.com/
|
40
|
+
rubygems_mfa_required: 'true'
|
39
41
|
source_code_uri: https://github.com/verynicecode/forty-time-management
|
40
|
-
changelog_uri: https://github.com/verynicecode/forty-time-management/blob/master/ruby/CHANGELOG.md
|
41
42
|
post_install_message:
|
42
43
|
rdoc_options: []
|
43
44
|
require_paths:
|
@@ -46,14 +47,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
46
47
|
requirements:
|
47
48
|
- - ">="
|
48
49
|
- !ruby/object:Gem::Version
|
49
|
-
version: 2.
|
50
|
+
version: 2.6.5
|
50
51
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
52
|
requirements:
|
52
53
|
- - ">="
|
53
54
|
- !ruby/object:Gem::Version
|
54
55
|
version: '0'
|
55
56
|
requirements: []
|
56
|
-
rubygems_version: 3.
|
57
|
+
rubygems_version: 3.3.3
|
57
58
|
signing_key:
|
58
59
|
specification_version: 4
|
59
60
|
summary: Easily work with time
|