parameter_substitution 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79aadd55b2ea65da5af8795df0079575bddb1efb468af2b5607d730e22fc985d
4
- data.tar.gz: ca466ce64eb45cdf9fa6bf0732836693900c7f05b9df7e62759ae95260ce0476
3
+ metadata.gz: 9f882362a9056a6432f9b7a64c3a020ed204cfeebc06960cc2de195ea5fcfa8a
4
+ data.tar.gz: 611492ad0f855eade84f7006a1c7f4477f066d6521cceb60e8fdf4c6f3fbaa86
5
5
  SHA512:
6
- metadata.gz: e8d5aefa64e2a4a7c89ac75dbbea1761a365f008640feb75163e71c1ac6b2fea926df5f7a1550312fc46b893672252857a08ba24721a9f8a45979e033fdc9629
7
- data.tar.gz: 4ee51df10a7deb73f052c39180718b3e3b6d2849fc87a65624e2ea377bba4f6be7955c6078e616177e83e248c96983a8ecb0a3ae50faff9d0f9cb2022eb65fa6
6
+ metadata.gz: 4564796aa644e57e51a40c2381edfdb322015c2b1e88444c8b4204d25646c244a2acb2d18ea2232a8e84dca0c927efdc3f5067b5d5f1f5cfa45d8b499bc4aec1
7
+ data.tar.gz: 75acddfff283cc5354676f072016b9e6f7333a7a041ffe21bb6adfe07809bca5747b9a0fdc8784546f611e2e49d340880f02c1b27c0f3a144d17b28144ce7bf0
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ParameterSubstitution
4
- VERSION = "2.0.0"
4
+ VERSION = "2.1.0-0"
5
5
  end
@@ -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(input: string_with_tokens, mapping: mapping)
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: 2.0.0
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: 2024-07-11 00:00:00.000000000 Z
11
+ date: 2025-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  requirements: []
154
- rubygems_version: 3.3.27
154
+ rubygems_version: 3.5.22
155
155
  signing_key:
156
156
  specification_version: 4
157
157
  summary: Handles parsing an input strings with embedded substitution parameters and