gloo 5.3.2 → 5.3.3

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: 81669c8fe4c713d9745c72f46a72224a3e274d8e6f2035b29e3ae1368f7c1fdf
4
- data.tar.gz: 494346cdc7fdee49a54861b2543a18abcc66e9031277276edc168859129c6fa4
3
+ metadata.gz: 25aaa13e4379e9559481b8f57581f4c49b2d522f937d9ec41c1e15a90fb4c930
4
+ data.tar.gz: 2921a93b74f5a4d576c041f0e329afc18de609379f833df9b1b25b580852f320
5
5
  SHA512:
6
- metadata.gz: 90e11e209e9d0f19de22f852bf9c69e71fa29ef2e1a94647a632e7ec0bca992cca7f1394c60868db137fef5f13e36792d7a3ab79f883ebd4e2a3408a27b95854
7
- data.tar.gz: 5b3ebeba05745d3dbc3963af55d1bfc7aee04d1307d3bbdcc96df6fd7f7e58c21d0e260ef84ad0b43e790742fe229c5c4a5aef43b87b27776ac9f2d7bc8cc67e
6
+ metadata.gz: c4336014d3d73095126b8a03879d861c0ea696c4cba55e2c9425906dc3bdec497eaf091e2c1fa67c5d57fa2a37c8bd38de06b7d2f9fc46ab34490704428d2340
7
+ data.tar.gz: 5ac64724273398fc11531486cc0fbcd2f6f0a8b068238672d3067e6803cb23f262343498edc592de253663448103fafb9ee32822621514ff5826c472ea3fa155
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 5.3.2
1
+ 5.3.3
data/lib/VERSION_NOTES CHANGED
@@ -1,3 +1,7 @@
1
+ 5.3.3 - 2026.04.18
2
+ - Adds sub and gsub string messages.
3
+
4
+
1
5
  5.3.2 - 2026.04.10
2
6
  - Adds mkdir message for the file object.
3
7
 
@@ -44,7 +44,7 @@ module Gloo
44
44
  # Get a list of message names that this object receives.
45
45
  #
46
46
  def self.messages
47
- return super + %w[up down size starts_with? ends_with? substring?
47
+ return super + %w[up down size starts_with? ends_with? substring? sub gsub
48
48
  count_lines count_words count_chars
49
49
  format_for_html encode64 decode64 escape unescape
50
50
  gen_alphanumeric gen_uuid gen_hex gen_base64]
@@ -48,6 +48,51 @@ module Gloo
48
48
  end
49
49
  end
50
50
 
51
+ #
52
+ # Substitute the given string with another string.
53
+ #
54
+ def msg_sub
55
+ if @params&.token_count&.positive?
56
+ expr = Gloo::Expr::Expression.new( @engine, [ @params.tokens.first ] )
57
+ from = expr.evaluate
58
+ expr = Gloo::Expr::Expression.new( @engine, [ @params.tokens.last ] )
59
+ to = expr.evaluate
60
+
61
+ result = value.sub(from, to)
62
+ @engine.heap.it.set_to result
63
+ set_value(result)
64
+ return result
65
+ else
66
+ # Error
67
+ @engine.log.error MISSING_PARAM_MSG
68
+ @engine.heap.it.set_to false
69
+ return false
70
+ end
71
+ end
72
+
73
+ #
74
+ # Substitute the given string with another string.
75
+ # Find all occurrences and replace them.
76
+ #
77
+ def msg_gsub
78
+ if @params&.token_count&.positive?
79
+ expr = Gloo::Expr::Expression.new( @engine, [ @params.tokens.first ] )
80
+ from = expr.evaluate
81
+ expr = Gloo::Expr::Expression.new( @engine, [ @params.tokens.last ] )
82
+ to = expr.evaluate
83
+
84
+ result = value.gsub(from, to)
85
+ @engine.heap.it.set_to result
86
+ set_value(result)
87
+ return result
88
+ else
89
+ # Error
90
+ @engine.log.error MISSING_PARAM_MSG
91
+ @engine.heap.it.set_to false
92
+ return false
93
+ end
94
+ end
95
+
51
96
  #
52
97
  # Does the string contain the given string?
53
98
  #
@@ -58,7 +58,7 @@ module Gloo
58
58
  # Get a list of message names that this object receives.
59
59
  #
60
60
  def self.messages
61
- return super + %w[up down size starts_with? ends_with? substring?
61
+ return super + %w[up down size starts_with? ends_with? substring? sub gsub
62
62
  count_lines count_words count_chars
63
63
  format_for_html encode64 decode64 escape unescape
64
64
  gen_alphanumeric gen_uuid gen_hex gen_base64]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gloo
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.2
4
+ version: 5.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Crane
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-04-10 00:00:00.000000000 Z
11
+ date: 2026-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler