gloo 5.3.8 → 5.3.9

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: '09b142bdfb67e58657f3b57bd8cafcc2854818a7e31d6baf1c57b873a4b9299d'
4
- data.tar.gz: 54bcb342bf1917c63bb856dd6bf0b8b49c06e77710817adff73cdc4a29bae986
3
+ metadata.gz: c5353f95b95c44382afa5fbd36d3f14681314dcee7a284bb60c51806f6b9be5a
4
+ data.tar.gz: cabbfad7080488c79b911a12d9c070885505b0926f414f821d4d3cc2222c01bd
5
5
  SHA512:
6
- metadata.gz: f1b1c09eb8b9c686b6dfe8e4b55d0cee1f0ccf41d8f1eb7681b18c9954b0f030348735451a638ae0fd2ab4d3c8624aaf224a5e2697fcd3b850616b2cf7cab32a
7
- data.tar.gz: 20788c488d3b105b79d2c1f999422c59b812ef3487cb0d214f8491ab90b20e4b1cd58eedfed744f51e3bbcf11c2c34715e07b314e2c2875ea35c778920afa4e2
6
+ metadata.gz: d86a2a5c5476dab64505e1180fb43b6c24d9cb4bec414a9dc9703afb8748a85070eb33ba5db10ed2146ac1244380f8cf3fb7bc81773e892474d441615711c955
7
+ data.tar.gz: 8d41fd6c9ee3f5839e423721f8d23c2024f777caaddf60785209f2ad2d867360974c75697cb46fe62a45c81994fe41ff337794fe24118fe2bb5ca93cf2f22d6e
data/.DS_Store CHANGED
Binary file
data/CLAUDE.md ADDED
@@ -0,0 +1,83 @@
1
+ @/Users/ecrane/dev/gloo_meta/CLAUDE.md
2
+
3
+ # Gloo — Core Interpreter
4
+
5
+ This is the main gloo language implementation, packaged as a Ruby gem.
6
+
7
+ ## Project Structure
8
+
9
+ ```
10
+ gloo/
11
+ ├── lib/gloo/
12
+ │ ├── core/ Parser, Obj base class, Dictionary, path names (PN)
13
+ │ ├── exec/ Execution engine, dispatcher, runner
14
+ │ ├── expr/ Expression evaluator and operators
15
+ │ ├── objs/ Object type implementations
16
+ │ │ ├── basic/ string, int, bool, container, text, decimal, untyped, alias
17
+ │ │ ├── ctrl/ script, function (ƒ), each, repeat
18
+ │ │ ├── dt/ date, time, datetime
19
+ │ │ ├── str_utils/
20
+ │ │ ├── system/ ruby, file_handle, system
21
+ │ │ └── web/ http_get, http_post, json, uri, erb
22
+ │ ├── verbs/ One file per verb (28 total)
23
+ │ ├── persist/ File loading/saving
24
+ │ ├── convert/ Type conversion
25
+ │ └── plugin/ Plugin system
26
+ ├── test/ Ruby unit tests (minitest)
27
+ └── test.gloo/ Gloo-language integration tests
28
+ ```
29
+
30
+ ## Test Suites
31
+
32
+ ### Ruby unit tests — `test/`
33
+ Run with: `rake test`
34
+
35
+ File naming: `test/<area>/<name>_test.rb`
36
+ Structure mirrors `lib/gloo/` — a test file per class/verb.
37
+
38
+ ```
39
+ test/
40
+ ├── verbs/ One *_test.rb per verb
41
+ ├── objs/basic/ One *_test.rb per object type
42
+ ├── objs/ctrl/
43
+ ├── objs/dt/
44
+ ├── core/
45
+ ├── exec/
46
+ ├── expr/
47
+ └── ...
48
+ ```
49
+
50
+ Base classes: inherit from `GlooTest` (defined in `test/base_test.rb`).
51
+
52
+ ### Gloo integration tests — `test.gloo/`
53
+ Written in gloo itself. Each file contains `[test]` objects with `on_test` scripts using `assert` and `refute`.
54
+
55
+ ```
56
+ test.gloo/
57
+ ├── basic.test.gloo
58
+ ├── dt/
59
+ ├── lang/
60
+ ├── math/
61
+ ├── objs/
62
+ ├── string/
63
+ └── verbs/
64
+ ```
65
+
66
+ Test object pattern:
67
+ ```gloo
68
+ tests [can] :
69
+ group [can] :
70
+ my_test [test] :
71
+ description [string] : What this verifies
72
+ on_test [script] :
73
+ # ... setup ...
74
+ eval some.value = expected
75
+ assert "description of passing condition"
76
+ ```
77
+
78
+ ## Adding a Missing Unit Test
79
+
80
+ 1. Find the relevant `test/<area>/*_test.rb` file (or create one mirroring the `lib/` path)
81
+ 2. Inherit from `GlooTest`
82
+ 3. Run the full suite with `rake test` to verify nothing is broken
83
+ 4. Check `test.gloo/` to see if a corresponding gloo-level integration test is also needed
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 5.3.8
1
+ 5.3.9
data/lib/VERSION_NOTES CHANGED
@@ -1,3 +1,7 @@
1
+ 5.3.9 - 2026.06.11
2
+ - Adds append message to file object
3
+
4
+
1
5
  5.3.8 - 2026.05.24
2
6
  - Update to URI to enable opening on Windows and WSL.
3
7
 
@@ -37,7 +37,7 @@ module Gloo
37
37
  # Get a list of message names that this object receives.
38
38
  #
39
39
  def self.messages
40
- basic = %w[read write delete get_name get_ext get_parent get_sha256]
40
+ basic = %w[read write append delete get_name get_ext get_parent get_sha256]
41
41
  checks = %w[exists? is_file? is_dir? mkdir]
42
42
  search = %w[find_match]
43
43
  show = %w[show page open]
@@ -89,6 +89,23 @@ module Gloo
89
89
  end
90
90
  end
91
91
 
92
+ #
93
+ # Append the given data to the file as a new line.
94
+ # Adds a leading newline if the file does not already end with one.
95
+ #
96
+ def msg_append
97
+ data = ''
98
+ return unless value
99
+
100
+ if @params&.token_count&.positive?
101
+ expr = Gloo::Expr::Expression.new( @engine, @params.tokens )
102
+ data = expr.evaluate
103
+ end
104
+ existing = File.exist?( value ) ? File.read( value ) : ''
105
+ prefix = existing.empty? || existing.end_with?( "\n" ) ? '' : "\n"
106
+ File.open( value, 'a' ) { |f| f.puts "#{prefix}#{data}" }
107
+ end
108
+
92
109
  #
93
110
  # Write the given data out to the file.
94
111
  #
@@ -89,3 +89,18 @@ tests [can] :
89
89
  put $.screen_cols into ^.i
90
90
  eval ^.i > 0
91
91
  assert "expected screen_cols to be greater than 0"
92
+
93
+ get_platform_os [test] :
94
+ description [string] : Get the platform OS.
95
+ on_test [script] :
96
+ eval $.platform_mac? = true
97
+ assert "expected platform_mac to be true"
98
+
99
+ eval $.platform_windows? = false
100
+ assert "expected platform_windows to be false"
101
+
102
+ eval $.platform_linux? = false
103
+ assert "expected platform_linux to be false"
104
+
105
+ eval $.platform_wsl? = false
106
+ assert "expected platform_wsl to be false"
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.8
4
+ version: 5.3.9
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-05-24 00:00:00.000000000 Z
11
+ date: 2026-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -263,6 +263,7 @@ files:
263
263
  - ".ruby-gemset"
264
264
  - ".ruby-version"
265
265
  - ".travis.yml"
266
+ - CLAUDE.md
266
267
  - CODE_OF_CONDUCT.md
267
268
  - Gemfile
268
269
  - LICENSE.txt