forty_time 0.0.7 → 0.0.8

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: 454edc0d410a785997dffb67186bd1e46b569e291563e22d94ea2d125bbf59c1
4
- data.tar.gz: 1df9883d0c9673ab083f06a6007346b31a28a83b72ecc6234c4c56cff600ed44
3
+ metadata.gz: 5eebf2c2163cdc4686dda95809e101dbe09c3f62f788f1900b4caf113cdc54f1
4
+ data.tar.gz: 3d15e412a3a64bde7ea1e459f202367dbebe7a60c5fcb6f039483e0bb9a867c7
5
5
  SHA512:
6
- metadata.gz: 8a7691945cfbe434413ceb1042d1bc774069741512aebf9524ff788f227ac9efe841e2c426b764925372c84bc7204cc40d48abaed87bd81feb077d289bf80df4
7
- data.tar.gz: 12c03764b1133d72142e9ba5901fdcea2619c551644ea04fcb5fda9419a815f63bec541eb723f7bb089bf858e00d30ec54b26aede83b910d941cbee6c1a20b3f
6
+ metadata.gz: 41c4cfc5ebd6a1f80bdfbba808ff588cb7bbe8f6cd602b5c8d27280565e8af70fd20a908db196e7428707f7bd0021c518642d532c0795bd187030f483252bbcf
7
+ data.tar.gz: 5f781c8e7b4489a6122438dad52e9655019e7c41df1ef379cb717a9c9cb964c61e5d2326eb5455bd9205c60ead2b0a0e5d24f1765175b5dd4409cf9ac599441c
data/.rspec CHANGED
@@ -1,3 +1,2 @@
1
- --format documentation
2
1
  --color
3
- --require spec_helper
2
+ --order random
data/.rubocop.yml CHANGED
@@ -1,3 +1,11 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ SuggestExtensions: false
4
+ TargetRubyVersion: 3.1.0
5
+
6
+ Gemspec/RequiredRubyVersion:
7
+ Enabled: false
8
+
1
9
  Layout/LineLength:
2
10
  Exclude:
3
11
  - 'forty_time.gemspec'
data/Gemfile.lock CHANGED
@@ -1,43 +1,46 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- forty_time (0.0.7)
4
+ forty_time (0.0.8)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- ast (2.4.0)
10
- diff-lcs (1.3)
11
- jaro_winkler (1.5.4)
12
- parallel (1.19.1)
13
- parser (2.7.0.5)
14
- ast (~> 2.4.0)
15
- rainbow (3.0.0)
16
- rake (12.3.3)
17
- rexml (3.2.4)
18
- rspec (3.9.0)
19
- rspec-core (~> 3.9.0)
20
- rspec-expectations (~> 3.9.0)
21
- rspec-mocks (~> 3.9.0)
22
- rspec-core (3.9.1)
23
- rspec-support (~> 3.9.1)
24
- rspec-expectations (3.9.1)
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.9.0)
27
- rspec-mocks (3.9.1)
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.9.0)
30
- rspec-support (3.9.2)
31
- rubocop (0.80.1)
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 (>= 2.7.0.1)
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, < 1.7)
39
- ruby-progressbar (1.10.1)
40
- unicode-display_width (1.6.1)
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.1.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.3.0')
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.7'
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.7
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: 2020-05-05 00:00:00.000000000 Z
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.3.0
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.0.3
57
+ rubygems_version: 3.3.3
57
58
  signing_key:
58
59
  specification_version: 4
59
60
  summary: Easily work with time