plutonium 0.18.6 → 0.18.7

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: 29c84a287fe81867ece4bbdb809ae3e82f3a2213b219348035f06f86a847b784
4
- data.tar.gz: f71dd45419acf91c4ca42e0e005da7044bc06f94a8e7bee63cf075821b71aea4
3
+ metadata.gz: b3bc75122683cce879de19c0ba79d14c3f47529c9ae8184f6cc1ef5e0f7ac533
4
+ data.tar.gz: 3af762cf2fd2ad8543d4bf3030ccaf5280549fc74491fc4427edf8cf258ed514
5
5
  SHA512:
6
- metadata.gz: 7a94d70626e1b057011ccaaf16603fa23d64f76aaa5f39a2bc3e50bb686331de414b62580de807457762d9f6e793d770647892f5256225a196dac2f491ba281e
7
- data.tar.gz: 551f2ced50e6c65723b50c44465bd25cbff1f8686030ddf9651c0681e936f5bd284b2a50414bc7de773d0c55be4b6de924bc4ba41da6dc153f983dd8698e43e1
6
+ metadata.gz: 30c19b4400f82a0480d59fce7f45c47fbc021d61c7e1d67c9649d5bc445c335a112af0b0f83080a33bbdbf2a128bce6ea4470dda1ed9150a332202535d167b4c
7
+ data.tar.gz: d7aff561f705bd229113bada8b189b4000a483cc258e7f085bf4a016e7c48fd763f6e418ad06889491598ccfc449d818157634f360c064bf52a764d28fb4f3d0
@@ -143,8 +143,10 @@ module Plutonium
143
143
  #
144
144
  # @param value [Numeric, nil] The decimal value to be set.
145
145
  def #{name}=(value)
146
- self.#{cents_name} = if value.present?
147
- (BigDecimal(value.to_s) * #{rate}).to_i
146
+ self.#{cents_name} = begin
147
+ (BigDecimal(value.to_s) * #{rate}).to_i if value.present?
148
+ rescue ArgumentError
149
+ nil
148
150
  end
149
151
  end
150
152
 
@@ -1,5 +1,5 @@
1
1
  module Plutonium
2
- VERSION = "0.18.6"
2
+ VERSION = "0.18.7"
3
3
  NEXT_MAJOR_VERSION = VERSION.split(".").tap { |v|
4
4
  v[1] = v[1].to_i + 1
5
5
  v[2] = 0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.6
4
+ version: 0.18.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-03 00:00:00.000000000 Z
11
+ date: 2025-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk