commissioner-guy 0.2.1 → 0.2.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: '09145e647b6a57e336c094804b5cae11c6aa1346a3bacda852f6119a0e79a322'
4
- data.tar.gz: 20a9ced63f0ecab83195834d36b710a9bf1a0e9d6cf3aea557347cd976c98f22
3
+ metadata.gz: 4fb1b3818342e1107e234cbe7e2a481b30c72bd3bf7174605e8921f91fccee38
4
+ data.tar.gz: 695f7c5dc02cdd714c7447a22b46b11270b39675d3bd69eac343ecc27e51893d
5
5
  SHA512:
6
- metadata.gz: '006658ff7ea4801acf352c15c8fb192970fbecab106e548596b69910332612bd62a78daf935db3583c03efbb699ef6f04eb7de3412512e7f6a387d6b04d1499d'
7
- data.tar.gz: 749dfe3e31731ddde638be7d7e84bf2a1e9d28d77352183ad97c4a10dcb84bbdfcf75e5cff8035aca3f298c387b639f13891c2be21d4edd4c1631041e01263bc
6
+ metadata.gz: 31336d4befff623aaeb484df1b78eec7e43b5ad2b26054178ce73a1b953cc0bf413e9bc2c7621a02d7d89353bc88a7b073584aae2bf31329ca88b28fe93967e6
7
+ data.tar.gz: 0fdf56576c7b4df1cdb7c74be8d082e15a826ddd1ceb60ac668e0b1e3c9816072997dc8e55a9d5fa6e1991e17f3c92c5ea3c4374353df3a303362c49afbe94b5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- commissioner-guy (0.2.0)
4
+ commissioner-guy (0.2.1)
5
5
  dry-auto_inject (~> 0.6)
6
6
  dry-configurable (~> 0.11)
7
7
  money (~> 6.13.8)
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Commissioner Guy
2
2
 
3
3
  [![Build Status](https://travis-ci.org/mrexox/commissioner.svg?branch=main)](https://travis-ci.org/mrexox/commissioner)
4
+ [![Gem Version](https://badge.fury.io/rb/commissioner-guy.svg)](https://badge.fury.io/rb/commissioner-guy)
4
5
 
5
- Calculates charged and received amounts base on provided one. Can call your exchanger if needed. Applies commissions in the right order.
6
+ Calculates charged and received amounts based on provided one. Calls your exchanger if needed. Applies commissions in order that you define.
6
7
 
7
8
  ## Installation
8
9
 
@@ -9,8 +9,9 @@ module Commissioner
9
9
  extend Dry::Configurable
10
10
 
11
11
  # A lambda that accepts from_currency, to_currency, amount
12
- setting :exchanger, reader: true # arity = 3
13
- setting :rounding_mode, :half_up # possible values: :up, :down, :half_up, :half_even
12
+ setting :exchanger, -> (_from, _to, amount) { amount }, reader: true
13
+ # Possible values: :up, :down, :half_up, :half_even
14
+ setting :rounding_mode, :half_up
14
15
 
15
16
  def self.calculate(params)
16
17
  Calculator.new(params, config: config).calculate
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Commissioner
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commissioner-guy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valentine Kiselev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-12 00:00:00.000000000 Z
11
+ date: 2020-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-auto_inject