matheus 0.6.0 → 0.6.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e12186db7a0ecf5477d7456cd2917dd42c0051369c2c1d40af773295be4986a
4
- data.tar.gz: 5171a3b830598f42fe2c25fd59873926b159c83691e0027faa5c6b3d684016ab
3
+ metadata.gz: 8eeb312b4e07d2801d71514f900030fedc708460118e4edc12bcda8a54e0232f
4
+ data.tar.gz: 6cb596e1958269fdb0d5a9ff7be6db0e799fd18992530fe091250b901fd3be57
5
5
  SHA512:
6
- metadata.gz: 1e5a5e4abab785a8b7e72659bc5f5f5407fc23f518e5089587fb89461ad43fb37d4ab6e1b814893848e922ae97646148c5d27aa53c4db144a420a29ecd894796
7
- data.tar.gz: 9d3f0453388968e8c6f80a4d7c39f8d0e6ab97135c52384c8a15653fb56c7a2a3ca673d47c518a182e0cfd0cb81c9b73861b42be1d34784df3f054e9613a1a18
6
+ metadata.gz: d962223727c2d618ca19563dc67d76c1f284b033179d75275988f28adab8a3beb10626386af929acc206e17e5c4a4f56f1b0cf1d307b4eb02b1a083dd7f3d9c1
7
+ data.tar.gz: d51bd9601d956412b6ff0bbe01ae91333153cd20bb6086d5b9560502a1b79ba8c5bb763dfeb5c3ad813daebe918d22bf8148db8e5605658ebde669c3a717d762
@@ -30,15 +30,15 @@ module Matheus
30
30
  def parse_args(args)
31
31
  first_arg = args.fetch(0) { raise "Missing amount or source currency" }
32
32
 
33
- if (amount = Float(first_arg) rescue nil)
33
+ if (amount = Float(first_arg) rescue nil) # standard:disable Style/RescueModifier
34
34
  source = args.fetch(1) { raise "Missing source currency" }
35
35
  target = args.fetch(2) { raise "Missing target currency" }
36
- date = args.fetch(3, Date.today)
36
+ date = Date.parse(args.fetch(3, Date.today.to_s))
37
37
  else
38
38
  amount = 1.0
39
39
  source = first_arg
40
40
  target = args.fetch(1) { raise "Missing target currency" }
41
- date = args.fetch(2, Date.today)
41
+ date = Date.parse(args.fetch(2, Date.today.to_s))
42
42
  end
43
43
 
44
44
  [amount, source, target, date]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Matheus
4
- VERSION = "0.6.0"
4
+ VERSION = "0.6.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matheus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matheus Richard
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-07 00:00:00.000000000 Z
11
+ date: 2025-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk