minting-rails 0.2.0 → 0.3.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c255e7b90de404e1ae633482997d2b05dbb1719222d7ce773e34ae4a6f196edb
|
4
|
+
data.tar.gz: eac064a74394e82576b708340a10b2fecce0d33a3035e2bb7562eb1ca811674a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 407505ed351c1256d9c8592255838a3bf2d374db1cc83d6964cfaa0581a6c45e4dbe25d86c3abf44f422605d517029d815d0cebe4ad4e035564cdcd9a49645cf
|
7
|
+
data.tar.gz: 1dab215057864875e629ec1aae07dc1323f94978ed43ddca3d3542a39d9d793207a59301d90fbfa530cddd3908c9216a894ab91eff718a6202fd14f3afd8c4a6
|
@@ -1,33 +1,35 @@
|
|
1
1
|
# encoding : utf-8
|
2
2
|
# frozen_string_literal: true
|
3
|
-
|
4
3
|
Mint.configure do |config|
|
5
|
-
|
4
|
+
|
5
|
+
# Register a custom currency
|
6
6
|
#
|
7
7
|
# Example:
|
8
8
|
# config.added_currencies = [
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
9
|
+
# {currency: 'CRC', subunit: 2, symbol: '₡'},
|
10
|
+
# {currency: 'NGN', subunit: 3, symbol: '₦'}
|
11
|
+
# ]
|
12
12
|
config.added_currencies = [
|
13
|
-
|
14
|
-
|
13
|
+
{currency: 'CRC', subunit: 2, symbol: '₡'},
|
14
|
+
{currency: 'NGN', subunit: 3, symbol: '₦'}
|
15
15
|
]
|
16
16
|
|
17
17
|
# Enable currencies
|
18
18
|
# Only these currencies amounts can be created
|
19
|
-
#
|
20
|
-
#
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
# Example:
|
20
|
+
# config.enabled_currencies = :all
|
21
|
+
|
22
|
+
config.enabled_currencies = :all
|
23
|
+
|
24
24
|
|
25
25
|
# To set the default currency
|
26
26
|
#
|
27
27
|
# It must be a registered currency
|
28
|
-
#
|
28
|
+
#
|
29
|
+
config.default_currency = 'BRL'
|
30
|
+
|
29
31
|
|
30
|
-
# Specify a rounding mode
|
32
|
+
# Specify a rounding mode (not yet implemented)
|
31
33
|
# Any one of:
|
32
34
|
#
|
33
35
|
# BigDecimal::ROUND_UP,
|
@@ -38,7 +40,17 @@ Mint.configure do |config|
|
|
38
40
|
# BigDecimal::ROUND_CEILING,
|
39
41
|
# BigDecimal::ROUND_FLOOR
|
40
42
|
#
|
41
|
-
# BigDecimal::ROUND_HALF_EVEN
|
43
|
+
# set to BigDecimal::ROUND_HALF_EVEN by default
|
42
44
|
#
|
43
45
|
# config.rounding_mode = BigDecimal::ROUND_HALF_UP
|
44
|
-
|
46
|
+
|
47
|
+
# Set default money format globally.
|
48
|
+
# Default value is nil meaning "ignore this option".
|
49
|
+
# Example:
|
50
|
+
#
|
51
|
+
# config.default_format = {
|
52
|
+
# no_cents_if_whole: nil,
|
53
|
+
# symbol: nil,
|
54
|
+
# sign_before_symbol: nil
|
55
|
+
# }
|
56
|
+
end
|
@@ -21,10 +21,6 @@ module Mint
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def self.valid_currency_codes
|
24
|
-
|
25
|
-
Mint.currencies
|
26
|
-
else
|
27
|
-
config.enabled_currencies.to_set
|
28
|
-
end
|
24
|
+
config.enabled_currencies == :all ? Mint.currencies.keys : config.enabled_currencies
|
29
25
|
end
|
30
26
|
end
|
data/lib/minting/rails.rb
CHANGED
data/lib/minting/railties.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minting-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gilson Ferraz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 7.1.3.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: minting
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.3'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.3'
|
27
41
|
description: ''
|
28
42
|
email:
|
29
43
|
- gilson@cesar.etc.br
|