parameter_substitution 3.1.0 → 3.2.0.pre.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1e5b52440c6a67aacb8b70595ac82a464ad3dc9ffa882d40a2b0bdaa6bfc8445
|
|
4
|
+
data.tar.gz: 9d05190f2f32b431d9072b40f7a639496512bccf7b23fb2b18cf82b4d0fce5b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ececf080e480205c5bea41f0c059b85a8281738f013c750ee8695f82e0a74fb3a2751a85c0b202906b73042f12437cab0bdda13e94b387167e540e42b19d7a11
|
|
7
|
+
data.tar.gz: 8273813fb82258784fee6c92ae08422bfafc7a18352deabc14da27d9682d6b8d808795ee6a8560741ca46e1da3c1b7bc5715c4a5cdbc808f5f22d923cef7dc61
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class ParameterSubstitution::Formatters::DollarsToCents < ParameterSubstitution::Formatters::Base
|
|
4
|
+
def self.description
|
|
5
|
+
"Converts a dollar amount to cents as an integer"
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def self.format(value)
|
|
9
|
+
(Float(value) * 100).round.to_i rescue nil
|
|
10
|
+
end
|
|
11
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: parameter_substitution
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.2.0.pre.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Invoca Development
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-02-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -99,6 +99,7 @@ files:
|
|
|
99
99
|
- lib/parameter_substitution/formatters/date_us_dashes.rb
|
|
100
100
|
- lib/parameter_substitution/formatters/date_us_normal.rb
|
|
101
101
|
- lib/parameter_substitution/formatters/date_year_first_dashes.rb
|
|
102
|
+
- lib/parameter_substitution/formatters/dollars_to_cents.rb
|
|
102
103
|
- lib/parameter_substitution/formatters/downcase.rb
|
|
103
104
|
- lib/parameter_substitution/formatters/duration_as_seconds.rb
|
|
104
105
|
- lib/parameter_substitution/formatters/duration_as_time.rb
|
|
@@ -148,9 +149,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
148
149
|
version: '3.1'
|
|
149
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
151
|
requirements:
|
|
151
|
-
- - "
|
|
152
|
+
- - ">"
|
|
152
153
|
- !ruby/object:Gem::Version
|
|
153
|
-
version:
|
|
154
|
+
version: 1.3.1
|
|
154
155
|
requirements: []
|
|
155
156
|
rubygems_version: 3.3.27
|
|
156
157
|
signing_key:
|