shelby_arena 0.0.6 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 730cf23bfb3b1c40b817079183fadb94ff7059566802e33cd1dab2fcba994b28
4
- data.tar.gz: 3638a5751cd52e0e81f799cdbcb0f39759f550be7773c31f6f270e063ffb8396
3
+ metadata.gz: 1501a5437dfd19290f4b3cf4de7225601cdcd4861d5687b0e138ed5cb66ecc5d
4
+ data.tar.gz: 7bcb0050acdce4b747a861b9a113855c7b48d07a1bb739514c9105238738da62
5
5
  SHA512:
6
- metadata.gz: 5926f66ac739c7680691379b80efa2db1f430a33e8be82617ebcbec043bf50b3cb6c69546946209270f2a5019a255d910ecd3935d4060ce99fb9e552afe7b25e
7
- data.tar.gz: 66ac77a23bba3dfd87cf716f9c29ec20f87f48746e47ffa28363ba7b497ae6997323b6158c5493abb0067b9dc923fe21a795e0485451b8f9e17c20b1a2f31526
6
+ metadata.gz: 3fa5e4ea578173812c2721e9a48f20b94a65f934241bd13e7cea0bd2c986626e9c6e75dd29fb445a00f2eed0adecf7faa0a08a4470f5804e587ae27952b1b7f5
7
+ data.tar.gz: 195f5e7b245fb27a648d3a82131d73cfa41f26a7f151882175c882336e7950d0cf756ce6b386ef63a77719501ae3299ecc8c4554ccb6ec45f55952d3d161a7d4
@@ -46,13 +46,18 @@ module ShelbyArena
46
46
  options[:api_sig] = generate_api_sig(path, options)
47
47
 
48
48
  res = json_post("#{path}?api_session=#{options[:api_session]}&api_sig=#{options[:api_sig]}", body.to_json)
49
- res.dig('ModifyResult', 'ObjectID')
49
+
50
+ if res.dig('ModifyResult', 'Successful').downcase == 'false'
51
+ raise ShelbyArena::Error, res.dig('ModifyResult')
52
+ else
53
+ res.dig('ModifyResult', 'ObjectID')
54
+ end
50
55
  end
51
56
 
52
57
  private
53
58
 
54
59
  def sum_of_funds(contribution_funds)
55
- contribution_funds.map { |fund| fund[:amount] }.sum
60
+ contribution_funds.map { |fund| fund[:amount] }.sum.round(2)
56
61
  end
57
62
 
58
63
  def translate_funds(contribution_funds)
@@ -1,3 +1,3 @@
1
1
  module ShelbyArena
2
- VERSION = '0.0.6'.freeze
2
+ VERSION = '0.0.8'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shelby_arena
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Brooks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-21 00:00:00.000000000 Z
11
+ date: 2024-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday