ratatui_ruby 0.3.0 → 0.3.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 +4 -4
- data/.builds/ruby-3.2.yml +2 -2
- data/.builds/ruby-3.3.yml +2 -2
- data/.builds/ruby-3.4.yml +2 -2
- data/.builds/ruby-4.0.0.yml +5 -6
- data/AGENTS.md +32 -25
- data/CHANGELOG.md +8 -1
- data/README.md +2 -2
- data/REUSE.toml +0 -5
- data/ext/ratatui_ruby/Cargo.lock +1 -1
- data/ext/ratatui_ruby/Cargo.toml +1 -1
- data/ext/ratatui_ruby/src/rendering.rs +3 -2
- data/lib/ratatui_ruby/version.rb +1 -1
- data/mise.toml +1 -1
- data/tasks/resources/build.yml.erb +0 -13
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6c258db0dbb30641f2813c23f6212a3e6e3ee56c8aa3b56a428e67d4b97bcae1
|
|
4
|
+
data.tar.gz: 7dbbec9b16667b25a148bff938ea3448611689f04dae722a24600d6ebc29d9ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9d395bce840eb550abf6f91567c1ca1952c6b7e184749c3bd7db3188d71f97a9c876af535d71cf21606e28aa23e780f5294595b54baf1640620743d8de8ef664
|
|
7
|
+
data.tar.gz: 385435bf381ba2602f8e306c74cb8842416c1bb39100cd576abedf9c0cf3421c79d688a58abd1b8a1b4915caaae781288d490a02077f3fbc04a161b891583add
|
data/.builds/ruby-3.2.yml
CHANGED
|
@@ -16,7 +16,7 @@ packages:
|
|
|
16
16
|
- clang-dev
|
|
17
17
|
- git
|
|
18
18
|
artifacts:
|
|
19
|
-
- ratatui_ruby/pkg/ratatui_ruby-0.3.
|
|
19
|
+
- ratatui_ruby/pkg/ratatui_ruby-0.3.1.gem
|
|
20
20
|
sources:
|
|
21
21
|
- https://git.sr.ht/~kerrick/ratatui_ruby
|
|
22
22
|
tasks:
|
|
@@ -31,7 +31,7 @@ tasks:
|
|
|
31
31
|
sed -i 's/ruby = .*/ruby = "3.2"/' mise.toml
|
|
32
32
|
mise install
|
|
33
33
|
mise x -- pip install reuse
|
|
34
|
-
mise x -- gem install bundler:
|
|
34
|
+
mise x -- gem install bundler:4.0.3
|
|
35
35
|
mise reshim
|
|
36
36
|
mise x -- bundle config set --local frozen 'true'
|
|
37
37
|
mise x -- bundle install
|
data/.builds/ruby-3.3.yml
CHANGED
|
@@ -16,7 +16,7 @@ packages:
|
|
|
16
16
|
- clang-dev
|
|
17
17
|
- git
|
|
18
18
|
artifacts:
|
|
19
|
-
- ratatui_ruby/pkg/ratatui_ruby-0.3.
|
|
19
|
+
- ratatui_ruby/pkg/ratatui_ruby-0.3.1.gem
|
|
20
20
|
sources:
|
|
21
21
|
- https://git.sr.ht/~kerrick/ratatui_ruby
|
|
22
22
|
tasks:
|
|
@@ -31,7 +31,7 @@ tasks:
|
|
|
31
31
|
sed -i 's/ruby = .*/ruby = "3.3"/' mise.toml
|
|
32
32
|
mise install
|
|
33
33
|
mise x -- pip install reuse
|
|
34
|
-
mise x -- gem install bundler:
|
|
34
|
+
mise x -- gem install bundler:4.0.3
|
|
35
35
|
mise reshim
|
|
36
36
|
mise x -- bundle config set --local frozen 'true'
|
|
37
37
|
mise x -- bundle install
|
data/.builds/ruby-3.4.yml
CHANGED
|
@@ -16,7 +16,7 @@ packages:
|
|
|
16
16
|
- clang-dev
|
|
17
17
|
- git
|
|
18
18
|
artifacts:
|
|
19
|
-
- ratatui_ruby/pkg/ratatui_ruby-0.3.
|
|
19
|
+
- ratatui_ruby/pkg/ratatui_ruby-0.3.1.gem
|
|
20
20
|
sources:
|
|
21
21
|
- https://git.sr.ht/~kerrick/ratatui_ruby
|
|
22
22
|
tasks:
|
|
@@ -31,7 +31,7 @@ tasks:
|
|
|
31
31
|
sed -i 's/ruby = .*/ruby = "3.4"/' mise.toml
|
|
32
32
|
mise install
|
|
33
33
|
mise x -- pip install reuse
|
|
34
|
-
mise x -- gem install bundler:
|
|
34
|
+
mise x -- gem install bundler:4.0.3
|
|
35
35
|
mise reshim
|
|
36
36
|
mise x -- bundle config set --local frozen 'true'
|
|
37
37
|
mise x -- bundle install
|
data/.builds/ruby-4.0.0.yml
CHANGED
|
@@ -16,7 +16,7 @@ packages:
|
|
|
16
16
|
- clang-dev
|
|
17
17
|
- git
|
|
18
18
|
artifacts:
|
|
19
|
-
- ratatui_ruby/pkg/ratatui_ruby-0.3.
|
|
19
|
+
- ratatui_ruby/pkg/ratatui_ruby-0.3.1.gem
|
|
20
20
|
sources:
|
|
21
21
|
- https://git.sr.ht/~kerrick/ratatui_ruby
|
|
22
22
|
tasks:
|
|
@@ -31,22 +31,21 @@ tasks:
|
|
|
31
31
|
sed -i 's/ruby = .*/ruby = "4.0.0"/' mise.toml
|
|
32
32
|
mise install
|
|
33
33
|
mise x -- pip install reuse
|
|
34
|
-
mise x -- gem install bundler:
|
|
34
|
+
mise x -- gem install bundler:4.0.3
|
|
35
35
|
mise reshim
|
|
36
36
|
mise x -- bundle config set --local frozen 'true'
|
|
37
37
|
mise x -- bundle install
|
|
38
|
-
|
|
39
|
-
mise x -- bundle exec rake compile || echo "⚠️ Compilation failed (Allowed Failure)"
|
|
38
|
+
mise x -- bundle exec rake compile
|
|
40
39
|
- test: |
|
|
41
40
|
. ~/.buildenv
|
|
42
41
|
cd ratatui_ruby
|
|
43
42
|
echo "Testing Ruby 4.0.0"
|
|
44
|
-
mise x -- bundle exec rake test
|
|
43
|
+
mise x -- bundle exec rake test
|
|
45
44
|
- lint: |
|
|
46
45
|
. ~/.buildenv
|
|
47
46
|
cd ratatui_ruby
|
|
48
47
|
echo "Linting Ruby 4.0.0"
|
|
49
|
-
mise x -- bundle exec rake lint
|
|
48
|
+
mise x -- bundle exec rake lint
|
|
50
49
|
- package: |
|
|
51
50
|
. ~/.buildenv
|
|
52
51
|
cd ratatui_ruby
|
data/AGENTS.md
CHANGED
|
@@ -35,7 +35,7 @@ Every file must begin with an SPDX-compliant header. Use the following format:
|
|
|
35
35
|
|
|
36
36
|
### Ruby Standards
|
|
37
37
|
|
|
38
|
-
- **Version:** Tested against the latest releases of Ruby 3.2, 3.3,
|
|
38
|
+
- **Version:** Tested against the latest releases of Ruby 3.2, 3.3, 3.4, and 4.0, and must work on all of them. Local development happens on the latest stable release.
|
|
39
39
|
- **Linter:** Run via `bundle exec rake lint`. You are not done until all linting passes.
|
|
40
40
|
- **Style:**
|
|
41
41
|
- Use `Data.define` for all value objects (UI Nodes). (Prefer `class Foo < Data.define()` over `Foo = Data.define() do`).
|
|
@@ -129,30 +129,37 @@ The project follows a standard Gem layout with an `ext/` directory for Rust code
|
|
|
129
129
|
- Body: Detailed explanation if necessary (wrap at 72 chars). Explain why this is the implementation, as opposed to other possible implementations. Skip the body entirely if it's rote, a duplication of the diff, or otherwise unhelpful. **Do not simply list the files changed or the minor edits made to them.** Do not use markdown, except as required in AI Attribution.
|
|
130
130
|
- Footer: AI attribution if generated by an agent, sourcehut ticket if implemented by a ticket, or both.
|
|
131
131
|
- **AI Attribution:**
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
132
|
+
- **Always include AI attribution** in the footer if the commit was generated or significantly assisted by an AI agent. This is mandatory for transparency and compliance.
|
|
133
|
+
- **Amp:**
|
|
134
|
+
```
|
|
135
|
+
Generated with [Amp](https://ampcode.com)
|
|
136
|
+
|
|
137
|
+
Co-Authored-By: Amp <noreply@ampcode.com>
|
|
138
|
+
```
|
|
139
|
+
- **Antigravity:**
|
|
140
|
+
Specify the model used in the footer. Examples:
|
|
141
|
+
```
|
|
142
|
+
Generated with [Antigravity](https://antigravity.google)
|
|
143
|
+
|
|
144
|
+
Co-Authored-By: Gemini 3 Pro (High) <noreply@google.com>
|
|
145
|
+
```
|
|
146
|
+
```
|
|
147
|
+
Generated with [Antigravity](https://antigravity.google)
|
|
148
|
+
|
|
149
|
+
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
150
|
+
```
|
|
151
|
+
- **Gemini 3:**
|
|
152
|
+
```
|
|
153
|
+
Generated with [Gemini 3 Pro](https://gemini.google.com/)
|
|
154
|
+
|
|
155
|
+
Co-Authored-By: Gemini 3 Pro <noreply@google.com>
|
|
156
|
+
```
|
|
157
|
+
- **JetBrains Junie:**
|
|
158
|
+
```
|
|
159
|
+
Generated with [JetBrains Junie](https://www.jetbrains.com/ai/)
|
|
160
|
+
|
|
161
|
+
Co-Authored-By: Junie <junie@jetbrains.com>
|
|
162
|
+
```
|
|
156
163
|
- **Sourcehut Tickets:**
|
|
157
164
|
- If the commit implements a specific ticket, include a footer: `Implements: https://todo.sr.ht/~kerrick/ratatui_ruby/<id>`
|
|
158
165
|
- This must be the **last** item in the footer, if present.
|
data/CHANGELOG.md
CHANGED
|
@@ -18,6 +18,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
18
18
|
|
|
19
19
|
### Removed
|
|
20
20
|
|
|
21
|
+
## [0.3.1] - 2025-12-28
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- **Ruby 4 Support**: Updated magnus FFI bindings to use the modern API for Ruby 4.0.0 compatibility.
|
|
26
|
+
|
|
21
27
|
## [0.3.0] - 2025-12-28
|
|
22
28
|
|
|
23
29
|
### Added
|
|
@@ -59,7 +65,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
59
65
|
- **Input Handling**: Robust handling for both Keyboard and Mouse events.
|
|
60
66
|
- **Testing Support**: Included `RatatuiRuby::TestHelper` and RSpec integration to make testing your TUI applications possible.
|
|
61
67
|
|
|
62
|
-
[Unreleased]: https://git.sr.ht/~kerrick/ratatui_ruby/compare/v0.3.
|
|
68
|
+
[Unreleased]: https://git.sr.ht/~kerrick/ratatui_ruby/compare/v0.3.1...HEAD
|
|
69
|
+
[0.3.1]: https://git.sr.ht/~kerrick/ratatui_ruby/compare/v0.3.0...v0.3.1
|
|
63
70
|
[0.3.0]: https://git.sr.ht/~kerrick/ratatui_ruby/compare/v0.2.0...v0.3.0
|
|
64
71
|
[0.2.0]: https://git.sr.ht/~kerrick/ratatui_ruby/compare/v0.1.0...v0.2.0
|
|
65
72
|
[0.1.0]: https://git.sr.ht/~kerrick/ratatui_ruby/tree/v0.1.0
|
data/README.md
CHANGED
|
@@ -34,8 +34,8 @@ Please join the **announce** mailing list at https://lists.sr.ht/~kerrick/ratatu
|
|
|
34
34
|
- x86_64 (AMD, Intel) and ARM (Apple Silicon, Raspberry Pi).
|
|
35
35
|
|
|
36
36
|
We support the latest minor version of every
|
|
37
|
-
[non-eol Ruby version](https://www.ruby-lang.org/en/downloads/branches/)
|
|
38
|
-
|
|
37
|
+
[non-eol Ruby version](https://www.ruby-lang.org/en/downloads/branches/),
|
|
38
|
+
including Ruby 4.
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
## Installation
|
data/REUSE.toml
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
version = 1
|
|
2
2
|
|
|
3
|
-
[[annotations]]
|
|
4
|
-
path = '.ruby-version'
|
|
5
|
-
SPDX-FileCopyrightText = "2025 Kerrick Long <me@kerricklong.com>"
|
|
6
|
-
SPDX-License-Identifier = "CC0-1.0"
|
|
7
|
-
|
|
8
3
|
[[annotations]]
|
|
9
4
|
path = 'Gemfile.lock'
|
|
10
5
|
SPDX-FileCopyrightText = "2025 Kerrick Long <me@kerricklong.com>"
|
data/ext/ratatui_ruby/Cargo.lock
CHANGED
data/ext/ratatui_ruby/Cargo.toml
CHANGED
|
@@ -9,13 +9,14 @@ use ratatui::{layout::Rect, Frame};
|
|
|
9
9
|
pub fn render_node(frame: &mut Frame, area: Rect, node: Value) -> Result<(), Error> {
|
|
10
10
|
if node.respond_to("render", true)? {
|
|
11
11
|
let wrapper = BufferWrapper::new(frame.buffer_mut());
|
|
12
|
+
let ruby = magnus::Ruby::get().unwrap();
|
|
12
13
|
let ruby_area = {
|
|
13
|
-
let ruby = magnus::Ruby::get().unwrap();
|
|
14
14
|
let module = ruby.define_module("RatatuiRuby")?;
|
|
15
15
|
let class = module.const_get::<_, magnus::RClass>("Rect")?;
|
|
16
16
|
class.funcall::<_, _, Value>("new", (area.x, area.y, area.width, area.height))?
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
let wrapper_obj = ruby.obj_wrap(wrapper);
|
|
19
|
+
node.funcall::<_, _, Value>("render", (ruby_area, wrapper_obj))?;
|
|
19
20
|
return Ok(());
|
|
20
21
|
}
|
|
21
22
|
|
data/lib/ratatui_ruby/version.rb
CHANGED
data/mise.toml
CHANGED
|
@@ -35,30 +35,17 @@ tasks:
|
|
|
35
35
|
mise reshim
|
|
36
36
|
mise x -- bundle config set --local frozen 'true'
|
|
37
37
|
mise x -- bundle install
|
|
38
|
-
<% if ruby_version.start_with?("4.0") -%>
|
|
39
|
-
# We allow this to fail so we can see logs without stopping the CI pipeline
|
|
40
|
-
mise x -- bundle exec rake compile || echo "⚠️ Compilation failed (Allowed Failure)"
|
|
41
|
-
<% else -%>
|
|
42
38
|
mise x -- bundle exec rake compile
|
|
43
|
-
<% end -%>
|
|
44
39
|
- test: |
|
|
45
40
|
. ~/.buildenv
|
|
46
41
|
cd ratatui_ruby
|
|
47
42
|
echo "Testing Ruby <%= ruby_version %>"
|
|
48
|
-
<% if ruby_version.start_with?("4.0") -%>
|
|
49
|
-
mise x -- bundle exec rake test || true
|
|
50
|
-
<% else -%>
|
|
51
43
|
mise x -- bundle exec rake test
|
|
52
|
-
<% end -%>
|
|
53
44
|
- lint: |
|
|
54
45
|
. ~/.buildenv
|
|
55
46
|
cd ratatui_ruby
|
|
56
47
|
echo "Linting Ruby <%= ruby_version %>"
|
|
57
|
-
<% if ruby_version.start_with?("4.0") -%>
|
|
58
|
-
mise x -- bundle exec rake lint || true
|
|
59
|
-
<% else -%>
|
|
60
48
|
mise x -- bundle exec rake lint
|
|
61
|
-
<% end -%>
|
|
62
49
|
- package: |
|
|
63
50
|
. ~/.buildenv
|
|
64
51
|
cd ratatui_ruby
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ratatui_ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kerrick Long
|
|
@@ -281,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
281
281
|
- !ruby/object:Gem::Version
|
|
282
282
|
version: '0'
|
|
283
283
|
requirements: []
|
|
284
|
-
rubygems_version:
|
|
284
|
+
rubygems_version: 4.0.3
|
|
285
285
|
specification_version: 4
|
|
286
286
|
summary: "\U0001F48E Unofficial Ruby wrapper for the Ratatui \U0001F468\U0001F373\U0001F400."
|
|
287
287
|
test_files: []
|