parameter_substitution 3.0.0 → 3.1.0.wb.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: 21ee054d2d0ad2f13f1be4ebf4c82b0ac82156a58fab96e1fa66b72a3869fffc
|
|
4
|
+
data.tar.gz: 7b5bde4a48948038dc4cd48b7ad7b1fae0078f5d364466698c2815634c4b9075
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf208577b57cd05f60e0beb1fab5ba009a7ae5a39e98cda068121217f9ced7a49ebe4392c40da135e00468daeeb9470bc6c57ecf190ae8601eb31c011bc90d6d
|
|
7
|
+
data.tar.gz: e9b12e2ab2234ef07f9508344a600010cb9c227c113187174df27fb37ed3c6f39f5bcf54071addedfc440e94dff0f18387ea37d49a8dc8b2294db0c1e572ccf9
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class ParameterSubstitution::Formatters::ToF < ParameterSubstitution::Formatters::Base
|
|
4
|
+
def self.description
|
|
5
|
+
"Converts a string to a double-precision floating point number"
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def self.format(value)
|
|
9
|
+
return nil if value.nil? || value.to_s.strip.empty?
|
|
10
|
+
|
|
11
|
+
value.to_f.round(2)
|
|
12
|
+
end
|
|
13
|
+
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.0.
|
|
4
|
+
version: 3.1.0.wb.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:
|
|
11
|
+
date: 2026-01-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -123,6 +123,7 @@ files:
|
|
|
123
123
|
- lib/parameter_substitution/formatters/split_before_colon.rb
|
|
124
124
|
- lib/parameter_substitution/formatters/string_to_base64.rb
|
|
125
125
|
- lib/parameter_substitution/formatters/time_with_seconds.rb
|
|
126
|
+
- lib/parameter_substitution/formatters/to_f.rb
|
|
126
127
|
- lib/parameter_substitution/formatters/trim.rb
|
|
127
128
|
- lib/parameter_substitution/formatters/upper.rb
|
|
128
129
|
- lib/parameter_substitution/method_call_expression.rb
|
|
@@ -147,11 +148,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
147
148
|
version: '3.1'
|
|
148
149
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
150
|
requirements:
|
|
150
|
-
- - "
|
|
151
|
+
- - ">"
|
|
151
152
|
- !ruby/object:Gem::Version
|
|
152
|
-
version:
|
|
153
|
+
version: 1.3.1
|
|
153
154
|
requirements: []
|
|
154
|
-
rubygems_version: 3.
|
|
155
|
+
rubygems_version: 3.3.27
|
|
155
156
|
signing_key:
|
|
156
157
|
specification_version: 4
|
|
157
158
|
summary: Handles parsing an input strings with embedded substitution parameters and
|