parameter_substitution 1.4.0 → 2.1.0.pre.0
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 +4 -4
- data/lib/parameter_substitution/version.rb +1 -1
- data/lib/parameter_substitution.rb +13 -8
- metadata +6 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f882362a9056a6432f9b7a64c3a020ed204cfeebc06960cc2de195ea5fcfa8a
|
|
4
|
+
data.tar.gz: 611492ad0f855eade84f7006a1c7f4477f066d6521cceb60e8fdf4c6f3fbaa86
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4564796aa644e57e51a40c2381edfdb322015c2b1e88444c8b4204d25646c244a2acb2d18ea2232a8e84dca0c927efdc3f5067b5d5f1f5cfa45d8b499bc4aec1
|
|
7
|
+
data.tar.gz: 75acddfff283cc5354676f072016b9e6f7333a7a041ffe21bb6adfe07809bca5747b9a0fdc8784546f611e2e49d340880f02c1b27c0f3a144d17b28144ce7bf0
|
|
@@ -63,22 +63,27 @@ class ParameterSubstitution
|
|
|
63
63
|
ParameterSubstitution.config = config
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
-
def find_tokens(string_with_tokens, mapping: {})
|
|
67
|
-
parse_expression(context_from_string(string_with_tokens, mapping)).substitution_parameter_names
|
|
66
|
+
def find_tokens(string_with_tokens, mapping: {}, parameter_start: "<", parameter_end: ">")
|
|
67
|
+
parse_expression(context_from_string(string_with_tokens, mapping, parameter_start: parameter_start, parameter_end: parameter_end)).substitution_parameter_names
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
-
def find_formatters(string_with_tokens, mapping: {})
|
|
71
|
-
parse_expression(context_from_string(string_with_tokens, mapping)).method_names
|
|
70
|
+
def find_formatters(string_with_tokens, mapping: {}, parameter_start: "<", parameter_end: ">")
|
|
71
|
+
parse_expression(context_from_string(string_with_tokens, mapping, parameter_start: parameter_start, parameter_end: parameter_end)).method_names
|
|
72
72
|
end
|
|
73
73
|
|
|
74
|
-
def find_warnings(string_with_tokens, mapping: {})
|
|
75
|
-
parse_expression(context_from_string(string_with_tokens, mapping)).parameter_and_method_warnings || []
|
|
74
|
+
def find_warnings(string_with_tokens, mapping: {}, parameter_start: "<", parameter_end: ">")
|
|
75
|
+
parse_expression(context_from_string(string_with_tokens, mapping, parameter_start: parameter_start, parameter_end: parameter_end)).parameter_and_method_warnings || []
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
private
|
|
79
79
|
|
|
80
|
-
def context_from_string(string_with_tokens, mapping)
|
|
81
|
-
ParameterSubstitution::Context.new(
|
|
80
|
+
def context_from_string(string_with_tokens, mapping, parameter_start: "<", parameter_end: ">")
|
|
81
|
+
ParameterSubstitution::Context.new(
|
|
82
|
+
input: string_with_tokens,
|
|
83
|
+
mapping:,
|
|
84
|
+
parameter_start:,
|
|
85
|
+
parameter_end:
|
|
86
|
+
)
|
|
82
87
|
end
|
|
83
88
|
|
|
84
89
|
def parse_expression(context)
|
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: 1.
|
|
4
|
+
version: 2.1.0.pre.0
|
|
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: 2025-11-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -16,20 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
20
|
-
- - "<"
|
|
21
|
-
- !ruby/object:Gem::Version
|
|
22
|
-
version: '7'
|
|
19
|
+
version: '6.0'
|
|
23
20
|
type: :runtime
|
|
24
21
|
prerelease: false
|
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
23
|
requirements:
|
|
27
24
|
- - ">="
|
|
28
25
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: '
|
|
30
|
-
- - "<"
|
|
31
|
-
- !ruby/object:Gem::Version
|
|
32
|
-
version: '7'
|
|
26
|
+
version: '6.0'
|
|
33
27
|
- !ruby/object:Gem::Dependency
|
|
34
28
|
name: builder
|
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -150,14 +144,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
150
144
|
requirements:
|
|
151
145
|
- - ">="
|
|
152
146
|
- !ruby/object:Gem::Version
|
|
153
|
-
version: '
|
|
147
|
+
version: '3.1'
|
|
154
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
149
|
requirements:
|
|
156
150
|
- - ">="
|
|
157
151
|
- !ruby/object:Gem::Version
|
|
158
152
|
version: '0'
|
|
159
153
|
requirements: []
|
|
160
|
-
rubygems_version: 3.
|
|
154
|
+
rubygems_version: 3.5.22
|
|
161
155
|
signing_key:
|
|
162
156
|
specification_version: 4
|
|
163
157
|
summary: Handles parsing an input strings with embedded substitution parameters and
|