calcpace 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/calcpace/checker.rb +15 -12
  3. metadata +8 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68fc31f44ee7ddb620bc3648c7e58b6d96513433a0e76f5d29ee69fb00eb43a7
4
- data.tar.gz: e6a583a06e8ff84ab5e519efc62a234248cc098713ade0656b3331070754f11b
3
+ metadata.gz: ae4cf16a59e2220323b0ad4b7439b7abdd7484e994db1aae7f61970843b20cd6
4
+ data.tar.gz: c9158b0f6bddd20ae5569d7341cc2fe2521e11664795b39c685f1a600b1f9401
5
5
  SHA512:
6
- metadata.gz: 7f1fab83a5c2a44992a0273451a3fa7815f47d6d0022377b5ccdec095f3f8c00c90f7a20f91630eefdd9b3f086811f69a0e3dd67c822967f24db7507f707855d
7
- data.tar.gz: 2e598a0d206c7f0d68b5c1eedcd8ce419b2ea8dc0c2bcb348d845ce2146c582121e9931bd0eb2d196985cfd0cfa57cf7e91241eb28d17074efb57a59e9ea4f85
6
+ metadata.gz: c895388ab6788533432c5f556c4bad4db174079538b6e9b0f81ce27fe2c5266f96c0c364fbfc0335effa9e4ea86989df81eccc5d219ac786b472901b28ea8a9a
7
+ data.tar.gz: bc709904b89da4b81aba7253c27c0caec29e1d54faad929b8ab82b020d3b6e2d3b1c9394be67c62b74cc569d950df61af83961483e4f009e049595074e807b17
@@ -1,12 +1,15 @@
1
- # frozen_string_literal: true
2
-
3
- # Module to check if the input is valid or of the correct type
4
- module Checker
5
- def check_positive(number)
6
- raise ArgumentError, 'It must be a positive number' unless number.is_a?(Numeric) && number.positive?
7
- end
8
-
9
- def check_time(time_string)
10
- raise ArgumentError, 'It must be a valid time in the format XX:XX:XX' unless time_string =~ /^\d{1,2}:\d{2}:\d{2}$/
11
- end
12
- end
1
+ # frozen_string_literal: true
2
+
3
+ # Module to check if the input is valid or of the correct type
4
+ module Checker
5
+ def check_positive(number)
6
+ raise ArgumentError, 'It must be a positive number' unless number.is_a?(Numeric) && number.positive?
7
+ end
8
+
9
+ def check_time(time_string)
10
+ return if time_string =~ /\A\d{1,2}:\d{2}:\d{2}\z/
11
+
12
+ raise ArgumentError,
13
+ 'It must be a valid time in the format XX:XX:XX'
14
+ end
15
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calcpace
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joao Gilberto Saraiva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-26 00:00:00.000000000 Z
11
+ date: 2025-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '5.14'
19
+ version: '5.25'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '5.14'
26
+ version: '5.25'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '13.0'
33
+ version: '13.2'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '13.0'
40
+ version: '13.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake-compiler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.66'
75
+ version: '1.69'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.66'
82
+ version: '1.69'
83
83
  description: It is designed for calculations related to distance, speed and time.
84
84
  The gem also supports conversion to 42 different units of distance and velocity,
85
85
  including metric, nautical and imperial units.